pub struct EspControlPins<CS, GPIO0, RESETN, ACK> {
pub cs: CS,
pub gpio0: GPIO0,
pub resetn: RESETN,
pub ack: ACK,
}
Expand description
A structured representation of all GPIO pins that control a ESP32-WROOM NINA firmware-based
device outside of commands sent over the SPI/I²C bus. Pass a single instance of this struct
into Wifi::init()
.
Fields§
§cs: CS
Chip select pin to let the NINA firmware know we’re going to send it a command over the SPI bus.
gpio0: GPIO0
Puts the ESP32 WiFi target into bootloading mode. Or if acting as a server, provides a status line for when data is ready to be read.
resetn: RESETN
Places the ESP32 WiFi target into reset mode. Useful for when the target gets into a stuck state.
ack: ACK
Is the ESP32 WiFi target busy?
Trait Implementations§
Source§impl<CS, GPIO0, RESETN, ACK> EspControlInterface for EspControlPins<CS, GPIO0, RESETN, ACK>
impl<CS, GPIO0, RESETN, ACK> EspControlInterface for EspControlPins<CS, GPIO0, RESETN, ACK>
Source§fn init(&mut self)
fn init(&mut self)
Initializes all controls pins to set ready communication with the NINA firmware.
Source§fn reset<D: DelayMs<u16>>(&mut self, delay: &mut D)
fn reset<D: DelayMs<u16>>(&mut self, delay: &mut D)
Resets communication with the NINA firmware.
Source§fn esp_select(&mut self)
fn esp_select(&mut self)
Tells the NINA firmware we’re about to send it a protocol command.
Source§fn esp_deselect(&mut self)
fn esp_deselect(&mut self)
Tells the NINA firmware we’re done sending it a protocol command.
Source§fn get_esp_ready(&self) -> bool
fn get_esp_ready(&self) -> bool
Is the NINA firmware ready to send it a protocol command?
Source§fn get_esp_ack(&self) -> bool
fn get_esp_ack(&self) -> bool
Is the NINA firmware ready to receive more commands? Also referred to as BUSY.
Source§fn wait_for_esp_ready(&self)
fn wait_for_esp_ready(&self)
Blocking waits for the NINA firmware to be ready to send it a protocol command.
Source§fn wait_for_esp_ack(&self)
fn wait_for_esp_ack(&self)
Blocking waits for the NINA firmware to acknowledge it’s ready to receive more commands.
Source§fn wait_for_esp_select(&mut self)
fn wait_for_esp_select(&mut self)
Blocking waits for the NINA firmware to be ready to send it a protocol command.
Auto Trait Implementations§
impl<CS, GPIO0, RESETN, ACK> Freeze for EspControlPins<CS, GPIO0, RESETN, ACK>
impl<CS, GPIO0, RESETN, ACK> RefUnwindSafe for EspControlPins<CS, GPIO0, RESETN, ACK>
impl<CS, GPIO0, RESETN, ACK> Send for EspControlPins<CS, GPIO0, RESETN, ACK>
impl<CS, GPIO0, RESETN, ACK> Sync for EspControlPins<CS, GPIO0, RESETN, ACK>
impl<CS, GPIO0, RESETN, ACK> Unpin for EspControlPins<CS, GPIO0, RESETN, ACK>
impl<CS, GPIO0, RESETN, ACK> UnwindSafe for EspControlPins<CS, GPIO0, RESETN, ACK>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more