summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jtag/jtag.c10
-rw-r--r--src/jtag/jtag.h12
-rw-r--r--src/jtag/jtag_driver.c4
-rw-r--r--src/jtag/minidriver.h6
4 files changed, 21 insertions, 11 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 2baa9c51..3a18e43c 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -590,7 +590,17 @@ void jtag_add_plain_ir_scan(int in_num_fields, const scan_field_t *in_fields, ta
jtag_error=retval;
}
+void jtag_add_callback(jtag_callback1_t f, u8 *in)
+{
+ interface_jtag_add_callback(f, in);
+}
+void jtag_add_callback4(jtag_callback_t f, u8 *in,
+ jtag_callback_data_t data1, jtag_callback_data_t data2,
+ jtag_callback_data_t data3)
+{
+ interface_jtag_add_callback4(f, in, data1, data2, data3);
+}
int jtag_check_value_inner(u8 *captured, u8 *in_check_value, u8 *in_check_mask, int num_bits);
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h
index 94928117..a2156b32 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -599,12 +599,8 @@ extern void jtag_add_plain_dr_scan(int num_fields, const scan_field_t* fields, t
* fail, use the jtag_callback_t variant */
typedef void (*jtag_callback1_t)(u8 *in);
-#ifndef HAVE_JTAG_MINIDRIVER_H
/* A simpler version of jtag_add_callback4 */
extern void jtag_add_callback(jtag_callback1_t, u8 *in);
-#else
-/* implemented by minidriver */
-#endif
/* This type can store an integer safely by a normal cast on 64 and
@@ -650,11 +646,9 @@ typedef int (*jtag_callback_t)(u8 *in, jtag_callback_data_t data1, jtag_callback
* If the execution of the queue fails before the callbacks, then the
* callbacks may or may not be invoked depending on driver implementation.
*/
-#ifndef HAVE_JTAG_MINIDRIVER_H
-extern void jtag_add_callback4(jtag_callback_t, u8 *in, jtag_callback_data_t data1, jtag_callback_data_t data2, jtag_callback_data_t data3);
-#else
-/* implemented by minidriver */
-#endif
+extern void jtag_add_callback4(jtag_callback_t, u8 *in,
+ jtag_callback_data_t data1, jtag_callback_data_t data2,
+ jtag_callback_data_t data3);
/* run a TAP_RESET reset. End state is TAP_RESET, regardless
diff --git a/src/jtag/jtag_driver.c b/src/jtag/jtag_driver.c
index c58d5d7e..c0b9eaaa 100644
--- a/src/jtag/jtag_driver.c
+++ b/src/jtag/jtag_driver.c
@@ -466,7 +466,7 @@ int interface_jtag_add_sleep(u32 us)
}
/* add callback to end of queue */
-void jtag_add_callback4(jtag_callback_t callback, u8 *in, jtag_callback_data_t data1, jtag_callback_data_t data2, jtag_callback_data_t data3)
+void interface_jtag_add_callback4(jtag_callback_t callback, u8 *in, jtag_callback_data_t data1, jtag_callback_data_t data2, jtag_callback_data_t data3)
{
struct jtag_callback_entry *entry=cmd_queue_alloc(sizeof(struct jtag_callback_entry));
@@ -514,7 +514,7 @@ static int jtag_convert_to_callback4(u8 *in, jtag_callback_data_t data1, jtag_ca
return ERROR_OK;
}
-void jtag_add_callback(jtag_callback1_t callback, u8 *in)
+void interface_jtag_add_callback(jtag_callback1_t callback, u8 *in)
{
jtag_add_callback4(jtag_convert_to_callback4, in, (jtag_callback_data_t)callback, 0, 0);
}
diff --git a/src/jtag/minidriver.h b/src/jtag/minidriver.h
index 6a759bfb..7e9589d4 100644
--- a/src/jtag/minidriver.h
+++ b/src/jtag/minidriver.h
@@ -83,6 +83,12 @@ extern void interface_jtag_add_dr_out(jtag_tap_t* tap,
int num_fields, const int* num_bits, const u32* value,
tap_state_t end_state);
+extern void interface_jtag_add_callback(jtag_callback1_t f, u8 *in);
+
+extern void interface_jtag_add_callback4(jtag_callback_t f, u8 *in,
+ jtag_callback_data_t data1, jtag_callback_data_t data2,
+ jtag_callback_data_t data3);
+
#endif
extern int interface_jtag_add_ir_scan(