Nuand/bladeRF — pull request #120 by DanielG (2013-09-27 21:22:06+00:00)
Title: Change addressing of flash access functions to bytes

Using byte addressing with alignment constraints is more consistent than using mixed sector/page/byte addressing and prevents bugs like the one I fixed with this changeset.

Before there was a c&p mistake in the exported API where bladerf_erase_flash was documented to expect a page_offset but the implementation in lusb_erase_flash actually expected a sector_offset.

Also there are a bunch of places in the code with assert statements like:
assert((page_offset + n_bytes) < FLASH_NUM_PAGES);
where mixing of pages and bytes is also causing bugs.

This change has the added benefit that now all functions take all their arguments in bytes instead of secrors/pages for the address and bytes for the length which is just plain confusing for the user.