pending_scan_result_t -> struct pending_scan_result
Remove misleading typedef from struct struct pending_scan_result. Future patches need to remove these duplicated types and code.
This commit is contained in:
parent
8bbb279c28
commit
e1c26950c0
|
@ -542,18 +542,17 @@ static uint8_t tms_buffer[ARMJTAGEW_TAP_BUFFER_SIZE];
|
||||||
static uint8_t tdi_buffer[ARMJTAGEW_TAP_BUFFER_SIZE];
|
static uint8_t tdi_buffer[ARMJTAGEW_TAP_BUFFER_SIZE];
|
||||||
static uint8_t tdo_buffer[ARMJTAGEW_TAP_BUFFER_SIZE];
|
static uint8_t tdo_buffer[ARMJTAGEW_TAP_BUFFER_SIZE];
|
||||||
|
|
||||||
typedef struct
|
struct pending_scan_result {
|
||||||
{
|
|
||||||
int first; /* First bit position in tdo_buffer to read */
|
int first; /* First bit position in tdo_buffer to read */
|
||||||
int length; /* Number of bits to read */
|
int length; /* Number of bits to read */
|
||||||
scan_command_t *command; /* Corresponding scan command */
|
scan_command_t *command; /* Corresponding scan command */
|
||||||
uint8_t *buffer;
|
uint8_t *buffer;
|
||||||
} pending_scan_result_t;
|
};
|
||||||
|
|
||||||
#define MAX_PENDING_SCAN_RESULTS 256
|
#define MAX_PENDING_SCAN_RESULTS 256
|
||||||
|
|
||||||
static int pending_scan_results_length;
|
static int pending_scan_results_length;
|
||||||
static pending_scan_result_t pending_scan_results_buffer[MAX_PENDING_SCAN_RESULTS];
|
static struct pending_scan_result pending_scan_results_buffer[MAX_PENDING_SCAN_RESULTS];
|
||||||
|
|
||||||
static int last_tms;
|
static int last_tms;
|
||||||
|
|
||||||
|
@ -612,7 +611,7 @@ static void armjtagew_tap_append_step(int tms, int tdi)
|
||||||
|
|
||||||
void armjtagew_tap_append_scan(int length, uint8_t *buffer, scan_command_t *command)
|
void armjtagew_tap_append_scan(int length, uint8_t *buffer, scan_command_t *command)
|
||||||
{
|
{
|
||||||
pending_scan_result_t *pending_scan_result = &pending_scan_results_buffer[pending_scan_results_length];
|
struct pending_scan_result *pending_scan_result = &pending_scan_results_buffer[pending_scan_results_length];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
pending_scan_result->first = tap_length;
|
pending_scan_result->first = tap_length;
|
||||||
|
@ -683,7 +682,7 @@ static int armjtagew_tap_execute(void)
|
||||||
|
|
||||||
for (i = 0; i < pending_scan_results_length; i++)
|
for (i = 0; i < pending_scan_results_length; i++)
|
||||||
{
|
{
|
||||||
pending_scan_result_t *pending_scan_result = &pending_scan_results_buffer[i];
|
struct pending_scan_result *pending_scan_result = &pending_scan_results_buffer[i];
|
||||||
uint8_t *buffer = pending_scan_result->buffer;
|
uint8_t *buffer = pending_scan_result->buffer;
|
||||||
int length = pending_scan_result->length;
|
int length = pending_scan_result->length;
|
||||||
int first = pending_scan_result->first;
|
int first = pending_scan_result->first;
|
||||||
|
|
|
@ -675,18 +675,17 @@ static uint8_t tms_buffer[JLINK_TAP_BUFFER_SIZE];
|
||||||
static uint8_t tdi_buffer[JLINK_TAP_BUFFER_SIZE];
|
static uint8_t tdi_buffer[JLINK_TAP_BUFFER_SIZE];
|
||||||
static uint8_t tdo_buffer[JLINK_TAP_BUFFER_SIZE];
|
static uint8_t tdo_buffer[JLINK_TAP_BUFFER_SIZE];
|
||||||
|
|
||||||
typedef struct
|
struct pending_scan_result {
|
||||||
{
|
|
||||||
int first; /* First bit position in tdo_buffer to read */
|
int first; /* First bit position in tdo_buffer to read */
|
||||||
int length; /* Number of bits to read */
|
int length; /* Number of bits to read */
|
||||||
scan_command_t *command; /* Corresponding scan command */
|
scan_command_t *command; /* Corresponding scan command */
|
||||||
uint8_t *buffer;
|
uint8_t *buffer;
|
||||||
} pending_scan_result_t;
|
};
|
||||||
|
|
||||||
#define MAX_PENDING_SCAN_RESULTS 256
|
#define MAX_PENDING_SCAN_RESULTS 256
|
||||||
|
|
||||||
static int pending_scan_results_length;
|
static int pending_scan_results_length;
|
||||||
static pending_scan_result_t pending_scan_results_buffer[MAX_PENDING_SCAN_RESULTS];
|
static struct pending_scan_result pending_scan_results_buffer[MAX_PENDING_SCAN_RESULTS];
|
||||||
|
|
||||||
static void jlink_tap_init(void)
|
static void jlink_tap_init(void)
|
||||||
{
|
{
|
||||||
|
@ -740,7 +739,7 @@ static void jlink_tap_append_step(int tms, int tdi)
|
||||||
|
|
||||||
static void jlink_tap_append_scan(int length, uint8_t *buffer, scan_command_t *command)
|
static void jlink_tap_append_scan(int length, uint8_t *buffer, scan_command_t *command)
|
||||||
{
|
{
|
||||||
pending_scan_result_t *pending_scan_result =
|
struct pending_scan_result *pending_scan_result =
|
||||||
&pending_scan_results_buffer[pending_scan_results_length];
|
&pending_scan_results_buffer[pending_scan_results_length];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -802,7 +801,7 @@ static int jlink_tap_execute(void)
|
||||||
|
|
||||||
for (i = 0; i < pending_scan_results_length; i++)
|
for (i = 0; i < pending_scan_results_length; i++)
|
||||||
{
|
{
|
||||||
pending_scan_result_t *pending_scan_result = &pending_scan_results_buffer[i];
|
struct pending_scan_result *pending_scan_result = &pending_scan_results_buffer[i];
|
||||||
uint8_t *buffer = pending_scan_result->buffer;
|
uint8_t *buffer = pending_scan_result->buffer;
|
||||||
int length = pending_scan_result->length;
|
int length = pending_scan_result->length;
|
||||||
int first = pending_scan_result->first;
|
int first = pending_scan_result->first;
|
||||||
|
|
|
@ -163,18 +163,17 @@ static uint8_t VSLLINK_BIT_MSK[8] =
|
||||||
0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f
|
0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct pending_scan_result {
|
||||||
{
|
|
||||||
int offset;
|
int offset;
|
||||||
int length; /* Number of bits to read */
|
int length; /* Number of bits to read */
|
||||||
scan_command_t *command; /* Corresponding scan command */
|
scan_command_t *command; /* Corresponding scan command */
|
||||||
uint8_t *buffer;
|
uint8_t *buffer;
|
||||||
} pending_scan_result_t;
|
};
|
||||||
|
|
||||||
#define MAX_PENDING_SCAN_RESULTS 256
|
#define MAX_PENDING_SCAN_RESULTS 256
|
||||||
|
|
||||||
static int pending_scan_results_length;
|
static int pending_scan_results_length;
|
||||||
static pending_scan_result_t pending_scan_results_buffer[MAX_PENDING_SCAN_RESULTS];
|
static struct pending_scan_result pending_scan_results_buffer[MAX_PENDING_SCAN_RESULTS];
|
||||||
|
|
||||||
/* Queue command functions */
|
/* Queue command functions */
|
||||||
static void vsllink_end_state(tap_state_t state);
|
static void vsllink_end_state(tap_state_t state);
|
||||||
|
@ -1488,7 +1487,7 @@ static void vsllink_tap_append_step(int tms, int tdi)
|
||||||
|
|
||||||
static void vsllink_tap_append_scan_normal(int length, uint8_t *buffer, scan_command_t *command, int offset)
|
static void vsllink_tap_append_scan_normal(int length, uint8_t *buffer, scan_command_t *command, int offset)
|
||||||
{
|
{
|
||||||
pending_scan_result_t *pending_scan_result = &pending_scan_results_buffer[pending_scan_results_length];
|
struct pending_scan_result *pending_scan_result = &pending_scan_results_buffer[pending_scan_results_length];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (offset > 0)
|
if (offset > 0)
|
||||||
|
@ -1513,7 +1512,7 @@ static void vsllink_tap_append_scan_normal(int length, uint8_t *buffer, scan_com
|
||||||
}
|
}
|
||||||
static void vsllink_tap_append_scan_dma(int length, uint8_t *buffer, scan_command_t *command)
|
static void vsllink_tap_append_scan_dma(int length, uint8_t *buffer, scan_command_t *command)
|
||||||
{
|
{
|
||||||
pending_scan_result_t *pending_scan_result;
|
struct pending_scan_result *pending_scan_result;
|
||||||
int len_tmp, len_all, i;
|
int len_tmp, len_all, i;
|
||||||
|
|
||||||
len_all = 0;
|
len_all = 0;
|
||||||
|
@ -1591,7 +1590,7 @@ static int vsllink_tap_execute_normal(void)
|
||||||
{
|
{
|
||||||
for (i = 0; i < pending_scan_results_length; i++)
|
for (i = 0; i < pending_scan_results_length; i++)
|
||||||
{
|
{
|
||||||
pending_scan_result_t *pending_scan_result = &pending_scan_results_buffer[i];
|
struct pending_scan_result *pending_scan_result = &pending_scan_results_buffer[i];
|
||||||
uint8_t *buffer = pending_scan_result->buffer;
|
uint8_t *buffer = pending_scan_result->buffer;
|
||||||
int length = pending_scan_result->length;
|
int length = pending_scan_result->length;
|
||||||
int offset = pending_scan_result->offset;
|
int offset = pending_scan_result->offset;
|
||||||
|
@ -1664,7 +1663,7 @@ static int vsllink_tap_execute_dma(void)
|
||||||
{
|
{
|
||||||
for (i = 0; i < pending_scan_results_length; i++)
|
for (i = 0; i < pending_scan_results_length; i++)
|
||||||
{
|
{
|
||||||
pending_scan_result_t *pending_scan_result = &pending_scan_results_buffer[i];
|
struct pending_scan_result *pending_scan_result = &pending_scan_results_buffer[i];
|
||||||
uint8_t *buffer = pending_scan_result->buffer;
|
uint8_t *buffer = pending_scan_result->buffer;
|
||||||
int length = pending_scan_result->length;
|
int length = pending_scan_result->length;
|
||||||
int first = pending_scan_result->offset;
|
int first = pending_scan_result->offset;
|
||||||
|
|
Loading…
Reference in New Issue