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

boards/samr21-xpro: fix led macros/init

This commit is contained in:
Ludwig Ortmann 2015-04-04 16:09:06 +02:00
parent 3eb6c28642
commit 70fc6686ff
2 changed files with 5 additions and 4 deletions

View File

@ -48,6 +48,7 @@ void board_init(void)
*/
void led_init(void)
{
LED_PORT.DIRSET.reg = LED_PIN;
LED_PORT.DIRSET.reg = 1 << LED_PIN;
LED_PORT.OUTSET.reg = LED_PIN;
LED_PORT.PINCFG[LED_PIN].bit.PULLEN = false;
}

View File

@ -70,9 +70,9 @@ extern "C" {
* @name Macros for controlling the on-board LEDs.
* @{
*/
#define LED_ON (LED_PORT.OUTCLR.reg = LED_PIN)
#define LED_OFF (LED_PORT.OUTSET.reg = LED_PIN)
#define LED_TOGGLE (LED_PORT.OUTTGL.reg = LED_PIN)
#define LED_ON (LED_PORT.OUTCLR.reg = 1<<LED_PIN)
#define LED_OFF (LED_PORT.OUTSET.reg = 1<<LED_PIN)
#define LED_TOGGLE (LED_PORT.OUTTGL.reg = 1<<LED_PIN)
/* for compatability to other boards */
#define LED_GREEN_ON /* not available */