diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index f418b7310..a1291eee3 100644 --- a/src/jtag/jtag.h +++ b/src/jtag/jtag.h @@ -237,7 +237,7 @@ 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)) +#define TAP_SCAN_BYTES(n) CEIL(n, 8) typedef struct scan_field_s {