[−][src]Struct usbd_blaster::Blaster
Methods
impl<'a, B: UsbBus, E, TDI: OutputPin<Error = E>, TCK: OutputPin<Error = E>, TMS: OutputPin<Error = E>, TDO: InputPin<Error = E>> Blaster<'a, B, E, TDI, TCK, TMS, TDO>
[src]
pub fn new(
alloc: &'a UsbBusAllocator<B>,
tdi: TDI,
tck: TCK,
tms: TMS,
tdo: TDO
) -> Blaster<'a, B, E, TDI, TCK, TMS, TDO>
[src]
alloc: &'a UsbBusAllocator<B>,
tdi: TDI,
tck: TCK,
tms: TMS,
tdo: TDO
) -> Blaster<'a, B, E, TDI, TCK, TMS, TDO>
Allocate a Blaster on the USB bus. Gives control of the four JTAG pins. The JTAG pins can be any pins you want, just make sure you assign them correctly.
pub fn read(&mut self) -> Result<usize>
[src]
Read data from the host output endpoint into the Blaster's internal read buffer.
pub fn write(&mut self, heartbeat: bool) -> Result<usize>
[src]
Write data to the host input endpoint from the Blaster's internal write buffer. The heartbeat parameter must be true at least once every 10 milliseconds, so that the blaster can output the modem status. A safe default for the heartbeat seems to be true all the time. This will output the modem status whenever the host reads the device.
pub fn handle(&mut self) -> Result<(), E>
[src]
Runs all pending operations from the internal read buffer until either no operations are left or the internal write buffer is full. If a GPIO error occurs, the JTAG state machine will enter an undefined state requiring a forced USB bus reset.
Trait Implementations
impl<'_, B, E, TDI: OutputPin<Error = E>, TCK: OutputPin<Error = E>, TMS: OutputPin<Error = E>, TDO: InputPin<Error = E>> UsbClass<B> for Blaster<'_, B, E, TDI, TCK, TMS, TDO> where
B: UsbBus,
E: Debug,
[src]
B: UsbBus,
E: Debug,
fn get_configuration_descriptors(
&self,
writer: &mut DescriptorWriter
) -> Result<()>
[src]
&self,
writer: &mut DescriptorWriter
) -> Result<()>
fn reset(&mut self)
[src]
fn control_in(&mut self, xfer: ControlIn<B>)
[src]
fn control_out(&mut self, xfer: ControlOut<B>)
[src]
fn get_bos_descriptors(&self, writer: &mut BosWriter) -> Result<(), UsbError>
[src]
fn get_string(&self, index: StringIndex, lang_id: u16) -> Option<&str>
[src]
fn poll(&mut self)
[src]
fn endpoint_setup(&mut self, addr: EndpointAddress)
[src]
fn endpoint_out(&mut self, addr: EndpointAddress)
[src]
fn endpoint_in_complete(&mut self, addr: EndpointAddress)
[src]
Auto Trait Implementations
impl<'a, B, E, TDI, TCK, TMS, TDO> Send for Blaster<'a, B, E, TDI, TCK, TMS, TDO> where
TCK: Send,
TDI: Send,
TDO: Send,
TMS: Send,
TCK: Send,
TDI: Send,
TDO: Send,
TMS: Send,
impl<'a, B, E, TDI, TCK, TMS, TDO> Sync for Blaster<'a, B, E, TDI, TCK, TMS, TDO> where
TCK: Sync,
TDI: Sync,
TDO: Sync,
TMS: Sync,
TCK: Sync,
TDI: Sync,
TDO: Sync,
TMS: Sync,
impl<'a, B, E, TDI, TCK, TMS, TDO> Unpin for Blaster<'a, B, E, TDI, TCK, TMS, TDO> where
TCK: Unpin,
TDI: Unpin,
TDO: Unpin,
TMS: Unpin,
TCK: Unpin,
TDI: Unpin,
TDO: Unpin,
TMS: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,