mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +00:00
Merge pull request #1622 from embassy-rs/misc-fixes
Downgrade nightly, misc fixes
This commit is contained in:
commit
a77fb0f630
4
ci.sh
4
ci.sh
@ -5,10 +5,6 @@ set -euo pipefail
|
||||
export RUSTFLAGS=-Dwarnings
|
||||
export DEFMT_LOG=trace,embassy_net_esp_hosted=debug,cyw43=info,cyw43_pio=info,smoltcp=info
|
||||
|
||||
# needed by wifi examples
|
||||
export WIFI_NETWORK=x
|
||||
export WIFI_PASSWORD=x
|
||||
|
||||
TARGET=$(rustc -vV | sed -n 's|host: ||p')
|
||||
|
||||
BUILD_EXTRA=""
|
||||
|
@ -30,7 +30,7 @@ TODO:
|
||||
### Example 2: Create an access point (IP and credentials in the code)
|
||||
- `cargo run --release --bin wifi_ap_tcp_server`
|
||||
### Example 3: Connect to an existing network and create a server
|
||||
- `WIFI_NETWORK=MyWifiNetwork WIFI_PASSWORD=MyWifiPassword cargo run --release --bin wifi_tcp_server`
|
||||
- `cargo run --release --bin wifi_tcp_server`
|
||||
|
||||
After a few seconds, you should see that DHCP picks up an IP address like this
|
||||
```
|
||||
|
@ -5,8 +5,8 @@ edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[package.metadata.embassy_docs]
|
||||
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-stm32-wpan-v$VERSION/embassy-stm32-wpan/src"
|
||||
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-stm32-wpan/src"
|
||||
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-stm32-wpan-v$VERSION/embassy-stm32-wpan/src/"
|
||||
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-stm32-wpan/src/"
|
||||
target = "thumbv7em-none-eabihf"
|
||||
features = ["stm32wb55rg"]
|
||||
|
||||
|
@ -16,6 +16,9 @@ use embedded_io::asynch::Write;
|
||||
use static_cell::make_static;
|
||||
use {defmt_rtt as _, embassy_net_esp_hosted as hosted, panic_probe as _};
|
||||
|
||||
const WIFI_NETWORK: &str = "EmbassyTest";
|
||||
const WIFI_PASSWORD: &str = "V8YxhKt5CdIAJFud";
|
||||
|
||||
bind_interrupts!(struct Irqs {
|
||||
SPIM3 => spim::InterruptHandler<peripherals::SPI3>;
|
||||
RNG => embassy_nrf::rng::InterruptHandler<peripherals::RNG>;
|
||||
@ -70,7 +73,7 @@ async fn main(spawner: Spawner) {
|
||||
unwrap!(spawner.spawn(wifi_task(runner)));
|
||||
|
||||
control.init().await;
|
||||
control.join(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await;
|
||||
control.join(WIFI_NETWORK, WIFI_PASSWORD).await;
|
||||
|
||||
let config = embassy_net::Config::dhcpv4(Default::default());
|
||||
// let config = embassy_net::Config::ipv4_static(embassy_net::StaticConfigV4 {
|
||||
|
@ -19,6 +19,9 @@ use embedded_io::asynch::Write;
|
||||
use static_cell::make_static;
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
const WIFI_NETWORK: &str = "EmbassyTest";
|
||||
const WIFI_PASSWORD: &str = "V8YxhKt5CdIAJFud";
|
||||
|
||||
#[embassy_executor::task]
|
||||
async fn wifi_task(
|
||||
runner: cyw43::Runner<'static, Output<'static, PIN_23>, PioSpi<'static, PIN_25, PIO0, 0, DMA_CH0>>,
|
||||
@ -82,8 +85,8 @@ async fn main(spawner: Spawner) {
|
||||
unwrap!(spawner.spawn(net_task(stack)));
|
||||
|
||||
loop {
|
||||
//control.join_open(env!("WIFI_NETWORK")).await;
|
||||
match control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await {
|
||||
//control.join_open(WIFI_NETWORK).await;
|
||||
match control.join_wpa2(WIFI_NETWORK, WIFI_PASSWORD).await {
|
||||
Ok(_) => break,
|
||||
Err(err) => {
|
||||
info!("join failed with status={}", err.status);
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Before upgrading check that everything is available on all tier1 targets here:
|
||||
# https://rust-lang.github.io/rustup-components-history
|
||||
[toolchain]
|
||||
channel = "nightly-2023-07-03"
|
||||
channel = "nightly-2023-06-28"
|
||||
components = [ "rust-src", "rustfmt", "llvm-tools-preview" ]
|
||||
targets = [
|
||||
"thumbv7em-none-eabi",
|
||||
|
Loading…
Reference in New Issue
Block a user