ice40: uses verbose_level for SPIFlash instead of verbose/quiet (#555)
This commit is contained in:
parent
c6d4a8bff1
commit
32f744979c
|
|
@ -77,7 +77,7 @@ bool Ice40::program_cram(const uint8_t *data, uint32_t length)
|
|||
|
||||
/* load configuration data MSB first
|
||||
*/
|
||||
ProgressBar progress("Loading to CRAM", length, 50, _verbose);
|
||||
ProgressBar progress("Loading to CRAM", length, 50, _quiet);
|
||||
const uint8_t *ptr = data;
|
||||
int size = 0;
|
||||
for (uint32_t addr = 0; addr < length; addr += size, ptr+=size) {
|
||||
|
|
@ -139,7 +139,7 @@ void Ice40::program(unsigned int offset, bool unprotect_flash)
|
|||
_spi->gpio_clear(_rst_pin);
|
||||
|
||||
SPIFlash flash(reinterpret_cast<SPIInterface *>(_spi), unprotect_flash,
|
||||
_quiet);
|
||||
_verbose_level);
|
||||
|
||||
printf("%02x\n", flash.read_status_reg());
|
||||
flash.read_id();
|
||||
|
|
@ -170,7 +170,7 @@ bool Ice40::dumpFlash(uint32_t base_addr, uint32_t len)
|
|||
/* prepare SPI access */
|
||||
printInfo("Read Flash ", false);
|
||||
try {
|
||||
SPIFlash flash(reinterpret_cast<SPIInterface *>(_spi), false, _verbose);
|
||||
SPIFlash flash(reinterpret_cast<SPIInterface *>(_spi), false, _verbose_level);
|
||||
flash.reset();
|
||||
flash.power_up();
|
||||
flash.dump(_filename, base_addr, len);
|
||||
|
|
@ -204,7 +204,7 @@ bool Ice40::protect_flash(uint32_t len)
|
|||
prepare_flash_access();
|
||||
/* acess */
|
||||
try {
|
||||
SPIFlash flash(reinterpret_cast<SPIInterface *>(_spi), false, _verbose);
|
||||
SPIFlash flash(reinterpret_cast<SPIInterface *>(_spi), false, _verbose_level);
|
||||
/* configure flash protection */
|
||||
if (flash.enable_protection(len) == -1)
|
||||
return false;
|
||||
|
|
@ -224,7 +224,7 @@ bool Ice40::unprotect_flash()
|
|||
prepare_flash_access();
|
||||
/* acess */
|
||||
try {
|
||||
SPIFlash flash(reinterpret_cast<SPIInterface *>(_spi), false, _verbose);
|
||||
SPIFlash flash(reinterpret_cast<SPIInterface *>(_spi), false, _verbose_level);
|
||||
/* configure flash protection */
|
||||
if (flash.disable_protection() == -1)
|
||||
return false;
|
||||
|
|
@ -244,7 +244,7 @@ bool Ice40::bulk_erase_flash()
|
|||
prepare_flash_access();
|
||||
/* acess */
|
||||
try {
|
||||
SPIFlash flash(reinterpret_cast<SPIInterface *>(_spi), false, _verbose);
|
||||
SPIFlash flash(reinterpret_cast<SPIInterface *>(_spi), false, _verbose_level);
|
||||
/* bulk erase flash */
|
||||
if (flash.bulk_erase() == -1)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue