mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-27 15:02:41 +00:00
Merge 7aa0af30f2 into 07d354fa02
This commit is contained in:
commit
5bd18ec1ad
@ -13,6 +13,11 @@ extern MemGet memGet;
|
||||
#define LED_STATE_ON 1
|
||||
#endif
|
||||
|
||||
// WIFI LED
|
||||
#ifndef WIFI_STATE_ON
|
||||
#define WIFI_STATE_ON 1
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// DEBUG
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -147,7 +152,9 @@ extern "C" void logLegacy(const char *level, const char *fmt, ...);
|
||||
// Default Bluetooth PIN
|
||||
#define defaultBLEPin 123456
|
||||
|
||||
#if HAS_ETHERNET && !defined(USE_WS5500)
|
||||
#if HAS_ETHERNET && defined(USE_CH390D)
|
||||
#include <ESP32_CH390.h>
|
||||
#elif HAS_ETHERNET && !defined(USE_WS5500)
|
||||
#include <RAK13800_W5100S.h>
|
||||
#endif // HAS_ETHERNET
|
||||
|
||||
|
||||
@ -330,7 +330,7 @@ void setup()
|
||||
|
||||
#ifdef WIFI_LED
|
||||
pinMode(WIFI_LED, OUTPUT);
|
||||
digitalWrite(WIFI_LED, LOW);
|
||||
digitalWrite(WIFI_LED, HIGH ^ WIFI_STATE_ON);
|
||||
#endif
|
||||
|
||||
#ifdef BLE_LED
|
||||
|
||||
@ -25,7 +25,7 @@ template class LR11x0Interface<LR1121>;
|
||||
template class SX126xInterface<STM32WLx>;
|
||||
#endif
|
||||
|
||||
#if HAS_ETHERNET && !defined(USE_WS5500)
|
||||
#if HAS_ETHERNET && !defined(USE_WS5500) && !defined(USE_CH390D)
|
||||
#include "api/ethServerAPI.h"
|
||||
template class ServerAPI<EthernetClient>;
|
||||
template class APIServerPort<ethServerAPI, EthernetServer>;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#include "configuration.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
#if HAS_ETHERNET && !defined(USE_WS5500)
|
||||
#if HAS_ETHERNET && !defined(USE_WS5500) && !defined(USE_CH390D)
|
||||
|
||||
#include "ethServerAPI.h"
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "ServerAPI.h"
|
||||
#ifndef USE_WS5500
|
||||
#if !defined(USE_WS5500) && !defined(USE_CH390D)
|
||||
#include <RAK13800_W5100S.h>
|
||||
|
||||
/**
|
||||
|
||||
@ -356,13 +356,13 @@ static void WiFiEvent(WiFiEvent_t event)
|
||||
case ARDUINO_EVENT_WIFI_STA_CONNECTED:
|
||||
LOG_INFO("Connected to access point");
|
||||
#ifdef WIFI_LED
|
||||
digitalWrite(WIFI_LED, HIGH);
|
||||
digitalWrite(WIFI_LED, LOW ^ WIFI_STATE_ON);
|
||||
#endif
|
||||
break;
|
||||
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
|
||||
LOG_INFO("Disconnected from WiFi access point");
|
||||
#ifdef WIFI_LED
|
||||
digitalWrite(WIFI_LED, LOW);
|
||||
digitalWrite(WIFI_LED, HIGH ^ WIFI_STATE_ON);
|
||||
#endif
|
||||
if (!isReconnecting) {
|
||||
WiFi.disconnect(false, true);
|
||||
@ -413,13 +413,13 @@ static void WiFiEvent(WiFiEvent_t event)
|
||||
case ARDUINO_EVENT_WIFI_AP_START:
|
||||
LOG_INFO("WiFi access point started");
|
||||
#ifdef WIFI_LED
|
||||
digitalWrite(WIFI_LED, HIGH);
|
||||
digitalWrite(WIFI_LED, LOW ^ WIFI_STATE_ON);
|
||||
#endif
|
||||
break;
|
||||
case ARDUINO_EVENT_WIFI_AP_STOP:
|
||||
LOG_INFO("WiFi access point stopped");
|
||||
#ifdef WIFI_LED
|
||||
digitalWrite(WIFI_LED, LOW);
|
||||
digitalWrite(WIFI_LED, HIGH ^ WIFI_STATE_ON);
|
||||
#endif
|
||||
break;
|
||||
case ARDUINO_EVENT_WIFI_AP_STACONNECTED:
|
||||
|
||||
@ -1211,7 +1211,7 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_ETHERNET && !defined(USE_WS5500)
|
||||
#if HAS_ETHERNET && !defined(USE_WS5500) && !defined(USE_CH390D)
|
||||
conn.has_ethernet = true;
|
||||
conn.ethernet.has_status = true;
|
||||
if (Ethernet.linkStatus() == LinkON) {
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
#include <WiFiClientSecure.h>
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_ETHERNET && !defined(USE_WS5500)
|
||||
#if HAS_ETHERNET && !defined(USE_WS5500) && !defined(USE_CH390D)
|
||||
#include <EthernetClient.h>
|
||||
#endif
|
||||
|
||||
|
||||
26
variants/esp32s3/ELECROW-ThinkNode-G3/pins_arduino.h
Normal file
26
variants/esp32s3/ELECROW-ThinkNode-G3/pins_arduino.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x1001
|
||||
|
||||
// The default Wire will be mapped to PMU and RTC
|
||||
static const uint8_t SDA = 17;
|
||||
static const uint8_t SCL = 18;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t SS = 39;
|
||||
static const uint8_t MOSI = 40;
|
||||
static const uint8_t MISO = 41;
|
||||
static const uint8_t SCK = 42;
|
||||
|
||||
// #define SPI_MOSI (11)
|
||||
// #define SPI_SCK (10)
|
||||
// #define SPI_MISO (9)
|
||||
// #define SPI_CS (12)
|
||||
|
||||
// #define SDCARD_CS SPI_CS
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
22
variants/esp32s3/ELECROW-ThinkNode-G3/platformio.ini
Normal file
22
variants/esp32s3/ELECROW-ThinkNode-G3/platformio.ini
Normal file
@ -0,0 +1,22 @@
|
||||
[env:thinknode_g3]
|
||||
extends = esp32s3_base
|
||||
board = ESP32-S3-WROOM-1-N4
|
||||
board_build.psram_type = opi
|
||||
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D ELECROW_ThinkNode_G3
|
||||
-D HAS_UDP_MULTICAST=1
|
||||
-D BOARD_HAS_PSRAM
|
||||
-D PRIVATE_HW
|
||||
# -D CONFIG_ETH_ENABLED=1
|
||||
# -D CONFIG_ETH_USE_ESP32_EMAC=1
|
||||
-I variants/esp32s3/ELECROW-ThinkNode-G3
|
||||
-mfix-esp32-psram-cache-issue
|
||||
|
||||
lib_ignore =
|
||||
Ethernet
|
||||
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
# file://../ESP32-CH390/ESP32-CH390-1.0.1.tar.gz
|
||||
36
variants/esp32s3/ELECROW-ThinkNode-G3/variant.h
Normal file
36
variants/esp32s3/ELECROW-ThinkNode-G3/variant.h
Normal file
@ -0,0 +1,36 @@
|
||||
#define HAS_GPS 0
|
||||
#define HAS_WIRE 0
|
||||
#define I2C_NO_RESCAN
|
||||
|
||||
#define WIFI_LED 5
|
||||
#define WIFI_STATE_ON 0
|
||||
|
||||
#define LED_PIN 6 // The blue LORA LED
|
||||
#define LED_STATE_ON 0
|
||||
#define BUTTON_PIN 4 // the external user button of the device, BOOT and RESET are not accessible without opening it up.
|
||||
|
||||
#define USE_SX1262
|
||||
#define LORA_SCK 42
|
||||
#define LORA_MISO 41
|
||||
#define LORA_MOSI 40
|
||||
#define LORA_CS 39
|
||||
#define LORA_RESET 21
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 15
|
||||
#define SX126X_BUSY 47
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
#define PIN_POWER_EN 45
|
||||
|
||||
// #define HAS_ETHERNET 1
|
||||
// #define USE_CH390D 1 // this driver uses the same stack as the ESP32 Wifi driver
|
||||
|
||||
// #define ETH_MISO_PIN 47
|
||||
// #define ETH_MOSI_PIN 21
|
||||
// #define ETH_SCLK_PIN 48
|
||||
// #define ETH_CS_PIN 45
|
||||
// #define ETH_INT_PIN 14
|
||||
// #define ETH_RST_PIN -1
|
||||
// #define ETH_ADDR 1
|
||||
Loading…
Reference in New Issue
Block a user