summaryrefslogtreecommitdiff
path: root/src/flash/lpc2000.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/flash/lpc2000.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/flash/lpc2000.c')
-rw-r--r--src/flash/lpc2000.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/lpc2000.c b/src/flash/lpc2000.c
index 79f58045..a3f97180 100644
--- a/src/flash/lpc2000.c
+++ b/src/flash/lpc2000.c
@@ -573,7 +573,7 @@ static int lpc2000_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offs
{
if (offset >= bank->sectors[i].offset)
first_sector = i;
- if (offset + CEIL(count, dst_min_alignment) * dst_min_alignment > bank->sectors[i].offset)
+ if (offset + DIV_ROUND_UP(count, dst_min_alignment) * dst_min_alignment > bank->sectors[i].offset)
last_sector = i;
}