[][src]Struct driver_cp2130::Cp2130

pub struct Cp2130<'a> { /* fields omitted */ }

CP2130 provides methods to interact with the device, as well as create new spi and gpio connectors.

Methods

impl<'a> Cp2130<'a>[src]

pub fn new(
    device: UsbDevice<'a>,
    descriptor: DeviceDescriptor
) -> Result<Self, Error>
[src]

Create a new CP2130 instance from a libusb device and descriptor

pub fn info(&self) -> Info[src]

Fetch information for the connected device

pub fn reset(&self) -> Result<(), Error>[src]

pub fn spi(&self, channel: u8, config: SpiConfig) -> Result<Spi<'a>, Error>[src]

Create an SPI connector

pub fn gpio_out(
    &self,
    index: u8,
    mode: GpioMode,
    level: GpioLevel
) -> Result<OutputPin<'a>, Error>
[src]

Create a GPIO OutputPin

pub fn gpio_in(&self, index: u8) -> Result<InputPin<'a>, Error>[src]

Create a GPIO InputPin

Trait Implementations

impl<'a> Device for Cp2130<'a>[src]

Underlying device functions

Auto Trait Implementations

impl<'a> RefUnwindSafe for Cp2130<'a>

impl<'a> Send for Cp2130<'a>

impl<'a> Sync for Cp2130<'a>

impl<'a> Unpin for Cp2130<'a>

impl<'a> UnwindSafe for Cp2130<'a>

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<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<V, T> VZip<V> for T where
    V: MultiLane<T>,