chore(sdio_slave): format source files

This commit is contained in:
michael
2018-06-07 20:11:08 +08:00
committed by bot
parent 4b91c82cc4
commit 8ab87a6a87
2 changed files with 197 additions and 197 deletions

View File

@@ -171,8 +171,8 @@ esp_err_t sdio_slave_recv_load_buf(sdio_slave_buf_handle_t handle);
/** Get received data if exist. The driver returns the ownership of the buffer to the app. /** Get received data if exist. The driver returns the ownership of the buffer to the app.
* *
* @param handle_ret Handle to the buffer holding received data. Use this handle in ``sdio_slave_recv_load_buf`` to receive in the same buffer again. * @param handle_ret Handle to the buffer holding received data. Use this handle in ``sdio_slave_recv_load_buf`` to receive in the same buffer again.
* @param start_o Start address output, set to NULL if not needed. * @param[out] out_addr Output of the start address, set to NULL if not needed.
* @param len_o Actual length of the data in the buffer, set to NULL if not needed. * @param[out] out_len Actual length of the data in the buffer, set to NULL if not needed.
* @param wait Time to wait before data received. * @param wait Time to wait before data received.
* *
* @note Call ``sdio_slave_load_buf`` with the handle to re-load the buffer onto the link list, and receive with the same buffer again. * @note Call ``sdio_slave_load_buf`` with the handle to re-load the buffer onto the link list, and receive with the same buffer again.
@@ -183,7 +183,7 @@ esp_err_t sdio_slave_recv_load_buf(sdio_slave_buf_handle_t handle);
* - ESP_ERR_TIMEOUT if timeout before receiving new data * - ESP_ERR_TIMEOUT if timeout before receiving new data
* - ESP_OK if success * - ESP_OK if success
*/ */
esp_err_t sdio_slave_recv(sdio_slave_buf_handle_t* handle_ret, uint8_t **start_o, size_t *len_o, TickType_t wait); esp_err_t sdio_slave_recv(sdio_slave_buf_handle_t* handle_ret, uint8_t **out_addr, size_t *out_len, TickType_t wait);
/** Retrieve the buffer corresponding to a handle. /** Retrieve the buffer corresponding to a handle.
* *

View File

@@ -1216,7 +1216,7 @@ sdio_slave_buf_handle_t sdio_slave_recv_register_buf(uint8_t *start)
return desc; return desc;
} }
esp_err_t sdio_slave_recv(sdio_slave_buf_handle_t* handle_ret, uint8_t **start_o, size_t *len_o, TickType_t wait) esp_err_t sdio_slave_recv(sdio_slave_buf_handle_t* handle_ret, uint8_t **out_addr, size_t *out_len, TickType_t wait)
{ {
SDIO_SLAVE_CHECK(handle_ret != NULL, "handle address cannot be 0", ESP_ERR_INVALID_ARG); SDIO_SLAVE_CHECK(handle_ret != NULL, "handle address cannot be 0", ESP_ERR_INVALID_ARG);
portBASE_TYPE ret = xSemaphoreTake(context.recv_event, wait); portBASE_TYPE ret = xSemaphoreTake(context.recv_event, wait);
@@ -1233,8 +1233,8 @@ esp_err_t sdio_slave_recv(sdio_slave_buf_handle_t* handle_ret, uint8_t **start_o
assert(desc != NULL && desc->owner == 0); assert(desc != NULL && desc->owner == 0);
*handle_ret = (sdio_slave_buf_handle_t)desc; *handle_ret = (sdio_slave_buf_handle_t)desc;
if ( start_o ) *start_o = desc->buf; if (out_addr) *out_addr = desc->buf;
if ( len_o ) *len_o = desc->length; if (out_len) *out_len = desc->length;
return ESP_OK; return ESP_OK;
} }