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:
parent
3eb6c28642
commit
70fc6686ff
@ -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…
Reference in New Issue
Block a user