diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-16 02:53:57 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-16 09:58:11 -0800 |
commit | a94748ec6da9bdc6e25a7f73bbea723b8b55fa33 (patch) | |
tree | c6aebc5e8f39d0918f9a88dd43e373ea9d28e210 /src/jtag/commands.c | |
parent | f0ce88b3af9a6090ac986160950d66317de5087e (diff) |
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/commands.c')
-rw-r--r-- | src/jtag/commands.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jtag/commands.c b/src/jtag/commands.c index ccd6d0f1..4e8ce40f 100644 --- a/src/jtag/commands.c +++ b/src/jtag/commands.c @@ -179,7 +179,7 @@ int jtag_build_buffer(const struct scan_command *cmd, uint8_t **buffer) int i; bit_count = jtag_scan_size(cmd); - *buffer = calloc(1,CEIL(bit_count, 8)); + *buffer = calloc(1,DIV_ROUND_UP(bit_count, 8)); bit_count = 0; @@ -235,7 +235,7 @@ int jtag_read_buffer(uint8_t *buffer, const struct scan_command *cmd) if (cmd->fields[i].in_value) { int num_bits = cmd->fields[i].num_bits; - uint8_t *captured = buf_set_buf(buffer, bit_count, malloc(CEIL(num_bits, 8)), 0, num_bits); + uint8_t *captured = buf_set_buf(buffer, bit_count, malloc(DIV_ROUND_UP(num_bits, 8)), 0, num_bits); #ifdef _DEBUG_JTAG_IO_ char *char_buf = buf_to_str(captured, |