mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-22 00:46:54 +00:00
fix(driver_spi): fixed slave example error on esp32p4
This commit is contained in:
@@ -96,11 +96,10 @@ void app_main(void)
|
||||
ret = spi_slave_initialize(RCV_HOST, &buscfg, &slvcfg, SPI_DMA_CH_AUTO);
|
||||
assert(ret == ESP_OK);
|
||||
|
||||
WORD_ALIGNED_ATTR char sendbuf[129] = "";
|
||||
WORD_ALIGNED_ATTR char recvbuf[129] = "";
|
||||
memset(recvbuf, 0, 33);
|
||||
spi_slave_transaction_t t;
|
||||
memset(&t, 0, sizeof(t));
|
||||
char *sendbuf = spi_bus_dma_memory_alloc(RCV_HOST, 129, 0);
|
||||
char *recvbuf = spi_bus_dma_memory_alloc(RCV_HOST, 129, 0);
|
||||
assert(sendbuf && recvbuf);
|
||||
spi_slave_transaction_t t = {0};
|
||||
|
||||
while (1) {
|
||||
//Clear receive buffer, set send buffer to something sane
|
||||
|
Reference in New Issue
Block a user