fix(src/main.rs): Adapted to current GPIO control access
This commit is contained in:
		
							parent
							
								
									c8db96ab67
								
							
						
					
					
						commit
						e9db0ea4e5
					
				| @ -94,9 +94,11 @@ fn main() -> ! { | |||||||
| 
 | 
 | ||||||
|     init(p.RESETS, p.WATCHDOG, p.CLOCKS, p.XOSC, p.PLL_SYS, p.PLL_USB); |     init(p.RESETS, p.WATCHDOG, p.CLOCKS, p.XOSC, p.PLL_SYS, p.PLL_USB); | ||||||
| 
 | 
 | ||||||
|  |     let led_pin = 25; | ||||||
|  | 
 | ||||||
|     loop { |     loop { | ||||||
|         info!("on!"); |         info!("on!"); | ||||||
|         p.IO_BANK0.gpio25_ctrl.write(|w| { |         p.IO_BANK0.gpio[led_pin].gpio_ctrl.write(|w| { | ||||||
|             w.oeover().enable(); |             w.oeover().enable(); | ||||||
|             w.outover().high(); |             w.outover().high(); | ||||||
|             w |             w | ||||||
| @ -105,7 +107,7 @@ fn main() -> ! { | |||||||
|         cortex_m::asm::delay(1_000_000); |         cortex_m::asm::delay(1_000_000); | ||||||
| 
 | 
 | ||||||
|         info!("off!"); |         info!("off!"); | ||||||
|         p.IO_BANK0.gpio25_ctrl.write(|w| { |         p.IO_BANK0.gpio[led_pin].gpio_ctrl.write(|w| { | ||||||
|             w.oeover().enable(); |             w.oeover().enable(); | ||||||
|             w.outover().low(); |             w.outover().low(); | ||||||
|             w |             w | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user