Skip to content

Commit

Permalink
gatemate: fix passive spi segfaults and improve verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
pu-cc committed Mar 14, 2024
1 parent 5bb8ce8 commit e52d647
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/colognechip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit e52d647

Please sign in to comment.