OpenOCD
mpsse.h File Reference
Include dependency graph for mpsse.h:
This graph shows which files directly or indirectly include this file:

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_ctxmpsse_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)
 

Macro Definition Documentation

◆ LSB_FIRST

#define LSB_FIRST   0x08

Definition at line 20 of file mpsse.h.

◆ MSB_FIRST

#define MSB_FIRST   0x00

Definition at line 19 of file mpsse.h.

◆ NEG_EDGE_IN

#define NEG_EDGE_IN   0x04

Definition at line 18 of file mpsse.h.

◆ NEG_EDGE_OUT

#define NEG_EDGE_OUT   0x01

Definition at line 16 of file mpsse.h.

◆ POS_EDGE_IN

#define POS_EDGE_IN   0x00

Definition at line 17 of file mpsse.h.

◆ POS_EDGE_OUT

#define POS_EDGE_OUT   0x00

Definition at line 15 of file mpsse.h.

Enumeration Type Documentation

◆ ftdi_chip_type

Enumerator
TYPE_FT2232C 
TYPE_FT2232H 
TYPE_FT4232H 
TYPE_FT232H 
TYPE_FT2233HP 
TYPE_FT4233HP 
TYPE_FT2232HP 
TYPE_FT4232HP 
TYPE_FT233HP 
TYPE_FT232HP 
TYPE_FT4232HA 

Definition at line 22 of file mpsse.h.

Function Documentation

◆ mpsse_clock_data()

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 
)

◆ mpsse_clock_data_in()

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().

◆ mpsse_clock_data_out()

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().

◆ mpsse_clock_tms_cs()

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 
)

◆ 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 
)

◆ mpsse_close()

◆ mpsse_divide_by_5_config()

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().

◆ mpsse_flush()

◆ mpsse_is_high_speed()

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().

◆ mpsse_loopback_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().

◆ mpsse_open()

struct mpsse_ctx* mpsse_open ( const uint16_t *  vid,
const uint16_t *  pid,
const char *  description,
const char *  serial,
const char *  location,
int  channel 
)

◆ mpsse_purge()

◆ mpsse_read_data_bits_high_byte()

void mpsse_read_data_bits_high_byte ( struct mpsse_ctx ctx,
uint8_t *  data 
)

◆ mpsse_read_data_bits_low_byte()

void mpsse_read_data_bits_low_byte ( struct mpsse_ctx ctx,
uint8_t *  data 
)

◆ mpsse_rtck_config()

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().

◆ mpsse_set_data_bits_high_byte()

void mpsse_set_data_bits_high_byte ( struct mpsse_ctx ctx,
uint8_t  data,
uint8_t  dir 
)

◆ mpsse_set_data_bits_low_byte()

void mpsse_set_data_bits_low_byte ( struct mpsse_ctx ctx,
uint8_t  data,
uint8_t  dir 
)

◆ mpsse_set_divisor()

void mpsse_set_divisor ( struct mpsse_ctx ctx,
uint16_t  divisor 
)

◆ mpsse_set_frequency()

int mpsse_set_frequency ( struct mpsse_ctx ctx,
int  frequency 
)