mirror of
https://github.com/badgeteam/mch2022-template-app.git
synced 2024-12-22 07:06:38 +00:00
fpga_download: Fix endianness of key report SPI messages
SPI uses big endian conventionally. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
c3ce551769
commit
db3d5365aa
1 changed files with 4 additions and 4 deletions
|
@ -113,10 +113,10 @@ esp_err_t fpga_process_events(xQueueHandle buttonQueue, ICE40* ice40, uint16_t *
|
|||
}
|
||||
|
||||
uint8_t spi_message[5] = { 0xf4 };
|
||||
spi_message[1] = *key_state & 0xff;
|
||||
spi_message[2] = *key_state >> 8;
|
||||
spi_message[3] = key_mask & 0xff;
|
||||
spi_message[4] = key_mask >> 8;
|
||||
spi_message[1] = *key_state >> 8;
|
||||
spi_message[2] = *key_state & 0xff;
|
||||
spi_message[3] = key_mask >> 8;
|
||||
spi_message[4] = key_mask & 0xff;
|
||||
esp_err_t res = ice40_send(ice40, spi_message, 5);
|
||||
if (res != ESP_OK) {
|
||||
return res;
|
||||
|
|
Loading…
Reference in a new issue