summaryrefslogtreecommitdiff
path: root/src/jtag/core.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-16 02:53:57 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-16 09:58:11 -0800
commita94748ec6da9bdc6e25a7f73bbea723b8b55fa33 (patch)
treec6aebc5e8f39d0918f9a88dd43e373ea9d28e210 /src/jtag/core.c
parentf0ce88b3af9a6090ac986160950d66317de5087e (diff)
downloadopenocd_libswd-a94748ec6da9bdc6e25a7f73bbea723b8b55fa33.tar.gz
openocd_libswd-a94748ec6da9bdc6e25a7f73bbea723b8b55fa33.tar.bz2
openocd_libswd-a94748ec6da9bdc6e25a7f73bbea723b8b55fa33.tar.xz
openocd_libswd-a94748ec6da9bdc6e25a7f73bbea723b8b55fa33.zip
rename CEIL as DIV_ROUND_UP
Improves the name of this macro, moves it to types.h, and adds a block of Doxygen comments to describe what it does.
Diffstat (limited to 'src/jtag/core.c')
-rw-r--r--src/jtag/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jtag/core.c b/src/jtag/core.c
index 1841dde9..c8a76e88 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -1193,7 +1193,7 @@ static int jtag_validate_ircapture(void)
/* increase length to add 2 bit sentinel after scan */
total_ir_length += 2;
- ir_test = malloc(CEIL(total_ir_length, 8));
+ ir_test = malloc(DIV_ROUND_UP(total_ir_length, 8));
if (ir_test == NULL)
return ERROR_FAIL;
@@ -1293,7 +1293,7 @@ void jtag_tap_init(struct jtag_tap *tap)
/* if we're autoprobing, cope with potentially huge ir_length */
ir_len_bits = tap->ir_length ? : JTAG_IRLEN_MAX;
- ir_len_bytes = CEIL(ir_len_bits, 8);
+ ir_len_bytes = DIV_ROUND_UP(ir_len_bits, 8);
tap->expected = calloc(1, ir_len_bytes);
tap->expected_mask = calloc(1, ir_len_bytes);