[sw/example/demo_spi_irq/main.c]: fix wrong usage of memset, memset accepts size in byte, and sizeof returns umber of bytes. No element division necessary.

This commit is contained in:
Andreas Kaeberlein 2023-03-04 17:35:25 +01:00
parent 83d4450dd2
commit 52a826f022

View file

@ -118,7 +118,7 @@ int main()
neorv32_spi_enable();
// IRQ based data transfer
memset(uint8MemBuf, 0, sizeof(uint8MemBuf)/sizeof(uint8MemBuf[0])); // fill with 0's
memset(uint8MemBuf, 0, sizeof(uint8MemBuf)); // fill with 0's
uint8MemBuf[0] = 0x3;
uint8MemBuf[1] = 0x0;
uint8MemBuf[2] = 0x0;