spi_slave: add spi 'spi_slave_queue_reset_isr' and add test

This commit is contained in:
wanlei
2023-01-04 11:26:24 +08:00
parent 6ae852f8b0
commit 45c1dc424f
3 changed files with 125 additions and 6 deletions
@@ -40,6 +40,20 @@ extern "C" {
esp_err_t spi_slave_queue_reset(spi_host_device_t host);
/**
* @note
* This API is used to reset SPI Slave transaction queue from within ISR. After calling this function:
* - The SPI Slave transaction queue will be empty.
*
* @param host SPI peripheral that is acting as a slave
*
* @return
* - ESP_ERR_INVALID_ARG if parameter is invalid
* - ESP_OK on success
*/
esp_err_t spi_slave_queue_reset_isr(spi_host_device_t host);
/**
* @brief Queue a SPI transaction in ISR
*