aboutsummaryrefslogtreecommitdiff
path: root/src/target/etb.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/target/etb.c
parentf0ce88b3af9a6090ac986160950d66317de5087e (diff)
downloadriscv-openocd-a94748ec6da9bdc6e25a7f73bbea723b8b55fa33.zip
riscv-openocd-a94748ec6da9bdc6e25a7f73bbea723b8b55fa33.tar.gz
riscv-openocd-a94748ec6da9bdc6e25a7f73bbea723b8b55fa33.tar.bz2
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/target/etb.c')
-rw-r--r--src/target/etb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/etb.c b/src/target/etb.c
index 72474cd..21c375c 100644
--- a/src/target/etb.c
+++ b/src/target/etb.c
@@ -57,7 +57,7 @@ static int etb_set_instr(struct etb *etb, uint32_t new_instr)
field.tap = tap;
field.num_bits = tap->ir_length;
- field.out_value = calloc(CEIL(field.num_bits, 8), 1);
+ field.out_value = calloc(DIV_ROUND_UP(field.num_bits, 8), 1);
buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
field.in_value = NULL;
@@ -78,7 +78,7 @@ static int etb_scann(struct etb *etb, uint32_t new_scan_chain)
field.tap = etb->tap;
field.num_bits = 5;
- field.out_value = calloc(CEIL(field.num_bits, 8), 1);
+ field.out_value = calloc(DIV_ROUND_UP(field.num_bits, 8), 1);
buf_set_u32(field.out_value, 0, field.num_bits, new_scan_chain);
field.in_value = NULL;