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:
parent
45d059cb24
commit
beddceb8d4
@ -24,8 +24,8 @@
|
||||
|
||||
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 */
|
||||
cpu_init();
|
||||
/* initialize the on-board Amber "L" LED @ pin PB27 */
|
||||
gpio_init(LED_PIN, GPIO_DIR_OUT, GPIO_NOPULL);
|
||||
}
|
||||
|
@ -29,29 +29,17 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name LED pin definitions
|
||||
* @brief LED pin definitions and handlers
|
||||
* @{
|
||||
*/
|
||||
#define LED0_PIN GPIO_PIN(PB, 27)
|
||||
|
||||
#define LED_PORT PIOB
|
||||
#define LED_BIT PIO_PB27
|
||||
#define LED_PIN GPIO_PIN(PB, 27)
|
||||
/** @} */
|
||||
#define LED0_MASK PIO_PB27
|
||||
|
||||
/**
|
||||
* @name Macros for controlling the on-board LEDs.
|
||||
* @{
|
||||
*/
|
||||
#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 */
|
||||
#define LED_ON (LED_PORT->PIO_SODR = LED0_MASK)
|
||||
#define LED_OFF (LED_PORT->PIO_CODR = LED0_MASK)
|
||||
#define LED_TOGGLE (LED_PORT->PIO_ODSR ^= LED0_MASK)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user