Skip to content
Snippets Groups Projects
Commit 447a615d authored by oharboe's avatar oharboe
Browse files

Zach Welch <zw@superlucidity.net> add TAP_SCAN_BYTES macro (1 of 2)

git-svn-id: svn://svn.berlios.de/openocd/trunk@1524 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent 002fdcf0
No related branches found
No related tags found
No related merge requests found
......@@ -672,7 +672,7 @@ static int jlink_tap_execute(void)
return ERROR_OK;
// number of full bytes (plus one if some would be left over)
byte_length = tap_length / 8 + !!(tap_length % 8);
byte_length = TAP_SCAN_BYTES(tap_length);
usb_out_buffer[0] = EMU_CMD_HW_JTAG3;
usb_out_buffer[1] = 0;
......
......@@ -217,6 +217,9 @@ typedef void* error_handler_t; /* Later on we can delete error_handler_t, but k
struct scan_field_s;
typedef int (*in_handler_t)(u8* in_value, void* priv, struct scan_field_s* field);
/// @brief calculates number of bytes required to hold @a n TAP scan bits
#define TAP_SCAN_BYTES(n) (((n) / 8) + !!((n) % 8))
typedef struct scan_field_s
{
jtag_tap_t* tap; /* tap pointer this instruction refers to */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment