summaryrefslogtreecommitdiff
path: root/src/jtag/jtag.h
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-09 08:40:10 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-09 08:40:10 +0000
commitcd7f89f6bcc954da3ffa5b9b9eca49c32e152e7d (patch)
tree5d44e9d87a46d927c55e8735892dc22d347ae33f /src/jtag/jtag.h
parentbcad121d2ba3fffebb9b1cd126d3225aeb9711b8 (diff)
downloadopenocd+libswd-cd7f89f6bcc954da3ffa5b9b9eca49c32e152e7d.tar.gz
openocd+libswd-cd7f89f6bcc954da3ffa5b9b9eca49c32e152e7d.tar.bz2
openocd+libswd-cd7f89f6bcc954da3ffa5b9b9eca49c32e152e7d.tar.xz
openocd+libswd-cd7f89f6bcc954da3ffa5b9b9eca49c32e152e7d.zip
Add get and set accessors for jtag_speed:
- Setter calls the interface driver callback to improve core encapsulation. - Use getter in standard JTAG interface drivers and ZY1000 minidriver. git-svn-id: svn://svn.berlios.de/openocd/trunk@2159 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/jtag.h')
-rw-r--r--src/jtag/jtag.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h
index fd4953ec..0e21738e 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -255,7 +255,17 @@ typedef struct jtag_event_callback_s
struct jtag_event_callback_s* next;
} jtag_event_callback_t;
-extern int jtag_speed;
+/// @returns The current JTAG speed setting.
+int jtag_get_speed(void);
+/**
+ * Set the JTAG speed. This routine will call the underlying
+ * interface @c speed callback, if the interface has been initialized.
+ * @param speed The new speed setting.
+ * @returns ERROR_OK during configuration or on success, or an error
+ * code returned from the interface @c speed callback.
+ */
+int jtag_set_speed(int speed);
+
extern int jtag_speed_post_reset;
enum reset_types {