Struct esp8266_at_driver::Esp8266Driver
source · pub struct Esp8266Driver<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize>where
T: Read + Write,
ENABLE: OutputPin,
RESET: OutputPin,{ /* private fields */ }
Expand description
Instance of the Esp8266 driver.
Configure MAX_SOCKETS to the max number of connections you expect to be making at the same time.
Implementations§
source§impl<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize> Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS>where
T: Read + Write,
ENABLE: OutputPin,
RESET: OutputPin,
impl<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize> Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS>where
T: Read + Write,
ENABLE: OutputPin,
RESET: OutputPin,
sourcepub fn new(transport: T, enable: ENABLE, reset: RESET) -> Self
pub fn new(transport: T, enable: ENABLE, reset: RESET) -> Self
Create a new instance of the Esp8266 driver using the provided transport. The transport is usually the UART peripheral when used on a microcontroller.
The ENABLE pin is used to enable the adapter. The RESET pin is used to reset the adapter.
Trait Implementations§
source§impl<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize> TcpConnect for Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS>where
T: Read + Write,
ENABLE: OutputPin,
RESET: OutputPin,
impl<'a, T, ENABLE, RESET, const MAX_SOCKETS: usize> TcpConnect for Esp8266Driver<'a, T, ENABLE, RESET, MAX_SOCKETS>where
T: Read + Write,
ENABLE: OutputPin,
RESET: OutputPin,
§type Error = DriverError
type Error = DriverError
Error type returned on connect failure.
§type Connection<'m>
where
Self: 'm = Esp8266Socket<'m, T>
type Connection<'m>
where
Self: 'm = Esp8266Socket<'m, T>
Type holding state of a TCP connection. Should close the connection when dropped.