spiFlash: extract status register display from read_status_reg

This commit is contained in:
Gwenhael Goavec-Merou
2021-10-19 07:06:46 +02:00
parent 6714400909
commit 3730e8189d
7 changed files with 29 additions and 14 deletions
+1 -1
View File
@@ -238,7 +238,7 @@ void Gowin::program(unsigned int offset)
SPIFlash spiFlash(this, (_verbose ? 1 : (_quiet ? -1 : 0)));
spiFlash.reset();
spiFlash.read_id();
spiFlash.read_status_reg();
spiFlash.display_status_reg(spiFlash.read_status_reg());
if (spiFlash.erase_and_prog(offset, data, length / 8) != 0)
throw std::runtime_error("Error: write to flash failed");
if (_verify)