Merge pull request #352 from lab11/cc2538-spi-driver

Added SPI driver for CC2538
This commit is contained in:
George Oikonomou 2013-09-28 13:25:17 -07:00
commit 2957d44ff8
6 changed files with 364 additions and 1 deletions

View file

@ -199,6 +199,14 @@ typedef void (* gpio_callback_t)(uint8_t port, uint8_t pin);
* in this category
*/
#define GPIO_PIN_MASK(PIN) (1 << PIN)
/**
* \brief Converts a port number to the port base address
* \param The port number in the range 0 - 3. Likely GPIO_X_NUM.
* \return The base address for the registers corresponding to that port
* number.
*/
#define GPIO_PORT_TO_BASE(PORT) (GPIO_A_BASE + (PORT << 12))
/** @} */
/*---------------------------------------------------------------------------*/
/** \name GPIO Register offset declarations