[][src]Struct bluenrg::ActiveBlueNRG

pub struct ActiveBlueNRG<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, GpioError> { /* fields omitted */ }

Handle for actively communicating with the controller over the SPI bus.

An ActiveBlueNRG should not be created by the application, but is passed to closures given to BlueNRG::with_spi. ActiveBlueNRG implements bluetooth_hci::Controller, so it is used to access the HCI functions for the controller.

Trait Implementations

impl<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, SpiError, GpioError> Commands for ActiveBlueNRG<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, GpioError> where
    SPI: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
    OutputPin1: OutputPin<Error = GpioError>,
    OutputPin2: OutputPin<Error = GpioError>,
    InputPin: InputPin<Error = GpioError>, 
[src]

type Error = Error<SpiError, GpioError>

Type of communication errors.

impl<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, SpiError, GpioError> Commands for ActiveBlueNRG<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, GpioError> where
    SPI: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
    OutputPin1: OutputPin<Error = GpioError>,
    OutputPin2: OutputPin<Error = GpioError>,
    InputPin: InputPin<Error = GpioError>, 
[src]

type Error = Error<SpiError, GpioError>

Type of communication errors.

impl<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, SpiError, GpioError> Commands for ActiveBlueNRG<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, GpioError> where
    SPI: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
    OutputPin1: OutputPin<Error = GpioError>,
    OutputPin2: OutputPin<Error = GpioError>,
    InputPin: InputPin<Error = GpioError>, 
[src]

type Error = Error<SpiError, GpioError>

Type of communication errors.

impl<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, SpiError, GpioError> Commands for ActiveBlueNRG<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, GpioError> where
    SPI: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
    OutputPin1: OutputPin<Error = GpioError>,
    OutputPin2: OutputPin<Error = GpioError>,
    InputPin: InputPin<Error = GpioError>, 
[src]

type Error = Error<SpiError, GpioError>

Type of communication errors.

impl<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, SpiError, GpioError> Controller for ActiveBlueNRG<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, GpioError> where
    SPI: Transfer<u8, Error = SpiError> + Write<u8, Error = SpiError>,
    OutputPin1: OutputPin<Error = GpioError>,
    OutputPin2: OutputPin<Error = GpioError>,
    InputPin: InputPin<Error = GpioError>, 
[src]

type Error = Error<SpiError, GpioError>

Enumeration of [Controller] errors. These typically will be specializations of [host::uart::Error] that specify both the vendor-specific error type and a communication error type. The communication error type in turn will depend on the bus used to communicate with the controller as well as the device crate (e.g., [linux-embedded-hal::Spidev] uses [std::io::Error]). Read more

type Header = CommandHeader

The type of header sent to the controller for HCI commands. Should be either [host::uart::CommandHeader], [host::cmd_link::Header], or [host::event_link::NoCommands], depending on the controller implementation. Read more

type Vendor = BlueNRGTypes

Type containing vendor-specific extensions for the controller, including vendor-specific errors, events, and status codes. Read more

Auto Trait Implementations

impl<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, GpioError> Send for ActiveBlueNRG<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, GpioError> where
    GpioError: Send,
    InputPin: Send,
    OutputPin1: Send,
    OutputPin2: Send,
    SPI: Send

impl<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, GpioError> Sync for ActiveBlueNRG<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, GpioError> where
    GpioError: Sync,
    InputPin: Sync,
    OutputPin1: Sync,
    OutputPin2: Sync,
    SPI: Sync

impl<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, GpioError> Unpin for ActiveBlueNRG<'bnrg, 'spi, 'dbuf, SPI, OutputPin1, OutputPin2, InputPin, GpioError> where
    'dbuf: 'bnrg, 

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<E, Vendor, VE, T> Hci<E, Vendor, VE> for T where
    T: Controller<Error = E, Header = CommandHeader>, 
[src]

impl<E, T, Header> Hci<E> for T where
    Header: HciHeader,
    T: Controller<Error = E, Header = Header>, 
[src]

type VS = <<T as Controller>::Vendor as Vendor>::Status

Vendor-specific status codes.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T, E> UartController<E> for T where
    T: Commands<Error = E> + Commands<Error = E> + Commands<Error = E> + Commands<Error = E> + Hci<E, BlueNRGEvent, BlueNRGError>, 
[src]