File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
supervisor/shared/external_flash Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -62,13 +62,12 @@ static bool wait_for_flash_ready(void) {
62
62
if (flash_device -> no_ready_bit ){
63
63
// For NVM without a ready bit in status register
64
64
return ok ;
65
- } else {
66
- uint8_t read_status_response [1 ] = {0x00 };
67
- do {
68
- ok = spi_flash_read_command (CMD_READ_STATUS , read_status_response , 1 );
69
- } while (ok && (read_status_response [0 ] & 0x3 ) != 0 );
70
- return ok ;
71
65
}
66
+ uint8_t read_status_response [1 ] = {0x00 };
67
+ do {
68
+ ok = spi_flash_read_command (CMD_READ_STATUS , read_status_response , 1 );
69
+ } while (ok && (read_status_response [0 ] & 0x3 ) != 0 );
70
+ return ok ;
72
71
}
73
72
74
73
// Turn on the write enable bit so we can program and erase the flash.
@@ -171,10 +170,9 @@ static bool erase_sector(uint32_t sector_address) {
171
170
}
172
171
if (flash_device -> no_erase_cmd ) {
173
172
return true;
174
- } else {
173
+ }
175
174
spi_flash_sector_command (CMD_SECTOR_ERASE , sector_address );
176
175
return true;
177
- }
178
176
}
179
177
180
178
// Sector is really 24 bits.
You can’t perform that action at this time.
0 commit comments