From: oharboe Date: Sun, 26 Apr 2009 20:02:15 +0000 (+0000) Subject: Zach Welch add TAP_SCAN_BYTES macro X-Git-Tag: v0.2.0~974 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8f56912fc25618d0c31f92972ffd8f841ce25310;p=openocd Zach Welch add TAP_SCAN_BYTES macro git-svn-id: svn://svn.berlios.de/openocd/trunk@1529 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index f418b731..a1291eee 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 {