#include "jtag.h"
#include "command.h"
+#ifndef HAVE_JTAG_MINIDRIVER_H
struct jtag_callback_entry
{
struct jtag_callback_entry *next;
dst->in_value = src->in_value;
}
+
/**
* see jtag_add_ir_scan()
*
*/
-int MINIDRIVER(interface_jtag_add_ir_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
+int interface_jtag_add_ir_scan(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
size_t num_taps = jtag_NumEnabledTaps();
* see jtag_add_plain_ir_scan()
*
*/
-int MINIDRIVER(interface_jtag_add_plain_ir_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
+int 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));
* see jtag_add_dr_scan()
*
*/
-int MINIDRIVER(interface_jtag_add_dr_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
+int interface_jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
/* count devices in bypass */
* The bypass status of TAPs is set by jtag_add_ir_scan().
*
*/
-void MINIDRIVER(interface_jtag_add_dr_out)(jtag_tap_t *target_tap,
+void interface_jtag_add_dr_out(jtag_tap_t *target_tap,
int in_num_fields,
const int *num_bits,
const u32 *value,
* see jtag_add_plain_dr_scan()
*
*/
-int MINIDRIVER(interface_jtag_add_plain_dr_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
+int 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;
}
-int MINIDRIVER(interface_jtag_add_tlr)(void)
+int interface_jtag_add_tlr(void)
{
tap_state_t state = TAP_RESET;
return ERROR_OK;
}
-int MINIDRIVER(interface_jtag_add_pathmove)(int num_states, const tap_state_t *path)
+int 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 ERROR_OK;
}
-int MINIDRIVER(interface_jtag_add_runtest)(int num_cycles, tap_state_t state)
+int interface_jtag_add_runtest(int num_cycles, tap_state_t state)
{
/* allocate memory for a new list member */
jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
return ERROR_OK;
}
-int MINIDRIVER(interface_jtag_add_clocks)( int num_cycles )
+int interface_jtag_add_clocks( int num_cycles )
{
/* allocate memory for a new list member */
jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
return ERROR_OK;
}
-int MINIDRIVER(interface_jtag_add_reset)(int req_trst, int req_srst)
+int interface_jtag_add_reset(int req_trst, int req_srst)
{
/* allocate memory for a new list member */
jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
return ERROR_OK;
}
-int MINIDRIVER(interface_jtag_add_sleep)(u32 us)
+int interface_jtag_add_sleep(u32 us)
{
/* allocate memory for a new list member */
jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
}
}
-
-static int jtag_convert_to_callback4(u8 *in, jtag_callback_data_t data1, jtag_callback_data_t data2, jtag_callback_data_t data3)
-{
- ((jtag_callback1_t)data1)(in);
- return ERROR_OK;
-}
-
-void jtag_add_callback(jtag_callback1_t callback, u8 *in)
-{
- jtag_add_callback4(jtag_convert_to_callback4, in, (jtag_callback_data_t)callback, 0, 0);
-}
-
void interface_jtag_add_scan_check_alloc(scan_field_t *field)
{
unsigned num_bytes = TAP_SCAN_BYTES(field->num_bits);
{
field->in_value=(u8 *)cmd_queue_alloc(4);
}
+
+static int jtag_convert_to_callback4(u8 *in, jtag_callback_data_t data1, jtag_callback_data_t data2, jtag_callback_data_t data3)
+{
+ ((jtag_callback1_t)data1)(in);
+ return ERROR_OK;
+}
+
+void jtag_add_callback(jtag_callback1_t callback, u8 *in)
+{
+ jtag_add_callback4(jtag_convert_to_callback4, in, (jtag_callback_data_t)callback, 0, 0);
+}
+
+#endif
+
}
-int interface_jtag_add_ir_scan(int num_fields, scan_field_t *fields, tap_state_t state)
+int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
{
int j;
-int interface_jtag_add_plain_ir_scan(int num_fields, scan_field_t *fields, tap_state_t state)
+int interface_jtag_add_plain_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
{
scanFields(num_fields, fields, TAP_IRSHIFT, cmd_queue_end_state);
/*extern jtag_command_t **jtag_get_last_command_p(void);*/
-int interface_jtag_add_dr_scan(int num_fields, scan_field_t *fields, tap_state_t state)
+int interface_jtag_add_dr_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
{
int j;
return ERROR_OK;
}
-int interface_jtag_add_plain_dr_scan(int num_fields, scan_field_t *fields, tap_state_t state)
+int interface_jtag_add_plain_dr_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
{
scanFields(num_fields, fields, TAP_DRSHIFT, cmd_queue_end_state);
return ERROR_OK;
return ERROR_OK;
}
-int interface_jtag_add_pathmove(int num_states, tap_state_t *path)
+int interface_jtag_add_pathmove(int num_states, const tap_state_t *path)
{
int state_count;
int tms = 0;