aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/AVR/spi_lld.h
diff options
context:
space:
mode:
authorutzig <utzig@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-09-04 18:49:07 +0000
committerutzig <utzig@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-09-04 18:49:07 +0000
commitb6814edfd2db3420e644b0475112f83d7af4da80 (patch)
treef5f88bc45a673abe82b309d9f111b169cbbc92fd /os/hal/ports/AVR/spi_lld.h
parent147426d333ad1e863793791cf8c2e0891d55a6b2 (diff)
downloadChibiOS-b6814edfd2db3420e644b0475112f83d7af4da80.tar.gz
ChibiOS-b6814edfd2db3420e644b0475112f83d7af4da80.tar.bz2
ChibiOS-b6814edfd2db3420e644b0475112f83d7af4da80.zip
[AVR] SPI driver updated for 3.0 + removed weird slave interface support
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7247 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/AVR/spi_lld.h')
-rw-r--r--os/hal/ports/AVR/spi_lld.h21
1 files changed, 5 insertions, 16 deletions
diff --git a/os/hal/ports/AVR/spi_lld.h b/os/hal/ports/AVR/spi_lld.h
index e0defe45e..8f259a9e9 100644
--- a/os/hal/ports/AVR/spi_lld.h
+++ b/os/hal/ports/AVR/spi_lld.h
@@ -32,10 +32,6 @@
/*===========================================================================*/
/** @brief SPI Mode (Polarity/Phase) */
-#define SPI_ROLE_MASTER 0
-#define SPI_ROLE_SLAVE 1
-
-/** @brief SPI Mode (Polarity/Phase) */
#define SPI_CPOL0_CPHA0 0
#define SPI_CPOL0_CPHA1 1
#define SPI_CPOL1_CPHA0 2
@@ -104,10 +100,6 @@ typedef void (*spicallback_t)(SPIDriver *spip);
*/
typedef struct {
/**
- * @brief Role: Master or Slave
- */
- uint8_t role;
- /**
* @brief Port used of Slave Select
*/
ioportid_t ssport;
@@ -143,30 +135,27 @@ struct SPIDriver {
/**
* @brief Driver state.
*/
- spistate_t state;
+ spistate_t state;
/**
* @brief Current configuration data.
*/
- SPIConfig *config;
+ SPIConfig *config;
#if SPI_USE_WAIT || defined(__DOXYGEN__)
/**
* @brief Waiting thread.
*/
- Thread *thread;
+ thread_reference_t thread;
#endif /* SPI_USE_WAIT */
#if SPI_USE_MUTUAL_EXCLUSION || defined(__DOXYGEN__)
-#if CH_USE_MUTEXES || defined(__DOXYGEN__)
/**
* @brief Mutex protecting the bus.
*/
- Mutex mutex;
-#elif CH_USE_SEMAPHORES
- Semaphore semaphore;
-#endif
+ mutex_t mutex;
#endif /* SPI_USE_MUTUAL_EXCLUSION */
#if defined(SPI_DRIVER_EXT_FIELDS)
SPI_DRIVER_EXT_FIELDS
#endif
+ /* End of the mandatory fields.*/
/**
* @brief Pointer to the buffer with data to send.
*/