Struct Dap

Source
pub struct Dap<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO> { /* private fields */ }
Expand description

DAP handler.

Implementations§

Source§

impl<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO> Dap<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO>
where DEPS: Dependencies<SWD, JTAG>, LEDS: DapLeds, WAIT: DelayNs, JTAG: Jtag<DEPS>, SWD: Swd<DEPS>, SWO: Swo,

Source

pub fn new( dependencies: DEPS, leds: LEDS, wait: WAIT, swo: Option<SWO>, version_string: &'a str, ) -> Self

Create a Dap handler

Source

pub fn process_command( &mut self, report: &[u8], rbuf: &mut [u8], version: DapVersion, ) -> usize

Process a new CMSIS-DAP command from report.

Returns number of bytes written to response buffer.

Source

pub fn suspend(&mut self)

Suspend the interface.

Auto Trait Implementations§

§

impl<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO> Freeze for Dap<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO>
where LEDS: Freeze, WAIT: Freeze, DEPS: Freeze, SWD: Freeze, JTAG: Freeze, SWO: Freeze,

§

impl<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO> RefUnwindSafe for Dap<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO>

§

impl<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO> Send for Dap<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO>
where LEDS: Send, WAIT: Send, DEPS: Send, SWD: Send, JTAG: Send, SWO: Send,

§

impl<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO> Sync for Dap<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO>
where LEDS: Sync, WAIT: Sync, DEPS: Sync, SWD: Sync, JTAG: Sync, SWO: Sync,

§

impl<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO> Unpin for Dap<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO>
where LEDS: Unpin, WAIT: Unpin, DEPS: Unpin, SWD: Unpin, JTAG: Unpin, SWO: Unpin,

§

impl<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO> UnwindSafe for Dap<'a, DEPS, LEDS, WAIT, JTAG, SWD, SWO>
where LEDS: UnwindSafe, WAIT: UnwindSafe, DEPS: UnwindSafe, SWD: UnwindSafe, JTAG: UnwindSafe, SWO: UnwindSafe,

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.