From 44047e746fc76aa85e0f977ee56f4c39da4a3383 Mon Sep 17 00:00:00 2001 From: Alex Tereschenko Date: Sun, 14 Jun 2015 16:34:15 +0200 Subject: [PATCH] spi.c: moved struct _spi declaration into mraa_internal_types.h The declaration seems to be misplaced compared to all other similar structs. It's also a prerequisite for introducing the _replace hook for spi_lsbmode(), per issue #178. Signed-off-by: Alex Tereschenko Signed-off-by: Brendan Le Foll --- include/mraa_internal_types.h | 13 +++++++++++++ src/spi/spi.c | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/mraa_internal_types.h b/include/mraa_internal_types.h index 5eb5804..70b212d 100644 --- a/include/mraa_internal_types.h +++ b/include/mraa_internal_types.h @@ -64,6 +64,19 @@ struct _i2c { }; /** + * A structure representing the SPI device + */ +struct _spi { + /*@{*/ + int devfd; /**< File descriptor to SPI Device */ + uint32_t mode; /**< Spi mode see spidev.h */ + int clock; /**< clock to run transactions at */ + mraa_boolean_t lsb; /**< least significant bit mode */ + unsigned int bpw; /**< Bits per word */ + /*@}*/ +}; + +/** * A structure representing a PWM pin */ struct _pwm { diff --git a/src/spi/spi.c b/src/spi/spi.c index c478e7f..7af38d9 100644 --- a/src/spi/spi.c +++ b/src/spi/spi.c @@ -36,19 +36,6 @@ #define MAX_SIZE 64 #define SPI_MAX_LENGTH 4096 -/** - * A structure representing the SPI device - */ -struct _spi { - /*@{*/ - int devfd; /**< File descriptor to SPI Device */ - uint32_t mode; /**< Spi mode see spidev.h */ - int clock; /**< clock to run transactions at */ - mraa_boolean_t lsb; /**< least significant bit mode */ - unsigned int bpw; /**< Bits per word */ - /*@}*/ -}; - mraa_spi_context mraa_spi_init(int bus) { -- 2.7.4