STM32: remove trailing white spaces

pull/5455/head
Laurent MEUNIER 2017-11-08 09:02:39 +01:00
parent d9bda2800d
commit 48a49b4a00
1 changed files with 5 additions and 6 deletions

View File

@ -145,7 +145,6 @@ int32_t flash_program_page(flash_t *obj, uint32_t address, const uint8_t *data,
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)
{ {
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;
} }
@ -165,7 +164,7 @@ uint32_t flash_get_start_address(const flash_t *obj)
} }
uint32_t flash_get_size(const flash_t *obj) uint32_t flash_get_size(const flash_t *obj)
{ {
return FLASH_SIZE; return FLASH_SIZE;
} }
/** /**
@ -175,7 +174,7 @@ uint32_t flash_get_size(const flash_t *obj)
*/ */
static uint32_t GetSector(uint32_t address) static uint32_t GetSector(uint32_t address)
{ {
uint32_t sector = 0; uint32_t sector = 0;
uint32_t tmp = address - ADDR_FLASH_SECTOR_0; uint32_t tmp = address - ADDR_FLASH_SECTOR_0;
/* This function supports 1Mb and 2Mb flash sizes */ /* This function supports 1Mb and 2Mb flash sizes */
#if defined(ADDR_FLASH_SECTOR_16) #if defined(ADDR_FLASH_SECTOR_16)
@ -191,14 +190,14 @@ static uint32_t GetSector(uint32_t address)
} }
#if defined(ADDR_FLASH_SECTOR_5) #if defined(ADDR_FLASH_SECTOR_5)
else if (address < ADDR_FLASH_SECTOR_5) { //64k sector size else if (address < ADDR_FLASH_SECTOR_5) { //64k sector size
sector += FLASH_SECTOR_4; sector += FLASH_SECTOR_4;
} else { } else {
sector += 4 + (tmp >>17); sector += 4 + (tmp >>17);
} }
#else #else
// In case ADDR_FLASH_SECTOR_5 is not defined, sector 4 is the last one. // In case ADDR_FLASH_SECTOR_5 is not defined, sector 4 is the last one.
else { //64k sector size else { //64k sector size
sector += FLASH_SECTOR_4; sector += FLASH_SECTOR_4;
} }
#endif #endif
return sector; return sector;
@ -227,7 +226,7 @@ if((Sector == FLASH_SECTOR_0) || (Sector == FLASH_SECTOR_1) || (Sector == FLASH_
sectorsize = 64 * 1024; sectorsize = 64 * 1024;
} else { } else {
sectorsize = 128 * 1024; sectorsize = 128 * 1024;
} }
return sectorsize; return sectorsize;
} }