pub struct BlueNRG<'buf, SPI, OutputPin1, OutputPin2, InputPin> { /* fields omitted */ }
Handle for interfacing with the BlueNRG-MS.
impl<'buf, SPI, OutputPin1, OutputPin2, InputPin> BlueNRG<'buf, SPI, OutputPin1, OutputPin2, InputPin> where OutputPin1: OutputPin, OutputPin2: OutputPin, InputPin: InputPin, | [src] |
pub fn new( rx_buffer: &'buf mut [u8], cs: OutputPin1, dr: InputPin, rst: OutputPin2 ) -> BlueNRG<'buf, SPI, OutputPin1, OutputPin2, InputPin> | [src] |
Returns a new BlueNRG struct with the given RX Buffer and pins. Resets the controller.
pub fn with_spi<'spi, T, F, E>(&mut self, spi: &'spi mut SPI, body: F) -> T where F: FnOnce(&mut ActiveBlueNRG<SPI, OutputPin1, OutputPin2, InputPin>) -> T, SPI: Default<u8, Error = E> + Default<u8, Error = E>, | [src] |
Invokes the given body function with an ActiveBlueNRG that uses this BlueNRG struct and the
provided SPI bus handle.
Returns the result of the invoked body.
Resets the BlueNRG Controller. Uses the given timer to delay 1 cycle at freq
Hz after
toggling the reset pin.
impl<'buf, SPI, OutputPin1, OutputPin2, InputPin> Send for BlueNRG<'buf, SPI, OutputPin1, OutputPin2, InputPin> where InputPin: Send, OutputPin1: Send, OutputPin2: Send, SPI: Send, | |
impl<'buf, SPI, OutputPin1, OutputPin2, InputPin> Sync for BlueNRG<'buf, SPI, OutputPin1, OutputPin2, InputPin> where InputPin: Sync, OutputPin1: Sync, OutputPin2: Sync, SPI: Sync, | |