int jtag_flush_queue_count; /* count # of flushes for profiling / debugging purposes */
-static void jtag_add_scan_check(void (*jtag_add_scan)(int in_num_fields, scan_field_t *in_fields, tap_state_t state),
+static void jtag_add_scan_check(void (*jtag_add_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state),
int in_num_fields, scan_field_t *in_fields, tap_state_t state);
/* note that this is not marked as static as it must be available from outside jtag.c for those
cmd_queue_cur_state = cmd_queue_end_state;
}
-void jtag_add_ir_scan_noverify(int in_num_fields, scan_field_t *in_fields, tap_state_t state)
+void jtag_add_ir_scan_noverify(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
int retval;
jtag_prelude(state);
* see jtag_add_ir_scan()
*
*/
-int MINIDRIVER(interface_jtag_add_ir_scan)(int in_num_fields, scan_field_t *in_fields, tap_state_t state)
+int MINIDRIVER(interface_jtag_add_ir_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
jtag_tap_t *tap;
int nth_tap;
* This function assumes that the caller handles extra fields for bypassed TAPs
*
*/
-void jtag_add_plain_ir_scan(int in_num_fields, scan_field_t *in_fields, tap_state_t state)
+void jtag_add_plain_ir_scan(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
int retval;
* see jtag_add_plain_ir_scan()
*
*/
-int MINIDRIVER(interface_jtag_add_plain_ir_scan)(int in_num_fields, scan_field_t *in_fields, tap_state_t state)
+int MINIDRIVER(interface_jtag_add_plain_ir_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
return jtag_check_value_inner(in, (u8 *)data1, (u8 *)data2, (int)data3);
}
-static void jtag_add_scan_check(void (*jtag_add_scan)(int in_num_fields, scan_field_t *in_fields, tap_state_t state),
+static void jtag_add_scan_check(void (*jtag_add_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state),
int in_num_fields, scan_field_t *in_fields, tap_state_t state)
{
for (int i = 0; i < in_num_fields; i++)
* The bypass status of TAPs is set by jtag_add_ir_scan().
*
*/
-void jtag_add_dr_scan(int in_num_fields, scan_field_t *in_fields, tap_state_t state)
+void jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
int retval;
* see jtag_add_dr_scan()
*
*/
-int MINIDRIVER(interface_jtag_add_dr_scan)(int in_num_fields, scan_field_t *in_fields, tap_state_t state)
+int MINIDRIVER(interface_jtag_add_dr_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
int j;
int nth_tap;
* This function assumes that the caller handles extra fields for bypassed TAPs
*
*/
-void jtag_add_plain_dr_scan(int in_num_fields, scan_field_t *in_fields, tap_state_t state)
+void jtag_add_plain_dr_scan(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
int retval;
* see jtag_add_plain_dr_scan()
*
*/
-int MINIDRIVER(interface_jtag_add_plain_dr_scan)(int in_num_fields, scan_field_t *in_fields, tap_state_t state)
+int MINIDRIVER(interface_jtag_add_plain_dr_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
return ERROR_OK;
}
-void jtag_add_pathmove(int num_states, tap_state_t *path)
+void jtag_add_pathmove(int num_states, const tap_state_t *path)
{
tap_state_t cur_state = cmd_queue_cur_state;
int i;
jtag_error=retval;
}
-int MINIDRIVER(interface_jtag_add_pathmove)(int num_states, tap_state_t *path)
+int MINIDRIVER(interface_jtag_add_pathmove)(int num_states, const tap_state_t *path)
{
/* allocate memory for a new list member */
jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
return;
}
-int jtag_scan_size(scan_command_t *cmd)
+int jtag_scan_size(const scan_command_t *cmd)
{
int bit_count = 0;
int i;
return bit_count;
}
-int jtag_build_buffer(scan_command_t *cmd, u8 **buffer)
+int jtag_build_buffer(const scan_command_t *cmd, u8 **buffer)
{
int bit_count = 0;
int i;
return bit_count;
}
-int jtag_read_buffer(u8 *buffer, scan_command_t *cmd)
+int jtag_read_buffer(u8 *buffer, const scan_command_t *cmd)
{
int i;
int bit_count = 0;
return retval;
}
-static const char *jtag_tap_name(jtag_tap_t *tap)
+static const char *jtag_tap_name(const jtag_tap_t *tap)
{
return (tap == NULL) ? "(unknown)" : tap->dotted_name;
}
-enum scan_type jtag_scan_type(scan_command_t *cmd)
+enum scan_type jtag_scan_type(const scan_command_t *cmd)
{
int i;
int type = 0;
*/
extern void jtag_add_ir_scan(int num_fields, scan_field_t* fields, tap_state_t endstate);
/* same as jtag_add_ir_scan except no verify is performed */
-extern void jtag_add_ir_scan_noverify(int num_fields, scan_field_t *fields, tap_state_t state);
-extern int interface_jtag_add_ir_scan(int num_fields, scan_field_t* fields, tap_state_t endstate);
-extern void jtag_add_dr_scan(int num_fields, scan_field_t* fields, tap_state_t endstate);
+extern void jtag_add_ir_scan_noverify(int num_fields, const scan_field_t *fields, tap_state_t state);
+extern int interface_jtag_add_ir_scan(int num_fields, const scan_field_t* fields, tap_state_t endstate);
+extern void jtag_add_dr_scan(int num_fields, const scan_field_t* fields, tap_state_t endstate);
/* set in_value to point to 32 bits of memory to scan into. This function
* is a way to handle the case of synchronous and asynchronous
/* This version of jtag_add_dr_scan() uses the check_value/mask fields */
extern void jtag_add_dr_scan_check(int num_fields, scan_field_t* fields, tap_state_t endstate);
-extern int interface_jtag_add_dr_scan(int num_fields, scan_field_t* fields, tap_state_t endstate);
-extern void jtag_add_plain_ir_scan(int num_fields, scan_field_t* fields, tap_state_t endstate);
-extern int interface_jtag_add_plain_ir_scan(int num_fields, scan_field_t* fields, tap_state_t endstate);
-extern void jtag_add_plain_dr_scan(int num_fields, scan_field_t* fields, tap_state_t endstate);
-extern int interface_jtag_add_plain_dr_scan(int num_fields, scan_field_t* fields, tap_state_t endstate);
+extern int interface_jtag_add_dr_scan(int num_fields, const scan_field_t* fields, tap_state_t endstate);
+extern void jtag_add_plain_ir_scan(int num_fields, const scan_field_t* fields, tap_state_t endstate);
+extern int interface_jtag_add_plain_ir_scan(int num_fields, const scan_field_t* fields, tap_state_t endstate);
+extern void jtag_add_plain_dr_scan(int num_fields, const scan_field_t* fields, tap_state_t endstate);
+extern int interface_jtag_add_plain_dr_scan(int num_fields, const scan_field_t* fields, tap_state_t endstate);
/* Simplest/typical callback - do some conversion on the data clocked in.
* a partial implementation of pathmove would have little practical
* application.
*/
-extern void jtag_add_pathmove(int num_states, tap_state_t* path);
-extern int interface_jtag_add_pathmove(int num_states, tap_state_t* path);
+extern void jtag_add_pathmove(int num_states, const tap_state_t* path);
+extern int interface_jtag_add_pathmove(int num_states, const tap_state_t* path);
/* go to TAP_IDLE, if we're not already there and cycle
* precisely num_cycles in the TAP_IDLE after which move
/* execute jtag queue and check value and use mask if mask is != NULL. invokes
* jtag_set_error() with any error. */
extern void jtag_check_value_mask(scan_field_t *field, u8 *value, u8 *mask);
-extern enum scan_type jtag_scan_type(scan_command_t* cmd);
-extern int jtag_scan_size(scan_command_t* cmd);
-extern int jtag_read_buffer(u8* buffer, scan_command_t* cmd);
-extern int jtag_build_buffer(scan_command_t* cmd, u8** buffer);
+extern enum scan_type jtag_scan_type(const scan_command_t* cmd);
+extern int jtag_scan_size(const scan_command_t* cmd);
+extern int jtag_read_buffer(u8* buffer, const scan_command_t* cmd);
+extern int jtag_build_buffer(const scan_command_t* cmd, u8** buffer);
extern void jtag_sleep(u32 us);
extern int jtag_call_event_callbacks(enum jtag_event event);