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:
commit
b29b337939
@ -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;
|
||||
}
|
||||
|
||||
@ -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 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user