docs.rs failed to build drogue-es-wifi-0.1.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
drogue-es-wifi
Driver for the Inventek eS-WiFi SPI WiFi offload board.
Usage
The eS-WiFi board is interfaced over an SPI peripheral, plus a handful of additional pins:
- SPI
- SCK
- CIPO
- COPI
- chip-select
- ready
- wake-up
- reset
Pins
Gather and configure your SPI and non-SPI pins appropriately for your particular chipset:
let sck = gpioc.pc10.into_af6;
let cipo = gpioc.pc11.into_af6;
let copi = gpioc.pc12.into_af6;
let mut cs = gpioe.pe0.into_push_pull_output;
let mut ready = gpioe.pe1.into_pull_up_input;
let mut reset = gpioe.pe8.into_push_pull_output;
let mut wakeup = gpiob.pb13.into_push_pull_output;
let mut spi = spi3;
Clock
An embedded-time Clock is required in order to provide appropriate delays and timeouts.
The drogue-embedded-timer crate provides utilities and instructions for managing clocks.
Initialization
One the SPI peripheral and additional pins and clock are initialized, you can initialize the WiFi adapter:
let wifi = new.unwrap;
Join an access point
The &CLOCK must be ticking forward prior to using the adapter.
To join a WEP-secured access-point:
let response = wifi.join_wep;
TCP connections
The adapter directly implements the drogue-network TcpStack:
let remote = new;
let mut socket = wifi.open.unwrap;
let mut socket = wifi.connect.unwrap;
let len = wifi.write.unwrap;
loop
wifi.close.unwrap;