1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/udoo: unified LED defines

This commit is contained in:
Hauke Petersen 2016-03-11 18:04:27 +01:00
parent 45d059cb24
commit beddceb8d4
2 changed files with 9 additions and 21 deletions

View File

@ -24,8 +24,8 @@
void board_init(void) void board_init(void)
{ {
/* initialize the on-board Amber "L" LED @ pin PB27 */
gpio_init(LED0_PIN, GPIO_DIR_OUT, GPIO_NOPULL);
/* initialize the CPU */ /* initialize the CPU */
cpu_init(); cpu_init();
/* initialize the on-board Amber "L" LED @ pin PB27 */
gpio_init(LED_PIN, GPIO_DIR_OUT, GPIO_NOPULL);
} }

View File

@ -29,29 +29,17 @@ extern "C" {
#endif #endif
/** /**
* @name LED pin definitions * @brief LED pin definitions and handlers
* @{ * @{
*/ */
#define LED0_PIN GPIO_PIN(PB, 27)
#define LED_PORT PIOB #define LED_PORT PIOB
#define LED_BIT PIO_PB27 #define LED0_MASK PIO_PB27
#define LED_PIN GPIO_PIN(PB, 27)
/** @} */
/** #define LED_ON (LED_PORT->PIO_SODR = LED0_MASK)
* @name Macros for controlling the on-board LEDs. #define LED_OFF (LED_PORT->PIO_CODR = LED0_MASK)
* @{ #define LED_TOGGLE (LED_PORT->PIO_ODSR ^= LED0_MASK)
*/
#define LED_ON (LED_PORT->PIO_SODR = LED_BIT)
#define LED_OFF (LED_PORT->PIO_CODR = LED_BIT)
#define LED_TOGGLE (LED_PORT->PIO_ODSR ^= LED_BIT)
/* for compatability to other boards */
#define LED_GREEN_ON LED_ON
#define LED_GREEN_OFF LED_OFF
#define LED_GREEN_TOGGLE LED_TOGGLE
#define LED_RED_ON /* not available */
#define LED_RED_OFF /* not available */
#define LED_RED_TOGGLE /* not available */
/** @} */ /** @} */
/** /**