fix(sdio_slave): fix minor issues like return value of send function, output arg, etc.
This commit is contained in:
parent
d8a1080bdf
commit
5019ff3345
2 changed files with 6 additions and 4 deletions
|
@ -197,12 +197,12 @@ uint8_t* sdio_slave_recv_get_buf( sdio_slave_buf_handle_t handle, size_t *len_o)
|
||||||
esp_err_t sdio_slave_send_queue(uint8_t* addr, size_t len, void* arg, TickType_t wait);
|
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.
|
/** 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.
|
* @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.
|
* @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.
|
/** Start a new sending transfer, and wait for it (blocked) to be finished.
|
||||||
*
|
*
|
||||||
|
|
|
@ -952,9 +952,11 @@ esp_err_t sdio_slave_send_queue(uint8_t* addr, size_t len, void* arg, TickType_t
|
||||||
return ESP_OK;
|
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;
|
if ( err != pdTRUE ) return ESP_ERR_TIMEOUT;
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue