Skip to content

Commit

Permalink
Support COEX (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernQ authored Nov 26, 2024
1 parent b1fd7fd commit dd10238
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Changed
- Allow selecting WiFi and BLE at the same time

### Fixed
- Don't deselect just selected option
Expand Down
9 changes: 2 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static OPTIONS: &[GeneratorOptionItem] = &[
name: "wifi",
display_name: "Enables Wi-Fi via the `esp-wifi` crate. Requires `alloc`.",
enables: &["alloc"],
disables: &["ble"],
disables: &[],
chips: &[
Chip::Esp32,
Chip::Esp32c2,
Expand All @@ -111,7 +111,7 @@ static OPTIONS: &[GeneratorOptionItem] = &[
name: "ble",
display_name: "Enables BLE via the `esp-wifi` crate. Requires `alloc`.",
enables: &["alloc"],
disables: &["wifi"],
disables: &[],
chips: &[
Chip::Esp32,
Chip::Esp32c2,
Expand Down Expand Up @@ -441,11 +441,6 @@ fn process_options(args: &Args) {
}
}
}

if args.option.contains(&String::from("ble")) && args.option.contains(&String::from("wifi")) {
log::error!("Options 'ble' and 'wifi' are mutually exclusive");
process::exit(-1);
}
}

fn should_initialize_git_repo(mut path: &Path) -> bool {
Expand Down
4 changes: 4 additions & 0 deletions template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ esp-wifi = { version = "0.11.0", default-features=false, features = [
#IF option("ble")
"ble",
#ENDIF
#IF option("wifi") && option("ble")
"coex",
#ENDIF
"esp-alloc",
#IF option("probe-rs")
#+"defmt",
Expand Down Expand Up @@ -92,6 +95,7 @@ embassy-time = { version = "0.3.1", features = ["generic-queue-8"] }
esp-hal-embassy = { version = "0.5.0", features = ["esp32c6"] }
static_cell = { version = "2.1.0", features = ["nightly"] }
#ENDIF
critical-section = "1.2.0"

[profile.dev]
# Rust debug is too slow.
Expand Down

0 comments on commit dd10238

Please sign in to comment.