pub struct CmsisDapV2Class<'d, D: Driver<'d>> { /* private fields */ }Expand description
USB device class for CMSIS-DAP v2 probes.
Implementations§
Source§impl<'d, D: Driver<'d>> CmsisDapV2Class<'d, D>
impl<'d, D: Driver<'d>> CmsisDapV2Class<'d, D>
Sourcepub fn new(
builder: &mut Builder<'d, D>,
state: &'d mut State,
config: Config,
) -> Self
pub fn new( builder: &mut Builder<'d, D>, state: &'d mut State, config: Config, ) -> Self
Creates a new CmsisDapV2Class with the provided configuration.
Sourcepub async fn wait_connection(&mut self)
pub async fn wait_connection(&mut self)
Waits for the USB host to enable this interface
Sourcepub async fn write_packet(&mut self, data: &[u8]) -> Result<(), EndpointError>
pub async fn write_packet(&mut self, data: &[u8]) -> Result<(), EndpointError>
Write data to the host.
Sourcepub async fn write_trace(&mut self, data: &[u8]) -> Result<(), EndpointError>
pub async fn write_trace(&mut self, data: &[u8]) -> Result<(), EndpointError>
Write data to the host via the trace output endpoint.
Returns EndpointError::Disabled if the trace output endpoint is not enabled.
Sourcepub async fn read_packet(
&mut self,
data: &mut [u8],
) -> Result<usize, EndpointError>
pub async fn read_packet( &mut self, data: &mut [u8], ) -> Result<usize, EndpointError>
Read data from the host.
Auto Trait Implementations§
impl<'d, D> Forget for CmsisDapV2Class<'d, D>
impl<'d, D> Freeze for CmsisDapV2Class<'d, D>where
<D as Driver<'d>>::EndpointOut: Freeze,
<D as Driver<'d>>::EndpointIn: Freeze,
Option<<D as Driver<'d>>::EndpointIn>: Freeze,
impl<'d, D> Move for CmsisDapV2Class<'d, D>
impl<'d, D> RefUnwindSafe for CmsisDapV2Class<'d, D>where
<D as Driver<'d>>::EndpointOut: RefUnwindSafe,
<D as Driver<'d>>::EndpointIn: RefUnwindSafe,
Option<<D as Driver<'d>>::EndpointIn>: RefUnwindSafe,
impl<'d, D> Send for CmsisDapV2Class<'d, D>where
<D as Driver<'d>>::EndpointOut: Send,
<D as Driver<'d>>::EndpointIn: Send,
Option<<D as Driver<'d>>::EndpointIn>: Send,
impl<'d, D> Sync for CmsisDapV2Class<'d, D>where
<D as Driver<'d>>::EndpointOut: Sync,
<D as Driver<'d>>::EndpointIn: Sync,
Option<<D as Driver<'d>>::EndpointIn>: Sync,
impl<'d, D> Unpin for CmsisDapV2Class<'d, D>where
<D as Driver<'d>>::EndpointOut: Unpin,
<D as Driver<'d>>::EndpointIn: Unpin,
Option<<D as Driver<'d>>::EndpointIn>: Unpin,
impl<'d, D> UnsafeUnpin for CmsisDapV2Class<'d, D>where
<D as Driver<'d>>::EndpointOut: UnsafeUnpin,
<D as Driver<'d>>::EndpointIn: UnsafeUnpin,
Option<<D as Driver<'d>>::EndpointIn>: UnsafeUnpin,
impl<'d, D> UnwindSafe for CmsisDapV2Class<'d, D>where
<D as Driver<'d>>::EndpointOut: UnwindSafe,
<D as Driver<'d>>::EndpointIn: UnwindSafe,
Option<<D as Driver<'d>>::EndpointIn>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more