gatemate: fix passive spi segfaults and improve verbosity

This commit is contained in:
Patrick Urban 2024-03-15 00:11:11 +01:00
parent 5bb8ce83b3
commit e52d647d7b
1 changed files with 3 additions and 3 deletions

View File

@ -217,14 +217,14 @@ void CologneChip::programSPI_sram(const uint8_t *data, int length)
/* hold device in reset for a moment */
reset();
uint8_t *recv = new uint8_t[length];
ProgressBar progress("Loading SRAM via SPI", length, 50, _verbose);
_spi->gpio_set(_rstn_pin);
_spi->spi_put(data, recv, length); // TODO _spi->spi_put(data, null, length) does not work?
_spi->spi_put(data, NULL, length);
progress.done();
waitCfgDone();
_spi->gpio_set(_oen_pin);
delete [] recv;
}
/**