properly fill dummy arrays
This commit is contained in:
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)
|
uint32_t timeout, bool verbose)
|
||||||
{
|
{
|
||||||
uint8_t rx[2], dummy[2], tmp;
|
uint8_t rx[2], dummy[2], tmp;
|
||||||
|
memset(dummy, 0xff, sizeof(dummy));
|
||||||
uint8_t tx = EfinixHexParser::reverseByte(cmd);
|
uint8_t tx = EfinixHexParser::reverseByte(cmd);
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,8 @@ bool Ice40::program_cram(const uint8_t *data, uint32_t length)
|
||||||
progress.done();
|
progress.done();
|
||||||
|
|
||||||
/* send 48 to 100 dummy bits */
|
/* 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);
|
_spi->spi_put(dummy, NULL, 12);
|
||||||
|
|
||||||
/* wait CDONE */
|
/* wait CDONE */
|
||||||
|
|
|
||||||
|
|
@ -1577,7 +1577,8 @@ int Xilinx::spi_wait(uint8_t cmd, uint8_t mask, uint8_t cond,
|
||||||
uint32_t timeout, bool verbose)
|
uint32_t timeout, bool verbose)
|
||||||
{
|
{
|
||||||
uint8_t rx[2];
|
uint8_t rx[2];
|
||||||
uint8_t dummy[2] = {0xff};
|
uint8_t dummy[2];
|
||||||
|
memset(dummy, 0xff, sizeof(dummy));
|
||||||
uint8_t tmp;
|
uint8_t tmp;
|
||||||
uint8_t tx = McsParser::reverseByte(cmd);
|
uint8_t tx = McsParser::reverseByte(cmd);
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue