Private
Public Access
2
0

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 <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Alex Tereschenko
2015-06-14 16:34:15 +02:00
committed by Brendan Le Foll
parent 33e4f3eeec
commit 44047e746f
2 changed files with 13 additions and 13 deletions

View File

@@ -63,6 +63,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
*/

View File

@@ -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)
{