Skip to content

Commit db3eb3d

Browse files
authored
Remove hand-defined radio symbols (#3632)
1 parent f22ddb4 commit db3eb3d

File tree

10 files changed

+18
-27
lines changed

10 files changed

+18
-27
lines changed

esp-metadata/devices/esp32.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ symbols = [
6666
"dac",
6767
"pdma",
6868
"phy",
69-
"bt",
70-
"wifi",
7169
"psram",
7270
"timg_timer1",
7371
"touch",

esp-metadata/devices/esp32c2.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ symbols = [
4646
"assist_debug_sp_monitor",
4747
"gdma",
4848
"phy",
49-
"bt",
50-
"wifi",
5149

5250
# ROM capabilities
5351
"rom_crc_le",

esp-metadata/devices/esp32c3.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ symbols = [
5959
"assist_debug_region_monitor",
6060
"gdma",
6161
"phy",
62-
"bt",
63-
"wifi",
6462
"tsens",
6563

6664
# ROM capabilities

esp-metadata/devices/esp32c6.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ symbols = [
8686
"large_intr_status",
8787
"plic",
8888
"phy",
89-
"bt",
90-
"wifi",
91-
"wifi6",
92-
"ieee802154",
9389
"lp_core",
9490
"tsens",
9591

@@ -141,6 +137,10 @@ status = "supported"
141137
[device.ds]
142138
status = "not_supported"
143139

140+
[device.wifi]
141+
status = "partial"
142+
has_wifi6 = true
143+
144144
# Other drivers which are partially supported but have no other configuration:
145145

146146
## Crypto
@@ -176,6 +176,5 @@ status = "not_supported"
176176
[device.ulp_riscv]
177177

178178
## Radio
179-
[device.wifi]
180179
[device.bt]
181180
[device.ieee802154]

esp-metadata/devices/esp32h2.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ symbols = [
7777
"gdma",
7878
"plic",
7979
"phy",
80-
"bt",
8180
"ieee802154",
8281

8382
# ROM capabilities

esp-metadata/devices/esp32s2.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ symbols = [
6262
"dac",
6363
"pdma",
6464
"phy",
65-
"wifi",
6665
"psram",
6766
"psram_dma",
6867
"ulp_riscv_core",

esp-metadata/devices/esp32s3.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ symbols = [
7575
"assist_debug_region_monitor",
7676
"gdma",
7777
"phy",
78-
"bt",
79-
"wifi",
8078
"psram",
8179
"psram_dma",
8280
"octal_psram",

esp-metadata/src/generate_cfg.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,10 @@ driver_configs![
668668
driver: wifi,
669669
name: "WIFI",
670670
peripherals: &["wifi"],
671-
properties: {}
671+
properties: {
672+
#[serde(default)]
673+
has_wifi6: bool,
674+
}
672675
},
673676
BluetoothProperties {
674677
driver: bt,

esp-wifi/build.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,6 @@ fn main() -> Result<(), Box<dyn Error>> {
2727
2828
"#
2929
);
30-
assert!(
31-
!cfg!(feature = "coex") || (config.contains("wifi") && config.contains("bt")),
32-
r#"
33-
34-
COEX is not supported on this target.
35-
36-
See https://github.com/esp-rs/esp-wifi/issues/92.
37-
38-
"#
39-
);
4030

4131
if let Ok(level) = std::env::var("OPT_LEVEL") {
4232
if level != "2" && level != "3" && level != "s" {
@@ -51,6 +41,15 @@ fn main() -> Result<(), Box<dyn Error>> {
5141
println!("cargo:rustc-check-cfg=cfg(coex)");
5242
#[cfg(feature = "coex")]
5343
{
44+
assert!(
45+
config.contains("wifi") && config.contains("bt"),
46+
r#"
47+
48+
WiFi/Bluetooth coexistence is not supported on this target.
49+
50+
"#
51+
);
52+
5453
#[cfg(all(feature = "wifi", feature = "ble"))]
5554
println!("cargo:rustc-cfg=coex");
5655

esp-wifi/src/wifi/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl_wifi_event!(ApWpsRgTimeout);
132132
impl_wifi_event!(ApWpsRgPin, wifi_event_ap_wps_rg_pin_t);
133133
impl_wifi_event!(ApWpsRgPbcOverlap);
134134
cfg_if::cfg_if! {
135-
if #[cfg(wifi6)] {
135+
if #[cfg(wifi_has_wifi6)] {
136136
impl_wifi_event!(ItwtSetup, wifi_event_sta_itwt_setup_t);
137137
impl_wifi_event!(ItwtTeardown, wifi_event_sta_itwt_teardown_t);
138138
impl_wifi_event!(ItwtProbe, wifi_event_sta_itwt_probe_t);

0 commit comments

Comments
 (0)