Skip to content

Commit

Permalink
Add feature to opt-in the Badger2040W wiring that uses GPIO 22 for th…
Browse files Browse the repository at this point in the history
…e LED

To see the blinking led on a Badger 2040W, run:

$ cargo run --release --features wifi --example badger_blinky
  • Loading branch information
naufraghi committed Dec 29, 2024
1 parent eaa0b90 commit c2fb350
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions boards/pimoroni_badger2040/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ disable-intrinsics = ["rp2040-hal/disable-intrinsics"]

# This enables ROM functions for f64 math that were not present in the earliest RP2040s
rom-v2-intrinsics = ["rp2040-hal/rom-v2-intrinsics"]

# Define a feature to toggle between Badger2040 and Badger2040W
wifi = []
4 changes: 3 additions & 1 deletion boards/pimoroni_badger2040/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ hal::bsp_pins!(
},
Gpio20 { name: inky_dc },
Gpio21 { name: inky_res },
/// GPIO 22 is connected to activity LED of the badger2040W.
#[cfg(feature = "wifi")] Gpio22 { name: led },
Gpio23 { name: user_sw },
/// GPIO 24 is connected to vbus_detect of the badger2040.
Gpio24 { name: vbus_detect },
/// GPIO 25 is connected to activity LED of the badger2040.
Gpio25 { name: led },
#[cfg(not(feature = "wifi"))] Gpio25 { name: led },
Gpio26 { name: inky_busy },
Gpio27 { name: vref_power },
Gpio28 { name: vref_1v24 },
Expand Down

0 comments on commit c2fb350

Please sign in to comment.