/* * board_config.h * * Copyright (c) 2025 Umber Networks & Robert McMahon * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #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 27 // 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