spi_device_polling_start() function
Immediately start a polling transaction.
Arguments
handle
Device handle obtained using spi_host_add_dev
trans_desc
Description of transaction to execute
ticks_to_wait
Ticks to wait until there's room in the queue; currently only portMAX_DELAY is supported.
Return value
- ESP_ERR_INVALID_ARG if parameter is invalid. This can happen if SPI_TRANS_CS_KEEP_ACTIVE flag is specified while the bus was not acquired (`spi_device_acquire_bus()` should be called first) or set flag SPI_TRANS_DMA_BUFFER_ALIGN_MANUAL but tx or rx buffer not DMA-capable, or addr&len not align to cache line size - ESP_ERR_TIMEOUT if the device cannot get control of the bus before ``ticks_to_wait`` expired - ESP_ERR_NO_MEM if allocating DMA-capable temporary buffer failed - ESP_ERR_INVALID_STATE if previous transactions are not finished - ESP_OK on success
Notes
Normally a device cannot start (queue) polling and interrupt transactions simutanuously. Moreover, a device cannot start a new polling transaction if another polling transaction is not finished.