capsules_extra::usb::usbc_client_ctrl

Struct ClientCtrl

Source
pub struct ClientCtrl<'a, 'b, U: 'a> {
    pub ctrl_buffer: Buffer64,
    /* private fields */
}
Expand description

Handler for USB control endpoint requests.

Fields§

§ctrl_buffer: Buffer64

A 64-byte buffer for the control endpoint to be passed to the USB driver.

Implementations§

Source§

impl<'a, 'b, U: UsbController<'a>> ClientCtrl<'a, 'b, U>

Source

pub fn new( controller: &'a U, device_descriptor_buffer: DeviceBuffer, other_descriptor_buffer: DescriptorBuffer, hid_descriptor: Option<&'b HIDDescriptor<'b>>, report_descriptor: Option<&'b ReportDescriptor<'b>>, language: &'b [u16; 1], strings: &'b [&'b str], ) -> Self

Source

pub fn controller(&self) -> &'a U

Source

pub fn enable(&'a self)

Source

pub fn attach(&'a self)

Source

pub fn ctrl_setup(&'a self, endpoint: usize) -> CtrlSetupResult

Handle a Control Setup transaction

Source

pub fn ctrl_in(&'a self, endpoint: usize) -> CtrlInResult

Handle a Control In transaction

Source

pub fn ctrl_out(&'a self, endpoint: usize, _packet_bytes: u32) -> CtrlOutResult

Handle a Control Out transaction

Source

pub fn ctrl_status(&'a self, _endpoint: usize)

Source

pub fn ctrl_status_complete(&'a self, endpoint: usize)

Handle the completion of a Control transfer

Auto Trait Implementations§

§

impl<'a, 'b, U> !Freeze for ClientCtrl<'a, 'b, U>

§

impl<'a, 'b, U> !RefUnwindSafe for ClientCtrl<'a, 'b, U>

§

impl<'a, 'b, U> Send for ClientCtrl<'a, 'b, U>
where U: Sync,

§

impl<'a, 'b, U> !Sync for ClientCtrl<'a, 'b, U>

§

impl<'a, 'b, U> Unpin for ClientCtrl<'a, 'b, U>

§

impl<'a, 'b, U> UnwindSafe for ClientCtrl<'a, 'b, U>
where U: RefUnwindSafe,

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, 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.