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

boards/same54-xpro: configure orange ethernet LED

There is a software controlled LED on the RJ45 connector.
Export it via SAUL.
This commit is contained in:
Benjamin Valentin 2023-12-14 15:21:54 +01:00
parent fb6e3c01c7
commit 8db01f6df1
2 changed files with 15 additions and 0 deletions

View File

@ -56,6 +56,15 @@ extern "C" {
#define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
#define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
#define LED1_PIN GPIO_PIN(PC, 15)
#define LED_PORT PORT->Group[PC]
#define LED1_MASK (1 << 15)
#define LED1_ON (LED_PORT.OUTCLR.reg = LED1_MASK)
#define LED1_OFF (LED_PORT.OUTSET.reg = LED1_MASK)
#define LED1_TOGGLE (LED_PORT.OUTTGL.reg = LED1_MASK)
/** @} */
/**

View File

@ -37,6 +37,12 @@ static const saul_gpio_params_t saul_gpio_params[] =
.mode = GPIO_OUT,
.flags = SAUL_GPIO_INVERTED
},
{
.name = "LED(ETH)",
.pin = LED1_PIN,
.mode = GPIO_OUT,
.flags = SAUL_GPIO_INVERTED
},
{
.name = "Button(SW0)",
.pin = BTN0_PIN,