From 493c3475e7fe169e9c24d7ba510816a504475ad0 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Thu, 5 Oct 2023 20:01:45 -0300 Subject: [PATCH] final review --- variants/XIAO_ESP32S3/pins_arduino.h | 1 - variants/atd147_s3/pins_arduino.h | 1 - variants/deneyapkart1A/pins_arduino.h | 2 +- variants/deneyapkart1Av2/pins_arduino.h | 2 +- variants/deneyapkartg/pins_arduino.h | 2 +- variants/deneyapminiv2/pins_arduino.h | 2 +- variants/esp32_s3r8n16/pins_arduino.h | 1 - variants/gpy/pins_arduino.h | 4 ++-- variants/heltec_wifi_kit_32_V3/pins_arduino.h | 9 ++------- variants/heltec_wifi_lora_32_V3/pins_arduino.h | 1 - variants/lilygo_t_display_s3/pins_arduino.h | 1 - variants/m5stack_cores3/pins_arduino.h | 10 +--------- variants/m5stack_stamp_s3/pins_arduino.h | 1 - variants/tamc_termod_s3/pins_arduino.h | 10 +--------- variants/wifiduino32s3/pins_arduino.h | 12 +----------- variants/wifiduinov2/pins_arduino.h | 7 +------ 16 files changed, 12 insertions(+), 54 deletions(-) diff --git a/variants/XIAO_ESP32S3/pins_arduino.h b/variants/XIAO_ESP32S3/pins_arduino.h index 92033b7de87..cb77ca81cb6 100644 --- a/variants/XIAO_ESP32S3/pins_arduino.h +++ b/variants/XIAO_ESP32S3/pins_arduino.h @@ -2,7 +2,6 @@ #define Pins_Arduino_h #include -#include "soc/soc_caps.h" #define USB_VID 0x2886 #define USB_PID 0x0056 diff --git a/variants/atd147_s3/pins_arduino.h b/variants/atd147_s3/pins_arduino.h index 2ad8456c4f2..0726a1c4a1c 100644 --- a/variants/atd147_s3/pins_arduino.h +++ b/variants/atd147_s3/pins_arduino.h @@ -2,7 +2,6 @@ #define Pins_Arduino_h #include -#include "soc/soc_caps.h" #define USB_VID 0x303a #define USB_PID 0x1001 diff --git a/variants/deneyapkart1A/pins_arduino.h b/variants/deneyapkart1A/pins_arduino.h index f00ae17d542..edac64ac794 100644 --- a/variants/deneyapkart1A/pins_arduino.h +++ b/variants/deneyapkart1A/pins_arduino.h @@ -4,7 +4,7 @@ #include #include "soc/soc_caps.h" -static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+13; +static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+13; //D12 #define BUILTIN_LED LED_BUILTIN // backward compatibility #define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN #define RGB_BUILTIN LED_BUILTIN diff --git a/variants/deneyapkart1Av2/pins_arduino.h b/variants/deneyapkart1Av2/pins_arduino.h index 2fd9be17671..34d84b057cf 100644 --- a/variants/deneyapkart1Av2/pins_arduino.h +++ b/variants/deneyapkart1Av2/pins_arduino.h @@ -10,7 +10,7 @@ #define USB_PRODUCT "DENEYAP KART 1A v2" #define USB_SERIAL "" // Empty string for MAC adddress -static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+48; +static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+48; //D9 #define BUILTIN_LED LED_BUILTIN // backward compatibility #define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN #define RGB_BUILTIN LED_BUILTIN diff --git a/variants/deneyapkartg/pins_arduino.h b/variants/deneyapkartg/pins_arduino.h index 7ba4f89c5d2..817f63affc1 100644 --- a/variants/deneyapkartg/pins_arduino.h +++ b/variants/deneyapkartg/pins_arduino.h @@ -10,7 +10,7 @@ #define USB_PRODUCT "DENEYAP KART G" #define USB_SERIAL "" // Empty string for MAC adddress -static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+10; +static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+10; //D3 #define BUILTIN_LED LED_BUILTIN // backward compatibility #define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN #define RGB_BUILTIN LED_BUILTIN diff --git a/variants/deneyapminiv2/pins_arduino.h b/variants/deneyapminiv2/pins_arduino.h index 963496694d8..98ef80732f8 100644 --- a/variants/deneyapminiv2/pins_arduino.h +++ b/variants/deneyapminiv2/pins_arduino.h @@ -10,7 +10,7 @@ #define USB_PRODUCT "DENEYAP MINI v2" #define USB_SERIAL "" // Empty string for MAC adddress -static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+33; +static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+33; //D14 #define BUILTIN_LED LED_BUILTIN // backward compatibility #define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN #define RGB_BUILTIN LED_BUILTIN diff --git a/variants/esp32_s3r8n16/pins_arduino.h b/variants/esp32_s3r8n16/pins_arduino.h index 844e0764139..ba3f1908875 100644 --- a/variants/esp32_s3r8n16/pins_arduino.h +++ b/variants/esp32_s3r8n16/pins_arduino.h @@ -2,7 +2,6 @@ #define Pins_Arduino_h #include -#include "soc/soc_caps.h" #define USB_VID 0x303a #define USB_PID 0x1001 diff --git a/variants/gpy/pins_arduino.h b/variants/gpy/pins_arduino.h index 30ba6196e89..255363ce5c7 100644 --- a/variants/gpy/pins_arduino.h +++ b/variants/gpy/pins_arduino.h @@ -17,11 +17,11 @@ // Neopixel #define PIN_NEOPIXEL 0 // ->2812 RGB !!! -static const uint8_t LED_BUILTIN = PIN_NEOPIXEL; +static const uint8_t LED_BUILTIN = PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT; #define BUILTIN_LED LED_BUILTIN // backward compatibility #define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN // RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() -#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT) +#define RGB_BUILTIN LED_BUILTIN #define RGB_BRIGHTNESS 64 #define ANT_SELECT 21 // GPIO21 - WiFi external / internal antenna switch diff --git a/variants/heltec_wifi_kit_32_V3/pins_arduino.h b/variants/heltec_wifi_kit_32_V3/pins_arduino.h index a2209bcd5bf..c64fe199860 100644 --- a/variants/heltec_wifi_kit_32_V3/pins_arduino.h +++ b/variants/heltec_wifi_kit_32_V3/pins_arduino.h @@ -2,20 +2,15 @@ #define Pins_Arduino_h #include -#include "soc/soc_caps.h" #define WIFI_Kit_32_V3 true #define DISPLAY_HEIGHT 64 #define DISPLAY_WIDTH 128 -#define PIN_NEOPIXEL 35 -// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino -static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+PIN_NEOPIXEL; +static const uint8_t LED_BUILTIN = 35; #define BUILTIN_LED LED_BUILTIN // backward compatibility #define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN -// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() -#define RGB_BUILTIN LED_BUILTIN -#define RGB_BRIGHTNESS 64 + static const uint8_t KEY_BUILTIN = 0; static const uint8_t TX = 43; diff --git a/variants/heltec_wifi_lora_32_V3/pins_arduino.h b/variants/heltec_wifi_lora_32_V3/pins_arduino.h index cddf4cdccdc..bd0d35a8912 100644 --- a/variants/heltec_wifi_lora_32_V3/pins_arduino.h +++ b/variants/heltec_wifi_lora_32_V3/pins_arduino.h @@ -2,7 +2,6 @@ #define Pins_Arduino_h #include -#include "soc/soc_caps.h" #define WIFI_LoRa_32_V3 true #define DISPLAY_HEIGHT 64 diff --git a/variants/lilygo_t_display_s3/pins_arduino.h b/variants/lilygo_t_display_s3/pins_arduino.h index bdad2730aff..42b01587c39 100644 --- a/variants/lilygo_t_display_s3/pins_arduino.h +++ b/variants/lilygo_t_display_s3/pins_arduino.h @@ -2,7 +2,6 @@ #define Pins_Arduino_h #include -#include "soc/soc_caps.h" #define USB_VID 0x303a #define USB_PID 0x1001 diff --git a/variants/m5stack_cores3/pins_arduino.h b/variants/m5stack_cores3/pins_arduino.h index c409c243973..fd6e5b886d3 100644 --- a/variants/m5stack_cores3/pins_arduino.h +++ b/variants/m5stack_cores3/pins_arduino.h @@ -2,19 +2,11 @@ #define Pins_Arduino_h #include -#include "soc/soc_caps.h" #define USB_VID 0x303a #define USB_PID 0x1001 -// Some boards have too low voltage on this pin (board design bug) -// Use different pin with 3V and connect with 48 -// and change this setup for the chosen pin (for example 38) -static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + 48; -#define BUILTIN_LED LED_BUILTIN // backward compatibility -#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN -#define RGB_BUILTIN LED_BUILTIN -#define RGB_BRIGHTNESS 64 +// CoreS3 has no builtin LED / NeoLED static const uint8_t TX = 43; static const uint8_t RX = 44; diff --git a/variants/m5stack_stamp_s3/pins_arduino.h b/variants/m5stack_stamp_s3/pins_arduino.h index aff8d808d86..999d8c753a5 100644 --- a/variants/m5stack_stamp_s3/pins_arduino.h +++ b/variants/m5stack_stamp_s3/pins_arduino.h @@ -2,7 +2,6 @@ #define Pins_Arduino_h #include -#include "soc/soc_caps.h" #define USB_VID 0x303a #define USB_PID 0x1001 diff --git a/variants/tamc_termod_s3/pins_arduino.h b/variants/tamc_termod_s3/pins_arduino.h index 5a3355723f8..637da583243 100644 --- a/variants/tamc_termod_s3/pins_arduino.h +++ b/variants/tamc_termod_s3/pins_arduino.h @@ -2,19 +2,11 @@ #define Pins_Arduino_h #include -#include "soc/soc_caps.h" #define USB_VID 0x303a #define USB_PID 0x1001 -// Some boards have too low voltage on this pin (board design bug) -// Use different pin with 3V and connect with 48 -// and change this setup for the chosen pin (for example 38) -static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+48; -#define BUILTIN_LED LED_BUILTIN // backward compatibility -#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN -#define RGB_BUILTIN LED_BUILTIN -#define RGB_BRIGHTNESS 64 +// This board has no NeoLED or any User LED static const uint8_t TX = 43; static const uint8_t RX = 44; diff --git a/variants/wifiduino32s3/pins_arduino.h b/variants/wifiduino32s3/pins_arduino.h index f389f82925c..db372a34358 100644 --- a/variants/wifiduino32s3/pins_arduino.h +++ b/variants/wifiduino32s3/pins_arduino.h @@ -2,21 +2,11 @@ #define Pins_Arduino_h #include -#include "soc/soc_caps.h" #define USB_VID 0x303a #define USB_PID 0x1001 -// Some boards have too low voltage on this pin (board design bug) -// Use different pin with 3V and connect with 48 -// and change this setup for the chosen pin (for example 38) -static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+48; -#define BUILTIN_LED LED_BUILTIN // backward compatibility -#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN -#define RGB_BUILTIN LED_BUILTIN -#define RGB_BRIGHTNESS 64 -#define BOARD_HAS_NEOPIXEL -#define LED_BRIGHTNESS 64 +// No USER LED or NeoLED static const uint8_t TX = 45; static const uint8_t RX = 44; diff --git a/variants/wifiduinov2/pins_arduino.h b/variants/wifiduinov2/pins_arduino.h index 150c446d384..f80247e24b9 100644 --- a/variants/wifiduinov2/pins_arduino.h +++ b/variants/wifiduinov2/pins_arduino.h @@ -2,15 +2,10 @@ #define Pins_Arduino_h #include -#include "soc/soc_caps.h" -static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+13; +static const uint8_t LED_BUILTIN = 13; #define BUILTIN_LED LED_BUILTIN // backward compatibility #define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN -#define RGB_BUILTIN LED_BUILTIN -#define RGB_BRIGHTNESS 64 -#define BOARD_HAS_NEOPIXEL -#define LED_BRIGHTNESS 64 static const uint8_t TX = 21; static const uint8_t RX = 20;