From 4a2e510a877fc5b9256b2717acba8ac772e04a6e Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Thu, 25 Jan 2024 14:30:51 +0200 Subject: [PATCH] ports: Add LED pin aliases for all Arduino boards. The standard Arduino pinout uses LEDR/G/B and LED_BUILTIN (if available). This patch adds aliases to match the standard pinout, while retaining LED_RED/GREEN/BLUE for compatibility with existing scripts and examples. Signed-off-by: iabdalkader --- ports/esp32/boards/ARDUINO_NANO_ESP32/pins.csv | 3 +++ ports/renesas-ra/boards/ARDUINO_PORTENTA_C33/pins.csv | 3 +++ ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/pins.csv | 4 ++++ ports/stm32/boards/ARDUINO_GIGA/pins.csv | 3 +++ ports/stm32/boards/ARDUINO_NICLA_VISION/pins.csv | 3 +++ ports/stm32/boards/ARDUINO_PORTENTA_H7/pins.csv | 3 +++ 6 files changed, 19 insertions(+) diff --git a/ports/esp32/boards/ARDUINO_NANO_ESP32/pins.csv b/ports/esp32/boards/ARDUINO_NANO_ESP32/pins.csv index b891608d5d..5934ae7bf2 100644 --- a/ports/esp32/boards/ARDUINO_NANO_ESP32/pins.csv +++ b/ports/esp32/boards/ARDUINO_NANO_ESP32/pins.csv @@ -12,6 +12,9 @@ D10,GPIO21 D11,GPIO38 D12,GPIO47 D13,GPIO48 +LEDR,GPIO46 +LEDG,GPIO0 +LEDB,GPIO45 LED_RED,GPIO46 LED_GREEN,GPIO0 LED_BLUE,GPIO45 diff --git a/ports/renesas-ra/boards/ARDUINO_PORTENTA_C33/pins.csv b/ports/renesas-ra/boards/ARDUINO_PORTENTA_C33/pins.csv index 1e6379a07b..77b5c3de52 100644 --- a/ports/renesas-ra/boards/ARDUINO_PORTENTA_C33/pins.csv +++ b/ports/renesas-ra/boards/ARDUINO_PORTENTA_C33/pins.csv @@ -147,6 +147,9 @@ D5,P210 LED1,P107 LED2,P400 LED3,P800 +LEDR,P107 +LEDG,P400 +LEDB,P800 LED_RED,P107 LED_GREEN,P400 LED_BLUE,P800 diff --git a/ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/pins.csv b/ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/pins.csv index 0b1566cacf..5f8aeaf447 100644 --- a/ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/pins.csv +++ b/ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/pins.csv @@ -13,12 +13,16 @@ D11,GPIO7 D12,GPIO4 D13,GPIO6 LED,GPIO6 +LED_BUILTIN,GPIO6 A0,GPIO26 A1,GPIO27 A2,GPIO28 A3,GPIO29 SDA,GPIO12 SCL,GPIO13 +LEDR,EXT_GPIO0 +LEDG,EXT_GPIO1 +LEDB,EXT_GPIO2 LED_RED,EXT_GPIO0 LED_GREEN,EXT_GPIO1 LED_BLUE,EXT_GPIO2 diff --git a/ports/stm32/boards/ARDUINO_GIGA/pins.csv b/ports/stm32/boards/ARDUINO_GIGA/pins.csv index 56e6323290..9de1a316d1 100644 --- a/ports/stm32/boards/ARDUINO_GIGA/pins.csv +++ b/ports/stm32/boards/ARDUINO_GIGA/pins.csv @@ -179,6 +179,9 @@ UART6_RX,PC7 #BOOT0,BOOT0 DAC1,PA4 DAC2,PA5 +LEDR,PI12 +LEDG,PJ13 +LEDB,PE3 LED_RED,PI12 LED_GREEN,PJ13 LED_BLUE,PE3 diff --git a/ports/stm32/boards/ARDUINO_NICLA_VISION/pins.csv b/ports/stm32/boards/ARDUINO_NICLA_VISION/pins.csv index 2838510ee3..72f57adf74 100644 --- a/ports/stm32/boards/ARDUINO_NICLA_VISION/pins.csv +++ b/ports/stm32/boards/ARDUINO_NICLA_VISION/pins.csv @@ -180,6 +180,9 @@ USB_DP,PA12 OSCEN,PH1 DAC1,-PA4 DAC2,-PA5 +LEDR,PE3 +LEDG,PC13 +LEDB,-PF4 LED_RED,PE3 LED_GREEN,PC13 LED_BLUE,-PF4 diff --git a/ports/stm32/boards/ARDUINO_PORTENTA_H7/pins.csv b/ports/stm32/boards/ARDUINO_PORTENTA_H7/pins.csv index 4ac406fe3a..3b93dcba73 100644 --- a/ports/stm32/boards/ARDUINO_PORTENTA_H7/pins.csv +++ b/ports/stm32/boards/ARDUINO_PORTENTA_H7/pins.csv @@ -203,6 +203,9 @@ UART8_RX,PJ9 OSCEN,PH1 DAC1,PA4 DAC2,-PA5 +LEDR,PK5 +LEDG,PK6 +LEDB,PK7 LED_RED,PK5 LED_GREEN,PK6 LED_BLUE,PK7