1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 08:21:18 +01:00

Merge pull request #2762 from LudwigOrtmann/pr/samr21-xpro_led

boards/samr21-xpro: fix led macros/init
This commit is contained in:
Peter Kietzmann 2015-04-07 16:46:14 +02:00
commit b29b337939
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 */