Skip to content

Commit

Permalink
remove the radio macros
Browse files Browse the repository at this point in the history
  • Loading branch information
MabezDev committed Sep 6, 2023
1 parent 97d7d0b commit 6f3fdc0
Show file tree
Hide file tree
Showing 56 changed files with 55 additions and 107 deletions.
2 changes: 1 addition & 1 deletion examples-esp32/examples/access_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Ap, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32/examples/async_ble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ fn main() -> ! {
)
.unwrap();

let bluetooth = examples_util::get_bluetooth!(peripherals);
let (_, bluetooth, ..) = peripherals.RADIO.split();

let timer_group0 = TimerGroup::new(
peripherals.TIMG0,
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32/examples/ble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn main() -> ! {

let mut debounce_cnt = 500;

let mut bluetooth = examples_util::get_bluetooth!(peripherals);
let (_, mut bluetooth, ..) = peripherals.RADIO.split();

loop {
let connector = BleConnector::new(&init, &mut bluetooth);
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32/examples/coex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn main() -> ! {
)
.unwrap();

let (wifi, bluetooth) = examples_util::get_wifi_bluetooth!(peripherals);
let (wifi, bluetooth, ..) = peripherals.RADIO.split();

let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32/examples/dhcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Sta, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32/examples/embassy_access_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let (wifi_interface, controller) =
esp_wifi::wifi::new_with_mode(&init, wifi, WifiMode::Ap).unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32/examples/embassy_dhcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let (wifi_interface, controller) =
esp_wifi::wifi::new_with_mode(&init, wifi, WifiMode::Sta).unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32/examples/embassy_esp_now.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let esp_now = esp_wifi::esp_now::EspNow::new(&init, wifi).unwrap();
println!("esp-now version {}", esp_now.get_version().unwrap());

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32/examples/esp_now.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let esp_now = esp_wifi::esp_now::EspNow::new(&init, wifi).unwrap();

println!("esp-now version {}", esp_now.get_version().unwrap());
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32/examples/static_ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Sta, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c2/examples/access_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Ap, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c2/examples/async_ble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fn main() -> ! {
)
.unwrap();

let bluetooth = examples_util::get_bluetooth!(peripherals);
let (_, bluetooth, ..) = peripherals.RADIO.split();

let timer_group0 = TimerGroup::new(
peripherals.TIMG0,
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c2/examples/ble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn main() -> ! {

let mut debounce_cnt = 500;

let mut bluetooth = examples_util::get_bluetooth!(peripherals);
let (_, mut bluetooth, ..) = peripherals.RADIO.split();

loop {
let connector = BleConnector::new(&init, &mut bluetooth);
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c2/examples/dhcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Sta, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c2/examples/embassy_access_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let (wifi_interface, controller) =
esp_wifi::wifi::new_with_mode(&init, wifi, WifiMode::Ap).unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c2/examples/embassy_dhcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let (wifi_interface, controller) =
esp_wifi::wifi::new_with_mode(&init, wifi, WifiMode::Sta).unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c2/examples/embassy_esp_now.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let esp_now = esp_wifi::esp_now::EspNow::new(&init, wifi).unwrap();
println!("esp-now version {}", esp_now.get_version().unwrap());

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c2/examples/esp_now.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let esp_now = esp_wifi::esp_now::EspNow::new(&init, wifi).unwrap();

println!("esp-now version {}", esp_now.get_version().unwrap());
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c2/examples/static_ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Sta, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c3/examples/access_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Ap, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c3/examples/async_ble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fn main() -> ! {
)
.unwrap();

let bluetooth = examples_util::get_bluetooth!(peripherals);
let (_, bluetooth, ..) = peripherals.RADIO.split();

let timer_group0 = TimerGroup::new(
peripherals.TIMG0,
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c3/examples/ble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn main() -> ! {

let mut debounce_cnt = 500;

let mut bluetooth = examples_util::get_bluetooth!(peripherals);
let (_, mut bluetooth, ..) = peripherals.RADIO.split();

loop {
let connector = BleConnector::new(&init, &mut bluetooth);
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c3/examples/coex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn main() -> ! {
)
.unwrap();

let (wifi, bluetooth) = examples_util::get_wifi_bluetooth!(peripherals);
let (wifi, bluetooth, ..) = peripherals.RADIO.split();

let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c3/examples/dhcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Sta, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c3/examples/embassy_access_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let (wifi_interface, controller) =
esp_wifi::wifi::new_with_mode(&init, wifi, WifiMode::Ap).unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c3/examples/embassy_dhcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let (wifi_interface, controller) =
esp_wifi::wifi::new_with_mode(&init, wifi, WifiMode::Sta).unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c3/examples/embassy_esp_now.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let esp_now = esp_wifi::esp_now::EspNow::new(&init, wifi).unwrap();
println!("esp-now version {}", esp_now.get_version().unwrap());

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c3/examples/esp_now.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let esp_now = esp_wifi::esp_now::EspNow::new(&init, wifi).unwrap();

println!("esp-now version {}", esp_now.get_version().unwrap());
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c3/examples/static_ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Sta, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c6/examples/access_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Ap, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c6/examples/async_ble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fn main() -> ! {
)
.unwrap();

let bluetooth = examples_util::get_bluetooth!(peripherals);
let (_, bluetooth, ..) = peripherals.RADIO.split();

let timer_group0 = TimerGroup::new(
peripherals.TIMG0,
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c6/examples/ble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn main() -> ! {

let mut debounce_cnt = 500;

let mut bluetooth = examples_util::get_bluetooth!(peripherals);
let (_, mut bluetooth, ..) = peripherals.RADIO.split();

loop {
let connector = BleConnector::new(&init, &mut bluetooth);
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c6/examples/dhcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Sta, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c6/examples/embassy_access_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let (wifi_interface, controller) =
esp_wifi::wifi::new_with_mode(&init, wifi, WifiMode::Ap).unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c6/examples/embassy_dhcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let (wifi_interface, controller) =
esp_wifi::wifi::new_with_mode(&init, wifi, WifiMode::Sta).unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c6/examples/embassy_esp_now.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let esp_now = esp_wifi::esp_now::EspNow::new(&init, wifi).unwrap();
println!("esp-now version {}", esp_now.get_version().unwrap());

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c6/examples/esp_now.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let esp_now = esp_wifi::esp_now::EspNow::new(&init, wifi).unwrap();

println!("esp-now version {}", esp_now.get_version().unwrap());
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32c6/examples/static_ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let (wifi, ..) = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Sta, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32s2/examples/access_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let wifi = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Ap, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32s2/examples/dhcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let wifi = peripherals.RADIO.split();
let mut socket_set_entries: [SocketStorage; 3] = Default::default();
let (iface, device, mut controller, sockets) =
create_network_interface(&init, wifi, WifiMode::Sta, &mut socket_set_entries).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples-esp32s2/examples/embassy_access_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let wifi = peripherals.RADIO.split();
let (wifi_interface, controller) =
esp_wifi::wifi::new_with_mode(&init, wifi, WifiMode::Ap).unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32s2/examples/embassy_dhcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let wifi = peripherals.RADIO.split();
let (wifi_interface, controller) =
esp_wifi::wifi::new_with_mode(&init, wifi, WifiMode::Sta).unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32s2/examples/embassy_esp_now.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let wifi = peripherals.RADIO.split();
let esp_now = esp_wifi::esp_now::EspNow::new(&init, wifi).unwrap();
println!("esp-now version {}", esp_now.get_version().unwrap());

Expand Down
2 changes: 1 addition & 1 deletion examples-esp32s2/examples/esp_now.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn main() -> ! {
)
.unwrap();

let wifi = examples_util::get_wifi!(peripherals);
let wifi = peripherals.RADIO.split();
let esp_now = esp_wifi::esp_now::EspNow::new(&init, wifi).unwrap();

println!("esp-now version {}", esp_now.get_version().unwrap());
Expand Down
Loading

0 comments on commit 6f3fdc0

Please sign in to comment.