From e9db0ea4e59b1f01566a5cf56f3d6904dcc34904 Mon Sep 17 00:00:00 2001 From: Dominik Tacke Date: Fri, 12 Feb 2021 22:04:06 +0100 Subject: [PATCH] fix(src/main.rs): Adapted to current GPIO control access --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index d2b0546..e500874 100644 --- a/src/main.rs +++ b/src/main.rs @@ -94,9 +94,11 @@ fn main() -> ! { init(p.RESETS, p.WATCHDOG, p.CLOCKS, p.XOSC, p.PLL_SYS, p.PLL_USB); + let led_pin = 25; + loop { info!("on!"); - p.IO_BANK0.gpio25_ctrl.write(|w| { + p.IO_BANK0.gpio[led_pin].gpio_ctrl.write(|w| { w.oeover().enable(); w.outover().high(); w @@ -105,7 +107,7 @@ fn main() -> ! { cortex_m::asm::delay(1_000_000); info!("off!"); - p.IO_BANK0.gpio25_ctrl.write(|w| { + p.IO_BANK0.gpio[led_pin].gpio_ctrl.write(|w| { w.oeover().enable(); w.outover().low(); w