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) {
6262 if (flash_device -> no_ready_bit ){
6363 // For NVM without a ready bit in status register
6464 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 ;
7165 }
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 ;
7271}
7372
7473// 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) {
171170 }
172171 if (flash_device -> no_erase_cmd ) {
173172 return true;
174- } else {
173+ }
175174 spi_flash_sector_command (CMD_SECTOR_ERASE , sector_address );
176175 return true;
177- }
178176}
179177
180178// Sector is really 24 bits.
You can’t perform that action at this time.
0 commit comments