Struct capsules_extra::usb::cdc::CdcAcm
source · pub struct CdcAcm<'a, U: 'a, A: 'a + Alarm<'a>> { /* private fields */ }
Expand description
Implementation of the Abstract Control Model (ACM) for the Communications Class Device (CDC) over USB.
Implementations§
source§impl<'a, U: UsbController<'a>, A: 'a + Alarm<'a>> CdcAcm<'a, U, A>
impl<'a, U: UsbController<'a>, A: 'a + Alarm<'a>> CdcAcm<'a, U, A>
Trait Implementations§
source§impl<'a, U: UsbController<'a>, A: 'a + Alarm<'a>> AlarmClient for CdcAcm<'a, U, A>
impl<'a, U: UsbController<'a>, A: 'a + Alarm<'a>> AlarmClient for CdcAcm<'a, U, A>
source§impl<'a, U: UsbController<'a>, A: 'a + Alarm<'a>> Client<'a> for CdcAcm<'a, U, A>
impl<'a, U: UsbController<'a>, A: 'a + Alarm<'a>> Client<'a> for CdcAcm<'a, U, A>
source§fn ctrl_setup(&'a self, endpoint: usize) -> CtrlSetupResult
fn ctrl_setup(&'a self, endpoint: usize) -> CtrlSetupResult
Handle a Control Setup transaction.
CDC uses special values here, and we can use these to know when a CDC client is connected or not.
source§fn ctrl_in(&'a self, endpoint: usize) -> CtrlInResult
fn ctrl_in(&'a self, endpoint: usize) -> CtrlInResult
Handle a Control In transaction
source§fn ctrl_out(&'a self, endpoint: usize, packet_bytes: u32) -> CtrlOutResult
fn ctrl_out(&'a self, endpoint: usize, packet_bytes: u32) -> CtrlOutResult
Handle a Control Out transaction
source§fn ctrl_status_complete(&'a self, endpoint: usize)
fn ctrl_status_complete(&'a self, endpoint: usize)
Handle the completion of a Control transfer
source§fn packet_in(&'a self, transfer_type: TransferType, endpoint: usize) -> InResult
fn packet_in(&'a self, transfer_type: TransferType, endpoint: usize) -> InResult
Handle a Bulk/Interrupt IN transaction.
This is called when we can send data to the host. It should get called
when we tell the controller we want to resume the IN endpoint (meaning
we know we have data to send) and afterwards until we return
hil::usb::InResult::Delay
from this function. That means we can use
this as a callback to mean that the transmission finished by waiting
until this function is called when we don’t have anything left to send.
source§fn packet_out(
&'a self,
transfer_type: TransferType,
endpoint: usize,
packet_bytes: u32,
) -> OutResult
fn packet_out( &'a self, transfer_type: TransferType, endpoint: usize, packet_bytes: u32, ) -> OutResult
Handle a Bulk/Interrupt OUT transaction