Struct capsules_extra::usb::usbc_client_ctrl::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>,

§

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

§

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.