hideakitai / ESP32DMASPI

SPI library for ESP32 which use DMA buffer to send/receive transactions
MIT License
170 stars 36 forks source link

Undefined `spi_master_tx_buf` in `slave_simple_task.ino` example #8

Closed e-tinkers closed 2 years ago

e-tinkers commented 2 years ago

Hideaki san,

Thanks for the simple and easy-to-use library.

On the slave_simple_task.ino example, the reference to spi_master_tx_buf at set_buffer() should be removed as it is not defined and not in use.

void set_buffer() {
    for (uint32_t i = 0; i < BUFFER_SIZE; i++) {
        spi_master_tx_buf[i] = i & 0xFF;
        spi_slave_tx_buf[i] = (0xFF - i) & 0xFF;
    }
    memset(spi_master_rx_buf, 0, BUFFER_SIZE);
    memset(spi_slave_rx_buf, 0, BUFFER_SIZE);
} 
hideakitai commented 2 years ago

@e-tinkers Thank you! Fixed