From 4129d4e16dd0461a0ff672211ec2bac7daf9ef3d Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Thu, 1 May 2014 16:10:27 +0100 Subject: [PATCH] spi: add destructor Signed-off-by: Brendan Le Foll --- api/spi.h | 8 ++++++++ src/spi/spi.c | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/api/spi.h b/api/spi.h index ccbe3ff..111e892 100644 --- a/api/spi.h +++ b/api/spi.h @@ -81,6 +81,14 @@ maa_result_t maa_spi_frequency(maa_spi_context* spi, int hz); */ unsigned int maa_spi_write(maa_spi_context* spi, unsigned int data); +/** De-inits an maa_spi_context device + * + * @param dev the spi context + * + * @return maa_result_t the maa result. + */ +maa_result_t maa_spi_stop(maa_spi_context* spi); + #ifdef __cplusplus } #endif diff --git a/src/spi/spi.c b/src/spi/spi.c index 42f2ab9..bbf4df0 100644 --- a/src/spi/spi.c +++ b/src/spi/spi.c @@ -49,3 +49,9 @@ maa_spi_write(maa_spi_context* spi, unsigned int data) { return 0; } + +maa_result_t +maa_spi_stop(maa_spi_context* spi) +{ + return MAA_ERROR_FEATURE_NOT_IMPLEMENTED; +}