diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-09 10:07:07 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-09 10:07:07 +0000 |
commit | e8febc22551f1afe3cfa556f7afb16fd8996b6c8 (patch) | |
tree | 602f5c8e4d457cd08c3709ef7756dde4c8c2fbc0 /src/jtag/jtag.h | |
parent | 5f4ecc60a9ed083d208c56dd5ff50fac81dbe4d5 (diff) | |
download | riscv-openocd-e8febc22551f1afe3cfa556f7afb16fd8996b6c8.zip riscv-openocd-e8febc22551f1afe3cfa556f7afb16fd8996b6c8.tar.gz riscv-openocd-e8febc22551f1afe3cfa556f7afb16fd8996b6c8.tar.bz2 |
Encapsulate the core jtag interface pointer:
- Add new jtag_config_khz to increase encapsulation of jtag->khz call.
- Add new jtag_get_speed_readable to encapsulate of jtag->speed_div call.
- Make definition of jtag static in core.c, remove extern from tcl.c.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2171 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/jtag.h')
-rw-r--r-- | src/jtag/jtag.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index ce8dacc..dcdad8e 100644 --- a/src/jtag/jtag.h +++ b/src/jtag/jtag.h @@ -270,6 +270,14 @@ extern int jtag_call_event_callbacks(enum jtag_event event); /// @returns The current JTAG speed setting. int jtag_get_speed(void); /** + * Given a @a speed setting, use the interface @c speed_div callback to + * adjust the setting. + * @param speed The speed setting to convert back to readable KHz. + * @returns ERROR_OK if the interface has not been initialized or on success; + * otherwise, the error code produced by the @c speed_div callback. + */ +int jtag_get_speed_readable(int *speed); +/** * 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. @@ -708,6 +716,7 @@ unsigned jtag_get_nsrst_delay(void); void jtag_set_ntrst_delay(unsigned delay); unsigned jtag_get_ntrst_delay(void); +int jtag_config_khz(unsigned khz); void jtag_set_speed_khz(unsigned speed); unsigned jtag_get_speed_khz(void); |