Struct rn4870::Rn4870 [−][src]
pub struct Rn4870<RX, TX, NRST> { /* fields omitted */ }
Expand description
Rn4870 Object
Implementations
impl<RX, TX, NRST, EW, ER, GpioError> Rn4870<RX, TX, NRST> where
RX: Read<u8, Error = ER>,
TX: Write<u8, Error = EW>,
NRST: OutputPin<Error = GpioError>,
[src]
impl<RX, TX, NRST, EW, ER, GpioError> Rn4870<RX, TX, NRST> where
RX: Read<u8, Error = ER>,
TX: Write<u8, Error = EW>,
NRST: OutputPin<Error = GpioError>,
[src]pub fn hard_reset<DELAY: DelayMs<u16>>(
&mut self,
delay: &mut DELAY
) -> Result<(), Error<ER, EW, GpioError>>
[src]
pub fn hard_reset<DELAY: DelayMs<u16>>(
&mut self,
delay: &mut DELAY
) -> Result<(), Error<ER, EW, GpioError>>
[src]Reset the RN4870 module
Note that this must be done before the RN4870 will start responding to serial commands.
pub fn handle_error<T: Fn(&mut RX, &mut TX)>(&mut self, func: T)
[src]
pub fn handle_error<T: Fn(&mut RX, &mut TX)>(&mut self, func: T)
[src]Escape hatch for handling hardware errors
Until the embedded_hal
traits include error handling there
is no device-agnostic way to deal with hardware errors. This is
an escape hatch to allow users to access the UART peripheral.
pub fn enter_cmd_mode(&mut self) -> Result<(), Error<ER, EW, GpioError>>
[src]
pub fn enter_cmd_mode(&mut self) -> Result<(), Error<ER, EW, GpioError>>
[src]Enter Command Mode
pub fn enter_data_mode(&mut self) -> Result<(), Error<ER, EW, GpioError>>
[src]
pub fn enter_data_mode(&mut self) -> Result<(), Error<ER, EW, GpioError>>
[src]Enter Data Mode
pub fn soft_reset(&mut self) -> Result<(), Error<ER, EW, GpioError>>
[src]
pub fn soft_reset(&mut self) -> Result<(), Error<ER, EW, GpioError>>
[src]Software reset, see section 2.6.28 of the User Guide (DS50002466C)
pub fn set_serialized_name(
&mut self,
name: &str
) -> Result<(), Error<ER, EW, GpioError>>
[src]
pub fn set_serialized_name(
&mut self,
name: &str
) -> Result<(), Error<ER, EW, GpioError>>
[src]Sets a serialized Bluetooth name for the device
This function only works when in Command Mode.
pub fn set_name(&mut self, name: &str) -> Result<(), Error<ER, EW, GpioError>>
[src]
pub fn set_name(&mut self, name: &str) -> Result<(), Error<ER, EW, GpioError>>
[src]Sets the device name
This function only works when in Command Mode.
pub fn set_firmware_revision(
&mut self,
fw_revision: &str
) -> Result<(), Error<ER, EW, GpioError>>
[src]
&mut self,
fw_revision: &str
) -> Result<(), Error<ER, EW, GpioError>>
pub fn set_hardware_revision(
&mut self,
hw_revision: &str
) -> Result<(), Error<ER, EW, GpioError>>
[src]
&mut self,
hw_revision: &str
) -> Result<(), Error<ER, EW, GpioError>>
pub fn set_software_revision(
&mut self,
sw_revision: &str
) -> Result<(), Error<ER, EW, GpioError>>
[src]
&mut self,
sw_revision: &str
) -> Result<(), Error<ER, EW, GpioError>>
pub fn set_model_name(
&mut self,
model_name: &str
) -> Result<(), Error<ER, EW, GpioError>>
[src]
&mut self,
model_name: &str
) -> Result<(), Error<ER, EW, GpioError>>
pub fn set_manufacturer_name(
&mut self,
manufacturer_name: &str
) -> Result<(), Error<ER, EW, GpioError>>
[src]
&mut self,
manufacturer_name: &str
) -> Result<(), Error<ER, EW, GpioError>>
pub fn set_serial_number(
&mut self,
serial_number: &str
) -> Result<(), Error<ER, EW, GpioError>>
[src]
&mut self,
serial_number: &str
) -> Result<(), Error<ER, EW, GpioError>>
pub fn set_services(
&mut self,
value: Services
) -> Result<(), Error<ER, EW, GpioError>>
[src]
pub fn set_services(
&mut self,
value: Services
) -> Result<(), Error<ER, EW, GpioError>>
[src]Set default services
pub fn start_bonding(&mut self) -> Result<(), Error<ER, EW, GpioError>>
[src]
pub fn send_raw(&mut self, values: &[u8]) -> Result<(), EW>
[src]
pub fn read_raw(&mut self) -> Result<u8, ER>
[src]
Auto Trait Implementations
impl<RX, TX, NRST> Send for Rn4870<RX, TX, NRST> where
NRST: Send,
RX: Send,
TX: Send,
NRST: Send,
RX: Send,
TX: Send,
impl<RX, TX, NRST> Sync for Rn4870<RX, TX, NRST> where
NRST: Sync,
RX: Sync,
TX: Sync,
NRST: Sync,
RX: Sync,
TX: Sync,
impl<RX, TX, NRST> Unpin for Rn4870<RX, TX, NRST> where
NRST: Unpin,
RX: Unpin,
TX: Unpin,
NRST: Unpin,
RX: Unpin,
TX: Unpin,