pub struct Trace<'d, T>where
T: Instance,{ /* private fields */ }
Available on crate feature
unstable
only.Expand description
TRACE Encoder Instance
Implementations§
Source§impl<'d, T> Trace<'d, T>where
T: Instance,
impl<'d, T> Trace<'d, T>where
T: Instance,
Sourcepub fn new(peripheral: impl Peripheral<P = T> + 'd) -> Self
pub fn new(peripheral: impl Peripheral<P = T> + 'd) -> Self
Construct a new instance
Sourcepub fn start_trace(&mut self, buffer: &'d mut [u8])
pub fn start_trace(&mut self, buffer: &'d mut [u8])
Start tracing, writing data into the buffer
Sourcepub fn stop_trace(&mut self) -> Result<TraceResult, Error>
pub fn stop_trace(&mut self) -> Result<TraceResult, Error>
Stop tracing
Be aware that valid data might not start at index 0 and you need to account for wrapping when reading the data.