@@ -370,7 +370,7 @@ fn main() -> ! {
370370 reset_dma_engine ( & mut pp) ;
371371
372372 // Reset the spinlocks.
373- pp. SIO . spinlock [ 31 ] . reset ( ) ;
373+ pp. SIO . spinlock ( 31 ) . reset ( ) ;
374374
375375 paint_stacks ( ) ;
376376 check_stacks ( ) ;
@@ -539,14 +539,16 @@ fn stuff_running(p: &mut pac::Peripherals) -> bool {
539539 // Look at scratch register 7 and see what we left ourselves. If it's zero,
540540 // this was a full clean boot-up. If it's 0xDEADC0DE, this means we were
541541 // running and Core 0 restarted without restarting everything else.
542- let scratch = p. WATCHDOG . scratch7 . read ( ) . bits ( ) ;
542+ let scratch = p. WATCHDOG . scratch7 ( ) . read ( ) . bits ( ) ;
543543 defmt:: info!( "WD Scratch is 0x{:08x}" , scratch) ;
544544 if scratch == 0xDEADC0DE {
545545 // we need a hard reset
546546 true
547547 } else {
548548 // set the marker so we know Core 0 has booted up
549- p. WATCHDOG . scratch7 . write ( |w| unsafe { w. bits ( 0xDEADC0DE ) } ) ;
549+ p. WATCHDOG
550+ . scratch7 ( )
551+ . write ( |w| unsafe { w. bits ( 0xDEADC0DE ) } ) ;
550552 false
551553 }
552554}
@@ -555,12 +557,11 @@ fn stuff_running(p: &mut pac::Peripherals) -> bool {
555557/// next boot.
556558fn clear_scratch ( ) {
557559 let p = unsafe { pac:: Peripherals :: steal ( ) } ;
558- p. WATCHDOG . scratch7 . write ( |w| unsafe { w. bits ( 0 ) } ) ;
560+ p. WATCHDOG . scratch7 ( ) . write ( |w| unsafe { w. bits ( 0 ) } ) ;
559561}
560562
561563/// Do a full watchdog reboot
562564fn watchdog_reboot ( ) -> ! {
563- use embedded_hal:: watchdog:: WatchdogEnable ;
564565 clear_scratch ( ) ;
565566 if let Some ( hw) = HARDWARE . lock ( ) . as_mut ( ) {
566567 hw. watchdog
@@ -730,10 +731,10 @@ fn paint_stacks() {
730731
731732/// Reset the DMA Peripheral.
732733fn reset_dma_engine ( pp : & mut pac:: Peripherals ) {
733- pp. RESETS . reset . modify ( |_r, w| w. dma ( ) . set_bit ( ) ) ;
734+ pp. RESETS . reset ( ) . modify ( |_r, w| w. dma ( ) . set_bit ( ) ) ;
734735 cortex_m:: asm:: nop ( ) ;
735- pp. RESETS . reset . modify ( |_r, w| w. dma ( ) . clear_bit ( ) ) ;
736- while pp. RESETS . reset_done . read ( ) . dma ( ) . bit_is_clear ( ) { }
736+ pp. RESETS . reset ( ) . modify ( |_r, w| w. dma ( ) . clear_bit ( ) ) ;
737+ while pp. RESETS . reset_done ( ) . read ( ) . dma ( ) . bit_is_clear ( ) { }
737738}
738739
739740/// Measure how much stack space remains unused.
@@ -843,7 +844,7 @@ impl Hardware {
843844 // pin 25 to track render loop timing. This avoids trying to 'move' the pin
844845 // over to Core 1.
845846 let _pico_led = hal_pins. gpio25 . into_push_pull_output ( ) ;
846- let raw_i2c = hal:: i2c:: I2C :: i2c1 (
847+ let raw_i2c = hal:: i2c:: I2C :: i2c1_with_external_pull_up (
847848 i2c,
848849 {
849850 let mut pin = hal_pins. gpio14 . reconfigure ( ) ;
0 commit comments