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
This commit is contained in:
parent
8c21ca7e81
commit
8290a05c2b
|
@ -783,11 +783,9 @@ tap_state_t jtag_get_end_state(void)
|
|||
|
||||
void jtag_add_sleep(u32 us)
|
||||
{
|
||||
keep_alive(); /* we might be running on a very slow JTAG clk */
|
||||
int retval=interface_jtag_add_sleep(us);
|
||||
if (retval!=ERROR_OK)
|
||||
jtag_error=retval;
|
||||
return;
|
||||
/// @todo Here, keep_alive() appears to be a layering violation!!!
|
||||
keep_alive();
|
||||
jtag_set_error(interface_jtag_add_sleep(us));
|
||||
}
|
||||
|
||||
int jtag_check_value_inner(u8 *captured, u8 *in_check_value, u8 *in_check_mask, int num_bits)
|
||||
|
|
Loading…
Reference in New Issue