pub struct JTAGTAP { /* private fields */ }
Expand description
Represents a single TAP in a JTAG scan chain, with methods to read and write this TAP while other TAPs are placed into BYPASS.
Implementations
sourceimpl JTAGTAP
impl JTAGTAP
sourcepub fn max_tdi_bits(&self) -> usize
pub fn max_tdi_bits(&self) -> usize
Returns maximum number of TDI bits that can fit into a single DAP packet.
sourcepub fn release(self) -> (JTAG, JTAGChain)
pub fn release(self) -> (JTAG, JTAGChain)
Consume the JTAGTAP and return its JTAG and JTAGChain.
sourcepub fn test_logic_reset(&mut self) -> Result<()>
pub fn test_logic_reset(&mut self) -> Result<()>
Reset JTAG TAPs, entering Test-Logic-Reset.
sourcepub fn run_test_idle(&mut self, n: usize) -> Result<()>
pub fn run_test_idle(&mut self, n: usize) -> Result<()>
Move to Run-Test/Idle and remain there for n
clock cycles.
sourcepub fn write_ir(&mut self, ir: &[bool]) -> Result<()>
pub fn write_ir(&mut self, ir: &[bool]) -> Result<()>
Move to Shift-IR, write ir
to IR, then enter Update-IR.
sourcepub fn read_ir(&mut self) -> Result<Vec<bool>>
pub fn read_ir(&mut self) -> Result<Vec<bool>>
Move to Shift-IR, read the IR while writing 0xFF, then enter Update-IR. Returns the captured bits from TDO, leaving BYPASS in all IRs.
sourcepub fn exchange_ir(&mut self, ir: &[bool]) -> Result<Vec<bool>>
pub fn exchange_ir(&mut self, ir: &[bool]) -> Result<Vec<bool>>
Move to Shift-IR, write ir
to IR while capturing TDO, then enter Update-IR.
Returns the captured bits from TDO.
sourcepub fn write_dr(&mut self, dr: &[bool]) -> Result<()>
pub fn write_dr(&mut self, dr: &[bool]) -> Result<()>
Move to Shift-DR and write dr
to DR.
Exits Shift-DR and enters Exit1-DR once complete.
sourcepub fn write_dr_cb<F: Fn(usize)>(&mut self, dr: &[bool], cb: F) -> Result<()>
pub fn write_dr_cb<F: Fn(usize)>(&mut self, dr: &[bool], cb: F) -> Result<()>
Move to Shift-DR and write dr
to DR.
Exits Shift-DR and enters Exit1-Dr once complete.
This method is similar to write_dr
, but it additionally
calls the callback cb
with the current number of bits
transferred at a regular interval.
Auto Trait Implementations
impl RefUnwindSafe for JTAGTAP
impl Send for JTAGTAP
impl !Sync for JTAGTAP
impl Unpin for JTAGTAP
impl UnwindSafe for JTAGTAP
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