Skip to content
Snippets Groups Projects
Commit 8290a05c authored by zwelch's avatar zwelch
Browse files

Simplify jtag_add_sleep:

- Add todo for removing keep_alive: is this a layering violation?
- Use jtag_set_error instead of accessing jtag_error directly.
- Remove superfluous retval temporary variable and empty return.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2127 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent 8c21ca7e
Branches
No related tags found
No related merge requests found
...@@ -783,11 +783,9 @@ tap_state_t jtag_get_end_state(void) ...@@ -783,11 +783,9 @@ tap_state_t jtag_get_end_state(void)
void jtag_add_sleep(u32 us) void jtag_add_sleep(u32 us)
{ {
keep_alive(); /* we might be running on a very slow JTAG clk */ /// @todo Here, keep_alive() appears to be a layering violation!!!
int retval=interface_jtag_add_sleep(us); keep_alive();
if (retval!=ERROR_OK) jtag_set_error(interface_jtag_add_sleep(us));
jtag_error=retval;
return;
} }
int jtag_check_value_inner(u8 *captured, u8 *in_check_value, u8 *in_check_mask, int num_bits) int jtag_check_value_inner(u8 *captured, u8 *in_check_value, u8 *in_check_mask, int num_bits)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment