esp_err_t sdio_slave_send_queue(uint8_t* addr, size_t len, void* arg, TickType_t wait);
/** Return the ownership of a finished transaction.
- * @param arg_o Argument of the finished transaction.
+ * @param out_arg Argument of the finished transaction. Set to NULL if unused.
* @param wait Time to wait if there's no finished sending transaction.
*
* @return ESP_ERR_TIMEOUT if no transaction finished, or ESP_OK if succeed.
*/
-esp_err_t sdio_slave_send_get_finished(void** arg_o, TickType_t wait);
+esp_err_t sdio_slave_send_get_finished(void** out_arg, TickType_t wait);
/** Start a new sending transfer, and wait for it (blocked) to be finished.
*
return ESP_OK;
}
-esp_err_t sdio_slave_send_get_finished(void** arg, TickType_t wait)
+esp_err_t sdio_slave_send_get_finished(void** out_arg, TickType_t wait)
{
- portBASE_TYPE err = xQueueReceive( context.ret_queue, arg, wait );
+ void* arg = NULL;
+ portBASE_TYPE err = xQueueReceive(context.ret_queue, &arg, wait);
+ if (out_arg) *out_arg = arg;
if ( err != pdTRUE ) return ESP_ERR_TIMEOUT;
return ESP_OK;
}