72 uint8_t usb_out_bytecount, usb_in_bytecount;
73 uint16_t signal_state;
83 usb_out_bytecount = 5;
93 usb_out_bytecount = usb_in_bytecount + 5;
97 usb_out_bytecount = 2;
101 usb_out_bytecount = 2;
107 usb_out_bytecount = 5;
117 usb_out_bytecount = usb_in_bytecount + 5;
121 usb_out_bytecount = 2;
125 usb_out_bytecount = 2;
131 usb_out_bytecount = 2;
137 usb_out_bytecount = 2;
143 usb_out_bytecount = 0;
144 usb_in_bytecount = 2;
150 usb_out_bytecount = 2;
154 usb_out_bytecount = 5;
163 usb_out_bytecount = 1;
167 usb_out_bytecount = 1;
173 usb_out_bytecount = 0;
210 last_command =
false;
211 while (last_command ==
false)
#define CMD_CONFIGURE_TCK_FREQ
#define CMD_SLOW_CLOCK_TCK
#define CMD_SLOW_SCAN_OUT
#define CMD_SLOW_CLOCK_TMS
void delay_us(uint16_t delay)
void delay_ms(uint16_t delay)
uint16_t jtag_get_signals(void)
Get current JTAG signal states.
void jtag_scan_out(uint8_t out_offset)
Perform JTAG SCAN-OUT operation at maximum TCK frequency.
void jtag_slow_scan_io(uint8_t out_offset, uint8_t in_offset)
Perform bidirectional JTAG SCAN operation at maximum TCK frequency.
void jtag_slow_scan_in(uint8_t out_offset, uint8_t in_offset)
Perform JTAG SCAN-IN operation at variable TCK frequency.
void jtag_scan_io(uint8_t out_offset, uint8_t in_offset)
Perform bidirectional JTAG SCAN operation at maximum TCK frequency.
void jtag_clock_tck(uint16_t count)
Generate TCK clock cycles.
void jtag_slow_scan_out(uint8_t out_offset)
Perform JTAG SCAN-OUT operation at maximum TCK frequency.
void jtag_scan_in(uint8_t out_offset, uint8_t in_offset)
Perform JTAG SCAN-IN operation at maximum TCK frequency.
void jtag_slow_clock_tms(uint8_t count, uint8_t sequence)
Perform TAP-FSM state transitions at less than maximum TCK frequency.
void jtag_configure_tck_delay(uint8_t scan_in, uint8_t scan_out, uint8_t scan_io, uint8_t tck, uint8_t tms)
Configure TCK delay parameters.
void jtag_set_signals(uint8_t low, uint8_t high)
Set state of JTAG output signals.
void jtag_slow_clock_tck(uint16_t count)
Generate TCK clock cycles at variable frequency.
void jtag_clock_tms(uint8_t count, uint8_t sequence)
Perform TAP FSM state transitions at maximum TCK frequency.
volatile uint8_t payload_index_in
Number of data bytes already in EP2 Bulk-IN buffer.
bool execute_command(void)
Executes one command and updates global command indexes.
void command_loop(void)
Forever wait for commands and execute them as they arrive.
void execute_set_led_command(void)
Execute a SET_LEDS command.
volatile uint8_t cmd_id_index
Index in EP2 Bulk-OUT data buffer that contains the current command ID.
All information in this file was taken from the EZ-USB Technical Reference Manual,...