1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

boards/nucleo144: adapt default on-board LEDs for stm32l522ze

This commit is contained in:
Alexandre Abadie 2020-09-28 17:01:41 +02:00
parent 22645cbfe4
commit cbdb0a3b09
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -37,7 +37,8 @@ extern "C" {
* @name LED pin definitions and handlers
* @{
*/
#if defined(CPU_MODEL_STM32L496ZG) || defined(CPU_MODEL_STM32L4R5ZI)
#if defined(CPU_MODEL_STM32L496ZG) || defined(CPU_MODEL_STM32L4R5ZI) || \
defined(CPU_MODEL_STM32L552ZE)
#define LED0_PORT GPIOC
#define LED0_PIN GPIO_PIN(PORT_C, 7)
#define LED0_MASK (1 << 7)
@ -56,11 +57,18 @@ extern "C" {
#define LED1_OFF (GPIOB->BSRR = (LED1_MASK << 16))
#define LED1_TOGGLE (GPIOB->ODR ^= LED1_MASK)
#if defined(CPU_MODEL_STM32L552ZE)
#define LED2_PORT GPIOA
#define LED2_PIN GPIO_PIN(PORT_A, 9)
#define LED2_MASK (1 << 9)
#else
#define LED2_PORT GPIOB
#define LED2_PIN GPIO_PIN(PORT_B, 14)
#define LED2_MASK (1 << 14)
#define LED2_ON (GPIOB->BSRR = LED2_MASK)
#define LED2_OFF (GPIOB->BSRR = (LED2_MASK << 16))
#define LED2_TOGGLE (GPIOB->ODR ^= LED2_MASK)
#endif
#define LED2_ON (LED2_PORT->BSRR = LED2_MASK)
#define LED2_OFF (LED2_PORT->BSRR = (LED2_MASK << 16))
#define LED2_TOGGLE (LED2_PORT->ODR ^= LED2_MASK)
/* the Nucleo144 boards always use LED0, as there is no dual use of its pin */
#ifndef AUTO_INIT_LED0