summaryrefslogtreecommitdiff
path: root/src/jtag/jtag.c
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-02 23:15:12 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-02 23:15:12 +0000
commita5467296097cc0a820da3aad65dcd9de196fc1be (patch)
tree06fe064c886f05e120a43645e0149179bfb91c9f /src/jtag/jtag.c
parent7dc29156fee5d4ae30f65f4c82e8cefde763fe40 (diff)
downloadopenocd_libswd-a5467296097cc0a820da3aad65dcd9de196fc1be.tar.gz
openocd_libswd-a5467296097cc0a820da3aad65dcd9de196fc1be.tar.bz2
openocd_libswd-a5467296097cc0a820da3aad65dcd9de196fc1be.tar.xz
openocd_libswd-a5467296097cc0a820da3aad65dcd9de196fc1be.zip
Add header file for JTAG minidriver:
- Wraps all minidriver API functions using API front-ends: - Outlines jtag_add_dr_out() and jtag_alloc_in_value32(). - Adds interface_ prefix to existing jtag_alloc_invalue_32 routines. - Re-inline these interface definitions in new header file. - Re-inline parts of the (mini)driver implementations in minidriver.h. - Replace INCLUDE_JTAG_MINIDRIVER_H with #include directives. The next patch will finish removing '#ifdef HAVE_JTAG_MINIDRIVER_H' from jtag.h. git-svn-id: svn://svn.berlios.de/openocd/trunk@2006 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/jtag.c')
-rw-r--r--src/jtag/jtag.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 593200ee..2baa9c51 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -28,9 +28,9 @@
#include "config.h"
#endif
-#define INCLUDE_JTAG_MINIDRIVER_H
#define INCLUDE_JTAG_INTERFACE_H
#include "jtag.h"
+#include "minidriver.h"
#ifdef HAVE_STRINGS_H
#include <strings.h>
@@ -526,6 +526,11 @@ static void jtag_prelude(tap_state_t state)
cmd_queue_cur_state = cmd_queue_end_state;
}
+void jtag_alloc_in_value32(scan_field_t *field)
+{
+ interface_jtag_alloc_in_value32(field);
+}
+
void jtag_add_ir_scan_noverify(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
int retval;
@@ -682,7 +687,19 @@ void jtag_add_plain_dr_scan(int in_num_fields, const scan_field_t *in_fields, ta
jtag_error=retval;
}
+void jtag_add_dr_out(jtag_tap_t* tap,
+ int num_fields, const int* num_bits, const u32* value,
+ tap_state_t end_state)
+{
+ if (end_state != TAP_INVALID)
+ cmd_queue_end_state = end_state;
+ cmd_queue_cur_state = cmd_queue_end_state;
+
+ interface_jtag_add_dr_out(tap,
+ num_fields, num_bits, value,
+ cmd_queue_end_state);
+}
void jtag_add_tlr(void)
{