OpenOCD
|
Go to the source code of this file.
Macros | |
#define | LSB_FIRST 0x08 |
#define | MSB_FIRST 0x00 |
#define | NEG_EDGE_IN 0x04 |
#define | NEG_EDGE_OUT 0x01 |
#define | POS_EDGE_IN 0x00 |
#define | POS_EDGE_OUT 0x00 |
Enumerations | |
enum | ftdi_chip_type { TYPE_FT2232C , TYPE_FT2232H , TYPE_FT4232H , TYPE_FT232H , TYPE_FT2233HP , TYPE_FT4233HP , TYPE_FT2232HP , TYPE_FT4232HP , TYPE_FT233HP , TYPE_FT232HP , TYPE_FT4232HA } |
Functions | |
void | mpsse_clock_data (struct mpsse_ctx *ctx, const uint8_t *out, unsigned int out_offset, uint8_t *in, unsigned int in_offset, unsigned int length, uint8_t mode) |
void | mpsse_clock_data_in (struct mpsse_ctx *ctx, uint8_t *in, unsigned int in_offset, unsigned int length, uint8_t mode) |
void | mpsse_clock_data_out (struct mpsse_ctx *ctx, const uint8_t *out, unsigned int out_offset, unsigned int length, uint8_t mode) |
void | mpsse_clock_tms_cs (struct mpsse_ctx *ctx, const uint8_t *out, unsigned int out_offset, uint8_t *in, unsigned int in_offset, unsigned int length, bool tdi, uint8_t mode) |
void | mpsse_clock_tms_cs_out (struct mpsse_ctx *ctx, const uint8_t *out, unsigned int out_offset, unsigned int length, bool tdi, uint8_t mode) |
void | mpsse_close (struct mpsse_ctx *ctx) |
int | mpsse_divide_by_5_config (struct mpsse_ctx *ctx, bool enable) |
int | mpsse_flush (struct mpsse_ctx *ctx) |
bool | mpsse_is_high_speed (struct mpsse_ctx *ctx) |
void | mpsse_loopback_config (struct mpsse_ctx *ctx, bool enable) |
struct mpsse_ctx * | mpsse_open (const uint16_t *vid, const uint16_t *pid, const char *description, const char *serial, const char *location, int channel) |
void | mpsse_purge (struct mpsse_ctx *ctx) |
void | mpsse_read_data_bits_high_byte (struct mpsse_ctx *ctx, uint8_t *data) |
void | mpsse_read_data_bits_low_byte (struct mpsse_ctx *ctx, uint8_t *data) |
int | mpsse_rtck_config (struct mpsse_ctx *ctx, bool enable) |
void | mpsse_set_data_bits_high_byte (struct mpsse_ctx *ctx, uint8_t data, uint8_t dir) |
void | mpsse_set_data_bits_low_byte (struct mpsse_ctx *ctx, uint8_t data, uint8_t dir) |
void | mpsse_set_divisor (struct mpsse_ctx *ctx, uint16_t divisor) |
int | mpsse_set_frequency (struct mpsse_ctx *ctx, int frequency) |
enum ftdi_chip_type |
void mpsse_clock_data | ( | struct mpsse_ctx * | ctx, |
const uint8_t * | out, | ||
unsigned int | out_offset, | ||
uint8_t * | in, | ||
unsigned int | in_offset, | ||
unsigned int | length, | ||
uint8_t | mode | ||
) |
Definition at line 498 of file mpsse.c.
References buffer_add_read(), buffer_read_space(), buffer_write(), buffer_write_byte(), buffer_write_space(), ERROR_OK, length, LOG_DEBUG_IO, mode, mpsse_flush(), and mpsse_ctx::retval.
Referenced by ftdi_execute_scan(), mpsse_clock_data_in(), and mpsse_clock_data_out().
void mpsse_clock_data_in | ( | struct mpsse_ctx * | ctx, |
uint8_t * | in, | ||
unsigned int | in_offset, | ||
unsigned int | length, | ||
uint8_t | mode | ||
) |
Definition at line 492 of file mpsse.c.
References length, mode, mpsse_clock_data(), and NULL.
Referenced by ftdi_swd_queue_cmd().
void mpsse_clock_data_out | ( | struct mpsse_ctx * | ctx, |
const uint8_t * | out, | ||
unsigned int | out_offset, | ||
unsigned int | length, | ||
uint8_t | mode | ||
) |
Definition at line 486 of file mpsse.c.
References length, mode, mpsse_clock_data(), and NULL.
Referenced by ftdi_swd_queue_cmd(), and ftdi_swd_run_queue().
void mpsse_clock_tms_cs | ( | struct mpsse_ctx * | ctx, |
const uint8_t * | out, | ||
unsigned int | out_offset, | ||
uint8_t * | in, | ||
unsigned int | in_offset, | ||
unsigned int | length, | ||
bool | tdi, | ||
uint8_t | mode | ||
) |
Definition at line 575 of file mpsse.c.
References bit_copy(), buffer_add_read(), buffer_read_space(), buffer_write_byte(), buffer_write_space(), ERROR_OK, length, LOG_DEBUG_IO, mode, mpsse_flush(), and mpsse_ctx::retval.
Referenced by ftdi_execute_scan(), and mpsse_clock_tms_cs_out().
void mpsse_clock_tms_cs_out | ( | struct mpsse_ctx * | ctx, |
const uint8_t * | out, | ||
unsigned int | out_offset, | ||
unsigned int | length, | ||
bool | tdi, | ||
uint8_t | mode | ||
) |
Definition at line 569 of file mpsse.c.
References length, mode, mpsse_clock_tms_cs(), and NULL.
Referenced by ftdi_execute_pathmove(), ftdi_execute_runtest(), ftdi_execute_scan(), ftdi_execute_stableclocks(), ftdi_execute_tms(), and move_to_state().
void mpsse_close | ( | struct mpsse_ctx * | ctx | ) |
Definition at line 405 of file mpsse.c.
References bit_copy_discard(), mpsse_ctx::read_buffer, mpsse_ctx::read_chunk, mpsse_ctx::read_queue, mpsse_ctx::usb_ctx, mpsse_ctx::usb_dev, and mpsse_ctx::write_buffer.
Referenced by ftdi_quit(), and mpsse_open().
int mpsse_divide_by_5_config | ( | struct mpsse_ctx * | ctx, |
bool | enable | ||
) |
Definition at line 729 of file mpsse.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, mpsse_is_high_speed(), and single_byte_boolean_helper().
Referenced by mpsse_set_frequency().
int mpsse_flush | ( | struct mpsse_ctx * | ctx | ) |
Definition at line 848 of file mpsse.c.
References bit_copy_discard(), bit_copy_execute(), buffer_write_byte(), transfer_result::ctx, transfer_result::done, ERROR_FAIL, ERROR_OK, mpsse_ctx::in_ep, keep_alive(), LOG_DEBUG_IO, LOG_ERROR, LOG_WARNING, mpsse_purge(), NULL, mpsse_ctx::out_ep, read_cb(), mpsse_ctx::read_chunk, mpsse_ctx::read_chunk_size, mpsse_ctx::read_count, mpsse_ctx::read_queue, mpsse_ctx::retval, start, timeval_ms(), transfer_result::transferred, timeval::tv_sec, timeval::tv_usec, mpsse_ctx::usb_ctx, mpsse_ctx::usb_dev, mpsse_ctx::usb_read_timeout, mpsse_ctx::usb_write_timeout, mpsse_ctx::write_buffer, write_cb(), and mpsse_ctx::write_count.
Referenced by COMMAND_HANDLER(), ftdi_execute_queue(), ftdi_execute_sleep(), ftdi_get_signal(), ftdi_initialize(), ftdi_reset(), ftdi_swd_run_queue(), mpsse_clock_data(), mpsse_clock_tms_cs(), mpsse_read_data_bits_high_byte(), mpsse_read_data_bits_low_byte(), mpsse_set_data_bits_high_byte(), mpsse_set_data_bits_low_byte(), mpsse_set_divisor(), and single_byte_boolean_helper().
bool mpsse_is_high_speed | ( | struct mpsse_ctx * | ctx | ) |
Definition at line 419 of file mpsse.c.
References mpsse_ctx::type, and TYPE_FT2232C.
Referenced by ftdi_khz(), mpsse_divide_by_5_config(), and mpsse_rtck_config().
void mpsse_loopback_config | ( | struct mpsse_ctx * | ctx, |
bool | enable | ||
) |
Definition at line 706 of file mpsse.c.
References LOG_DEBUG, and single_byte_boolean_helper().
Referenced by ftdi_initialize().
struct mpsse_ctx* mpsse_open | ( | const uint16_t * | vid, |
const uint16_t * | pid, | ||
const char * | description, | ||
const char * | serial, | ||
const char * | location, | ||
int | channel | ||
) |
void mpsse_purge | ( | struct mpsse_ctx * | ctx | ) |
Definition at line 424 of file mpsse.c.
References bit_copy_discard(), ERROR_OK, FTDI_DEVICE_OUT_REQTYPE, mpsse_ctx::index, LOG_DEBUG, LOG_ERROR, NULL, mpsse_ctx::read_count, mpsse_ctx::read_queue, mpsse_ctx::retval, SIO_RESET_PURGE_RX, SIO_RESET_PURGE_TX, SIO_RESET_REQUEST, mpsse_ctx::usb_dev, mpsse_ctx::usb_write_timeout, and mpsse_ctx::write_count.
Referenced by mpsse_flush(), and mpsse_open().
void mpsse_read_data_bits_high_byte | ( | struct mpsse_ctx * | ctx, |
uint8_t * | data | ||
) |
Definition at line 676 of file mpsse.c.
References buffer_add_read(), buffer_read_space(), buffer_write_byte(), buffer_write_space(), ERROR_OK, LOG_DEBUG_IO, mpsse_flush(), and mpsse_ctx::retval.
Referenced by ftdi_get_signal().
void mpsse_read_data_bits_low_byte | ( | struct mpsse_ctx * | ctx, |
uint8_t * | data | ||
) |
Definition at line 660 of file mpsse.c.
References buffer_add_read(), buffer_read_space(), buffer_write_byte(), buffer_write_space(), ERROR_OK, LOG_DEBUG_IO, mpsse_flush(), and mpsse_ctx::retval.
Referenced by ftdi_get_signal().
int mpsse_rtck_config | ( | struct mpsse_ctx * | ctx, |
bool | enable | ||
) |
Definition at line 740 of file mpsse.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, mpsse_is_high_speed(), and single_byte_boolean_helper().
Referenced by mpsse_set_frequency().
void mpsse_set_data_bits_high_byte | ( | struct mpsse_ctx * | ctx, |
uint8_t | data, | ||
uint8_t | dir | ||
) |
Definition at line 643 of file mpsse.c.
References buffer_write_byte(), buffer_write_space(), ERROR_OK, LOG_DEBUG_IO, mpsse_flush(), and mpsse_ctx::retval.
Referenced by ftdi_initialize(), and ftdi_set_signal().
void mpsse_set_data_bits_low_byte | ( | struct mpsse_ctx * | ctx, |
uint8_t | data, | ||
uint8_t | dir | ||
) |
Definition at line 626 of file mpsse.c.
References buffer_write_byte(), buffer_write_space(), ERROR_OK, LOG_DEBUG_IO, mpsse_flush(), and mpsse_ctx::retval.
Referenced by ftdi_initialize(), ftdi_set_signal(), and ftdi_swd_swdio_en().
void mpsse_set_divisor | ( | struct mpsse_ctx * | ctx, |
uint16_t | divisor | ||
) |
Definition at line 712 of file mpsse.c.
References buffer_write_byte(), buffer_write_space(), ERROR_OK, LOG_DEBUG, LOG_DEBUG_IO, mpsse_flush(), and mpsse_ctx::retval.
Referenced by mpsse_set_frequency().
int mpsse_set_frequency | ( | struct mpsse_ctx * | ctx, |
int | frequency | ||
) |
Definition at line 751 of file mpsse.c.
References ERROR_OK, LOG_DEBUG, mpsse_divide_by_5_config(), mpsse_rtck_config(), and mpsse_set_divisor().
Referenced by ftdi_initialize(), and ftdi_speed().