[−][src]Struct drogue_rak811::Rak811Driver
Implementations
impl<W, R, RST> Rak811Driver<W, R, RST> where
W: Write<u8>,
R: Read<u8>,
RST: OutputPin,
[src]
W: Write<u8>,
R: Read<u8>,
RST: OutputPin,
pub fn new(
tx: W,
rx: R,
rst: RST
) -> Result<Rak811Driver<W, R, RST>, DriverError>
[src]
tx: W,
rx: R,
rst: RST
) -> Result<Rak811Driver<W, R, RST>, DriverError>
Create a new instance of the driver. The driver will trigger a reset of the module and expect a response from the firmware.
pub fn initialize(&mut self) -> Result<(), DriverError>
[src]
Initialize the driver. This will cause the RAK811 module to be reset.
pub fn reset(&mut self, mode: ResetMode) -> Result<(), DriverError>
[src]
Send reset command to lora module. Depending on the mode, this will restart the module or reload its configuration from EEPROM.
pub fn join(&mut self, mode: ConnectMode) -> Result<(), DriverError>
[src]
Join a LoRa Network using the specified mode.
pub fn set_band(&mut self, band: LoraRegion) -> Result<(), DriverError>
[src]
Set the frequency band based on the region.
pub fn set_mode(&mut self, mode: LoraMode) -> Result<(), DriverError>
[src]
Set the mode of operation, peer to peer or network mode.
pub fn set_device_address(&mut self, addr: &DevAddr) -> Result<(), DriverError>
[src]
pub fn set_device_eui(&mut self, eui: &EUI) -> Result<(), DriverError>
[src]
pub fn set_app_eui(&mut self, eui: &EUI) -> Result<(), DriverError>
[src]
pub fn set_app_key(&mut self, key: &AppKey) -> Result<(), DriverError>
[src]
pub fn send(
&mut self,
qos: QoS,
port: Port,
data: &[u8]
) -> Result<(), DriverError>
[src]
&mut self,
qos: QoS,
port: Port,
data: &[u8]
) -> Result<(), DriverError>
Transmit data using the specified confirmation mode and given port.
pub fn try_recv(
&mut self,
port: Port,
rx_buf: &mut [u8]
) -> Result<usize, DriverError>
[src]
&mut self,
port: Port,
rx_buf: &mut [u8]
) -> Result<usize, DriverError>
Poll for any received data and copy it to the provided buffer. If data have been received, the length of the data is returned.
pub fn process(&mut self) -> Result<(), DriverError>
[src]
Attempt to read data from UART and store it in the parse buffer. This should be invoked whenever data should be read.
pub fn digest(&mut self) -> Result<(), DriverError>
[src]
Attempt to parse the internal buffer and enqueue any response data found.
pub fn send_command(
&mut self,
command: Command<'_>
) -> Result<Response, DriverError>
[src]
&mut self,
command: Command<'_>
) -> Result<Response, DriverError>
Send an AT command to the lora module and await a response.
Auto Trait Implementations
impl<W, R, RST> Send for Rak811Driver<W, R, RST> where
R: Send,
RST: Send,
W: Send,
[src]
R: Send,
RST: Send,
W: Send,
impl<W, R, RST> !Sync for Rak811Driver<W, R, RST>
[src]
impl<W, R, RST> Unpin for Rak811Driver<W, R, RST> where
R: Unpin,
RST: Unpin,
W: Unpin,
[src]
R: Unpin,
RST: Unpin,
W: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,