@@ -24,7 +24,7 @@ use panic_halt as _;
2424
2525use arduino_hal:: {
2626 hal:: port:: { PD2 , PD6 , PD7 } ,
27- pac:: tc0:: tccr0b:: CS0_A ,
27+ pac:: tc0:: tccr0b:: Cs0 ,
2828 port:: mode:: { Floating , Input , Output } ,
2929 port:: Pin ,
3030 prelude:: * ,
@@ -51,7 +51,7 @@ fn main() -> ! {
5151 let mut serial = arduino_hal:: default_serial!( dp, pins, 57600 ) ;
5252
5353 // Monotonic clock to keep track of the time
54- CLOCK . start ( dp. TC0 ) ;
54+ CLOCK . start ( dp. tc0 ) ;
5555
5656 let mut uno_led = pins. d13 . into_output ( ) ;
5757 let mut irdroino_led1 = pins. d7 . into_output ( ) ;
@@ -62,10 +62,10 @@ fn main() -> ! {
6262 irdroino_led2. set_low ( ) ;
6363
6464 // Enable group 2 (PORTD)
65- dp. EXINT . pcicr ( ) . write ( |w| unsafe { w. bits ( 0b100 ) } ) ;
65+ dp. exint . pcicr ( ) . write ( |w| unsafe { w. bits ( 0b100 ) } ) ;
6666
6767 // Enable pin change interrupts on PCINT18 which is pin PD2 (= d2)
68- dp. EXINT . pcmsk2 ( ) . write ( |w| w. set ( 0b100 ) ) ;
68+ dp. exint . pcmsk2 ( ) . write ( |w| w. set ( 0b100 ) ) ;
6969
7070 let ir = Receiver :: with_pin ( Clock :: FREQ , pins. d2 ) ;
7171
@@ -130,7 +130,7 @@ struct Clock {
130130
131131impl Clock {
132132 const FREQ : u32 = 20_000 ;
133- const PRESCALER : CS0_A = CS0_A :: PRESCALE_8 ;
133+ const PRESCALER : Cs0 = Cs0 :: Prescale8 ;
134134 const TOP : u8 = 99 ;
135135
136136 pub const fn new ( ) -> Clock {
@@ -139,7 +139,7 @@ impl Clock {
139139 }
140140 }
141141
142- pub fn start ( & self , tc0 : arduino_hal:: pac:: TC0 ) {
142+ pub fn start ( & self , tc0 : arduino_hal:: pac:: Tc0 ) {
143143 // Configure the timer for the above interval (in CTC mode)
144144 tc0. tccr0a ( ) . write ( |w| w. wgm0 ( ) . ctc ( ) ) ;
145145 tc0. ocr0a ( ) . write ( |w| w. set ( Self :: TOP ) ) ;
0 commit comments