From 9087dacd26ad7f12b0088cc8cab8e48fd3d6ddf5 Mon Sep 17 00:00:00 2001 From: Martin Kojtal <0xc0170@gmail.com> Date: Tue, 7 Nov 2017 14:36:16 +0000 Subject: [PATCH] QSPI: change length to be in/out parameter This provides a way to return how many bytes have been written/read (as status codes are returned via func ret value) --- hal/qspi_api.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hal/qspi_api.h b/hal/qspi_api.h index 2b94fe9b84..0348c15d17 100644 --- a/hal/qspi_api.h +++ b/hal/qspi_api.h @@ -156,24 +156,24 @@ qspi_status_t qspi_write_command(qspi_t *obj, const qspi_command_t *command); * @param obj QSPI object * @param command QSPI command * @param data TX buffer - * @param length TX buffer length in bytes + * @param[in,out] in - length TX buffer length in bytes, out - number of bytes written * @return QSPI_STATUS_OK if the data has been succesfully sent QSPI_STATUS_INVALID_PARAMETER if invalid parameter found QSPI_STATUS_ERROR otherwise */ -qspi_status_t qspi_write(qspi_t *obj, const qspi_command_t *command, const void *data, size_t length); +qspi_status_t qspi_write(qspi_t *obj, const qspi_command_t *command, const void *data, size_t *length); /** Receive a command and block of data * * @param obj QSPI object * @param command QSPI command * @param data RX buffer - * @param length RX buffer length in bytes + * @param[in,out] in - length RX buffer length in bytes, out - number of bytes read * @return QSPI_STATUS_OK if data has been succesfully received QSPI_STATUS_INVALID_PARAMETER if invalid parameter found QSPI_STATUS_ERROR otherwise */ -qspi_status_t qspi_read(qspi_t *obj, const qspi_command_t *command, void *data, size_t length); +qspi_status_t qspi_read(qspi_t *obj, const qspi_command_t *command, void *data, size_t *length); /**@}*/