Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature to opt-in the Badger2040W wiring that uses GPIO 22 for the LED #97

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = []
2 changes: 1 addition & 1 deletion boards/pimoroni_badger2040/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ then try repeating the `cargo run` command above.

### [badger_blinky](./examples/badger_blinky.rs)

Flashes the Badger2040's activity LED on and off.
Flashes the Badger2040's activity LED on and off. Use `--features=wifi` to run the Badger2040W version.

## Contributing

Expand Down
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
1 change: 0 additions & 1 deletion boards/rp-pico/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ extern crate cortex_m_rt;
/// loop {}
/// }
/// ```

#[cfg(feature = "rt")]
pub use hal::entry;

Expand Down
Loading