diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-07 13:04:13 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-07 13:04:13 +0000 |
commit | c4ee880715121ccfb2ad960673d0f5e603c60d3d (patch) | |
tree | 4c642bbe249930cc5b41225c4207721e50a27111 /src/jtag/jtag.h | |
parent | 146b6462a3fea7073a73487d8c943eb0ef20c469 (diff) |
jtag API error handling refactoring.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1638 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/jtag.h')
-rw-r--r-- | src/jtag/jtag.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index c0f94856..ce11d592 100644 --- a/src/jtag/jtag.h +++ b/src/jtag/jtag.h @@ -700,6 +700,9 @@ int interface_jtag_add_clocks(int num_cycles); */ extern int jtag_execute_queue(void); +/* same as jtag_execute_queue() but does not clear the error flag */ +extern void jtag_execute_queue_noclear(void); + /* this flag is set when an error occurs while executing the queue. cleared * by jtag_execute_queue() * @@ -708,6 +711,16 @@ extern int jtag_execute_queue(void); */ extern int jtag_error; +static __inline__ void jtag_set_error(int error) +{ + if ((error==ERROR_OK)||(jtag_error!=ERROR_OK)) + { + /* keep first error */ + return; + } + jtag_error=error; +} + /* can be implemented by hw+sw */ |