mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-29 17:39:36 +02:00
properly fill dummy arrays
This commit is contained in:
committed by
Gwenhael Goavec-Merou
parent
d3410e0e30
commit
b10be9ae8a
@@ -469,6 +469,7 @@ int Efinix::spi_wait(uint8_t cmd, uint8_t mask, uint8_t cond,
|
||||
uint32_t timeout, bool verbose)
|
||||
{
|
||||
uint8_t rx[2], dummy[2], tmp;
|
||||
memset(dummy, 0xff, sizeof(dummy));
|
||||
uint8_t tx = EfinixHexParser::reverseByte(cmd);
|
||||
uint32_t count = 0;
|
||||
|
||||
|
||||
+2
-1
@@ -89,7 +89,8 @@ bool Ice40::program_cram(const uint8_t *data, uint32_t length)
|
||||
progress.done();
|
||||
|
||||
/* send 48 to 100 dummy bits */
|
||||
uint8_t dummy[12] = {0xff};
|
||||
uint8_t dummy[12];
|
||||
memset(dummy, 0xff, sizeof(dummy));
|
||||
_spi->spi_put(dummy, NULL, 12);
|
||||
|
||||
/* wait CDONE */
|
||||
|
||||
+2
-1
@@ -1577,7 +1577,8 @@ int Xilinx::spi_wait(uint8_t cmd, uint8_t mask, uint8_t cond,
|
||||
uint32_t timeout, bool verbose)
|
||||
{
|
||||
uint8_t rx[2];
|
||||
uint8_t dummy[2] = {0xff};
|
||||
uint8_t dummy[2];
|
||||
memset(dummy, 0xff, sizeof(dummy));
|
||||
uint8_t tmp;
|
||||
uint8_t tx = McsParser::reverseByte(cmd);
|
||||
uint32_t count = 0;
|
||||
|
||||
Reference in New Issue
Block a user