Struct EspControlPins

Source
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 Default for EspControlPins<(), (), (), ()>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<CS, GPIO0, RESETN, ACK> EspControlInterface for EspControlPins<CS, GPIO0, RESETN, ACK>
where CS: OutputPin, GPIO0: OutputPin, RESETN: OutputPin, ACK: InputPin,

Source§

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)

Resets communication with the NINA firmware.
Source§

fn esp_select(&mut self)

Tells the NINA firmware we’re about to send it a protocol command.
Source§

fn esp_deselect(&mut self)

Tells the NINA firmware we’re done sending it a protocol command.
Source§

fn get_esp_ready(&self) -> bool

Is the NINA firmware ready to send it a protocol command?
Source§

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)

Blocking waits for the NINA firmware to be ready to send it a protocol command.
Source§

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)

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>
where CS: Freeze, GPIO0: Freeze, RESETN: Freeze, ACK: Freeze,

§

impl<CS, GPIO0, RESETN, ACK> RefUnwindSafe for EspControlPins<CS, GPIO0, RESETN, ACK>
where CS: RefUnwindSafe, GPIO0: RefUnwindSafe, RESETN: RefUnwindSafe, ACK: RefUnwindSafe,

§

impl<CS, GPIO0, RESETN, ACK> Send for EspControlPins<CS, GPIO0, RESETN, ACK>
where CS: Send, GPIO0: Send, RESETN: Send, ACK: Send,

§

impl<CS, GPIO0, RESETN, ACK> Sync for EspControlPins<CS, GPIO0, RESETN, ACK>
where CS: Sync, GPIO0: Sync, RESETN: Sync, ACK: Sync,

§

impl<CS, GPIO0, RESETN, ACK> Unpin for EspControlPins<CS, GPIO0, RESETN, ACK>
where CS: Unpin, GPIO0: Unpin, RESETN: Unpin, ACK: Unpin,

§

impl<CS, GPIO0, RESETN, ACK> UnwindSafe for EspControlPins<CS, GPIO0, RESETN, ACK>
where CS: UnwindSafe, GPIO0: UnwindSafe, RESETN: UnwindSafe, ACK: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.