Skip to content

Commit

Permalink
flash: add note about program size
Browse files Browse the repository at this point in the history
Program size - the writable page size that flash controller supports.
Plus fix program page description - multiple pages program
  • Loading branch information
0xc0170 committed Sep 6, 2017
1 parent 4978a08 commit 3f58d3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions drivers/FlashIAP.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class FlashIAP : private NonCopyable<FlashIAP> {

/** Get the program page size
*
* The page size defines the writable page size
* @return Size of a program page in bytes
*/
uint32_t get_page_size() const;
Expand Down
5 changes: 3 additions & 2 deletions hal/flash_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ int32_t flash_erase_sector(flash_t *obj, uint32_t address);
*/
int32_t flash_read(flash_t *obj, uint32_t address, uint8_t *data, uint32_t size);

/** Program one page starting at defined address
/** Program pages starting at defined address
*
* The page should be at page boundary, should not cross multiple sectors.
* The pages should not cross multiple sectors.
* This function does not do any check for address alignments or if size is aligned to a page size.
* @param obj The flash object
* @param address The sector starting address
Expand All @@ -97,6 +97,7 @@ uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address);

/** Get page size
*
* The page size defines the writable page size
* @param obj The flash object
* @return The size of a page
*/
Expand Down

0 comments on commit 3f58d3e

Please sign in to comment.