Formatting tidy up.

pull/4640/head
Chris 2017-06-27 09:40:30 +01:00
parent 65ab95572c
commit ed51bcb1d0
1 changed files with 8 additions and 4 deletions

View File

@ -116,7 +116,8 @@ int32_t flash_program_page(flash_t *obj, uint32_t address,
return 0; return 0;
} }
uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address) { uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address)
{
/* considering 1 sector = 1 page */ /* considering 1 sector = 1 page */
if ((address >= (FLASH_BASE + FLASH_SIZE)) || (address < FLASH_BASE)) { if ((address >= (FLASH_BASE + FLASH_SIZE)) || (address < FLASH_BASE)) {
return MBED_FLASH_INVALID_SIZE; return MBED_FLASH_INVALID_SIZE;
@ -125,16 +126,19 @@ uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address) {
} }
} }
uint32_t flash_get_page_size(const flash_t *obj) { uint32_t flash_get_page_size(const flash_t *obj)
{
/* considering 1 sector = 1 page */ /* considering 1 sector = 1 page */
return FLASH_PAGE_SIZE; return FLASH_PAGE_SIZE;
} }
uint32_t flash_get_start_address(const flash_t *obj) { uint32_t flash_get_start_address(const flash_t *obj)
{
return FLASH_BASE; return FLASH_BASE;
} }
uint32_t flash_get_size(const flash_t *obj) { uint32_t flash_get_size(const flash_t *obj)
{
return FLASH_SIZE; return FLASH_SIZE;
} }