Skip to content

Commit

Permalink
drivers: spi: Add missing retval to spi_read calls
Browse files Browse the repository at this point in the history
spi_transceive returns number of received frames for slave mode.
This information was missing for spi_read type of functions.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
  • Loading branch information
nordic-krch authored and dleach02 committed Feb 1, 2024
1 parent de5586d commit 8bc61e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/zephyr/drivers/spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ static inline int spi_transceive_dt(const struct spi_dt_spec *spec,
* previous operations.
* @param rx_bufs Buffer array where data to be read will be written to.
*
* @retval frames Positive number of frames received in slave mode.
* @retval 0 If successful.
* @retval -errno Negative errno code on failure.
*/
Expand Down Expand Up @@ -987,6 +988,7 @@ __deprecated static inline int spi_transceive_async(const struct device *dev,
* notify the end of the transaction, and whether it went
* successfully or not).
*
* @retval frames Positive number of frames received in slave mode.
* @retval 0 If successful
* @retval -errno Negative errno code on failure.
*/
Expand Down

0 comments on commit 8bc61e2

Please sign in to comment.