pub struct Sequences<'a> { /* private fields */ }
Expand description
Represents a series of JTAG sequences to be sent to a DAP. The maximum number of sequences is limited by the DAP packet size, or at most 255.
Implementations
sourceimpl<'a> Sequences<'a>
impl<'a> Sequences<'a>
sourcepub fn with_dap(dap: &'a DAP) -> Self
pub fn with_dap(dap: &'a DAP) -> Self
Create a new Sequences object which can be sent to the provided DAP.
sourcepub fn add_sequence(
&mut self,
len: usize,
tms: bool,
tdi: Option<&[bool]>,
capture: bool
) -> Result<()>
pub fn add_sequence(
&mut self,
len: usize,
tms: bool,
tdi: Option<&[bool]>,
capture: bool
) -> Result<()>
Add a new sequence to this set of sequences.
len: number of clock cycles, from 1 to 64. tms: value to set TMS during this sequence. tdi: optional data to clock out TDI, bits in transmission order, set to all-1 if None. capture: if true, capture TDO state during this sequence.
sourcepub fn add_sequences(
&mut self,
len: usize,
tms: bool,
tdi: Option<&[bool]>,
capture: bool
) -> Result<()>
pub fn add_sequences(
&mut self,
len: usize,
tms: bool,
tdi: Option<&[bool]>,
capture: bool
) -> Result<()>
Add multiple sequences as required to reach the desired total bit length.
len: number of clock cycles. tms: value to set TMS during these sequence. tdi: optional data to clock out TDI, bits in transmission order, set to all-1 if None. capture: if true, capture TDO state during this sequence.
sourcepub fn mode(self, tms: &[bool]) -> Result<Self>
pub fn mode(self, tms: &[bool]) -> Result<Self>
Shift out tms
bits.
Internally each run of identical bits is collapsed into a single request.
sourcepub fn write(self, tdi: &[bool], exit: bool) -> Result<Self>
pub fn write(self, tdi: &[bool], exit: bool) -> Result<Self>
Write bits to TDI without capturing TDO state.
If exit
is true, the first bits have TMS=0 and the final bit has TMS=1,
otherwise all bits have TMS=0.
sourcepub fn read(self, n: usize, exit: bool) -> Result<Self>
pub fn read(self, n: usize, exit: bool) -> Result<Self>
Read n
bits from TDO, writing all 1 bits to TDI.
If exit
is true, the first bits have TMS=0 and the final bit has TMS=1,
otherwise all bits have TMS=0.
sourcepub fn exchange(self, tdi: &[bool], exit: bool) -> Result<Self>
pub fn exchange(self, tdi: &[bool], exit: bool) -> Result<Self>
Write bits to TDI and capture output bits from TDO.
If exit
is true, the first bits have TMS=0 and the final bit has TMS=1,
otherwise all bits have TMS=0.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Sequences<'a>
impl<'a> !Send for Sequences<'a>
impl<'a> !Sync for Sequences<'a>
impl<'a> Unpin for Sequences<'a>
impl<'a> UnwindSafe for Sequences<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more