ESP32/main/board_config.h

49 lines
1.8 KiB
C

#ifndef BOARD_CONFIG_H
#define BOARD_CONFIG_H
#include "sdkconfig.h"
#include "driver/gpio.h"
#if defined (CONFIG_IDF_TARGET_ESP32C5)
// ============================================================================
// ESP32-C5 (DevKitC-1) 3.3V VCC Pin 1 GND PIN 15
// ============================================================================
#define RGB_LED_GPIO 8 // Common addressable LED pin for C5
#define HAS_RGB_LED 1
#define GPS_TX_PIN GPIO_NUM_24
#define GPS_RX_PIN GPIO_NUM_23
#define GPS_PPS_PIN GPIO_NUM_25
#elif defined (CONFIG_IDF_TARGET_ESP32S3)
// ============================================================================
// ESP32-S3 (DevKitC-1)
// Most S3 DevKits use GPIO 48 for the addressable RGB LED.
// If yours uses GPIO 38, change this value.
// ============================================================================
#define RGB_LED_GPIO 48
#define HAS_RGB_LED 1
#define GPS_TX_PIN GPIO_NUM_5
#define GPS_RX_PIN GPIO_NUM_4
#define GPS_PPS_PIN GPIO_NUM_6
#elif defined (CONFIG_IDF_TARGET_ESP32)
// ============================================================================
// ESP32 (Original / Standard)
// Standard ESP32 DevKits usually have a single blue LED on GPIO 2.
// They rarely have an addressable RGB LED built-in.
// ============================================================================
#define RGB_LED_GPIO 2 // Standard Blue LED
#define HAS_RGB_LED 0 // Not RGB
#define GPS_TX_PIN GPIO_NUM_17
#define GPS_RX_PIN GPIO_NUM_16
#define GPS_PPS_PIN GPIO_NUM_4
#else
// Fallback
#define RGB_LED_GPIO 8
#define HAS_RGB_LED 1
#define GPS_TX_PIN GPIO_NUM_1
#define GPS_RX_PIN GPIO_NUM_3
#define GPS_PPS_PIN GPIO_NUM_5
#endif
#endif // BOARD_CONFIG_H