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.
This commit is contained in:
Zachary T Welch
2009-11-16 02:53:57 -08:00
parent f0ce88b3af
commit a94748ec6d
19 changed files with 60 additions and 53 deletions

View File

@@ -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;
}