SAMDHost

Struct SAMDHost 

Source
pub struct SAMDHost<'a, F> { /* private fields */ }

Implementations§

Source§

impl<'a, F> SAMDHost<'a, F>
where F: Fn() -> usize,

Source

pub fn new( usb: USB, pins: Pins, port: &mut Port, clocks: &mut GenericClockController, pm: &mut PM, millis: &'a F, ) -> (Self, impl FnMut())

Source

pub fn reset_periph(&mut self)

Source

pub fn task(&mut self, drivers: &mut [&mut dyn Driver])

Trait Implementations§

Source§

impl<F> USBHost for SAMDHost<'_, F>
where F: Fn() -> usize,

Source§

fn control_transfer( &mut self, ep: &mut dyn Endpoint, bm_request_type: RequestType, b_request: RequestCode, w_value: WValue, w_index: u16, buf: Option<&mut [u8]>, ) -> Result<usize, TransferError>

Issue a control transfer with an optional data stage to ep. The data stage direction is determined by the direction of bm_request_type. Read more
Source§

fn in_transfer( &mut self, ep: &mut dyn Endpoint, buf: &mut [u8], ) -> Result<usize, TransferError>

Issue a transfer from ep to the host. Read more
Source§

fn out_transfer( &mut self, ep: &mut dyn Endpoint, buf: &[u8], ) -> Result<usize, TransferError>

Issue a transfer from the host to ep. Read more

Auto Trait Implementations§

§

impl<'a, F> !Freeze for SAMDHost<'a, F>

§

impl<'a, F> !RefUnwindSafe for SAMDHost<'a, F>

§

impl<'a, F> Send for SAMDHost<'a, F>
where F: Sync,

§

impl<'a, F> !Sync for SAMDHost<'a, F>

§

impl<'a, F> Unpin for SAMDHost<'a, F>

§

impl<'a, F> !UnwindSafe for SAMDHost<'a, F>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.