mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/arduino-due: unified LED defines
This commit is contained in:
parent
8eeac35b51
commit
2d748ab55b
@ -27,5 +27,5 @@ void board_init(void)
|
||||
/* initialize the CPU */
|
||||
cpu_init();
|
||||
/* initialize the on-board Amber "L" LED @ pin PB27 */
|
||||
gpio_init(LED_PIN, GPIO_DIR_OUT, GPIO_NOPULL);
|
||||
gpio_init(LED0_PIN, GPIO_DIR_OUT, GPIO_NOPULL);
|
||||
}
|
||||
|
@ -32,26 +32,11 @@ extern "C" {
|
||||
* @name LED pin definitions
|
||||
* @{
|
||||
*/
|
||||
#define LED_PORT PIOB
|
||||
#define LED_BIT PIO_PB27
|
||||
#define LED_PIN GPIO_PIN(PB, 27)
|
||||
/** @} */
|
||||
#define LED0_PIN GPIO_PIN(PB, 27)
|
||||
|
||||
/**
|
||||
* @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 LED0_ON (PIOB->PIO_SODR = PIO_PB27)
|
||||
#define LED0_OFF (PIOB->PIO_CODR = PIO_PB27)
|
||||
#define LED0_TOGGLE (PIOB->PIO_ODSR ^= PIO_PB27)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user