Skip to content

Commit f81521a

Browse files
LMESTMadbridge
authored andcommitted
STM32: remove trailing white spaces
1 parent e20d35d commit f81521a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

targets/TARGET_STM/TARGET_STM32F4/flash_api.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ int32_t flash_program_page(flash_t *obj, uint32_t address, const uint8_t *data,
145145

146146
uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address)
147147
{
148-
149148
if ((address >= (FLASH_BASE + FLASH_SIZE)) || (address < FLASH_BASE)) {
150149
return MBED_FLASH_INVALID_SIZE;
151150
}
@@ -165,7 +164,7 @@ uint32_t flash_get_start_address(const flash_t *obj)
165164
}
166165
uint32_t flash_get_size(const flash_t *obj)
167166
{
168-
return FLASH_SIZE;
167+
return FLASH_SIZE;
169168
}
170169

171170
/**
@@ -175,7 +174,7 @@ uint32_t flash_get_size(const flash_t *obj)
175174
*/
176175
static uint32_t GetSector(uint32_t address)
177176
{
178-
uint32_t sector = 0;
177+
uint32_t sector = 0;
179178
uint32_t tmp = address - ADDR_FLASH_SECTOR_0;
180179
/* This function supports 1Mb and 2Mb flash sizes */
181180
#if defined(ADDR_FLASH_SECTOR_16)
@@ -191,14 +190,14 @@ static uint32_t GetSector(uint32_t address)
191190
}
192191
#if defined(ADDR_FLASH_SECTOR_5)
193192
else if (address < ADDR_FLASH_SECTOR_5) { //64k sector size
194-
sector += FLASH_SECTOR_4;
193+
sector += FLASH_SECTOR_4;
195194
} else {
196195
sector += 4 + (tmp >>17);
197196
}
198197
#else
199198
// In case ADDR_FLASH_SECTOR_5 is not defined, sector 4 is the last one.
200199
else { //64k sector size
201-
sector += FLASH_SECTOR_4;
200+
sector += FLASH_SECTOR_4;
202201
}
203202
#endif
204203
return sector;
@@ -227,7 +226,7 @@ if((Sector == FLASH_SECTOR_0) || (Sector == FLASH_SECTOR_1) || (Sector == FLASH_
227226
sectorsize = 64 * 1024;
228227
} else {
229228
sectorsize = 128 * 1024;
230-
}
229+
}
231230
return sectorsize;
232231
}
233232

0 commit comments

Comments
 (0)