mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 10:42:49 +00:00
Merge remote-tracking branch 'remotes/origin/master' into arduino-esp32-v3.2
# Conflicts: # arch/esp32/esp32.ini # src/graphics/draw/MenuHandler.cpp # src/modules/Modules.cpp # variants/esp32s3/seeed-sensecap-indicator/platformio.ini
This commit is contained in:
28
variants/esp32s3/CDEBYTE_EoRa-S3/pins_arduino.h
Normal file
28
variants/esp32s3/CDEBYTE_EoRa-S3/pins_arduino.h
Normal file
@@ -0,0 +1,28 @@
|
||||
// Need this file for ESP32-S3
|
||||
// No need to modify this file, changes to pins imported from variant.h
|
||||
// Most is similar to https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s3/pins_arduino.h
|
||||
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
#include <variant.h>
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x1001
|
||||
|
||||
// Serial
|
||||
static const uint8_t TX = UART_TX;
|
||||
static const uint8_t RX = UART_RX;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t SS = LORA_CS;
|
||||
static const uint8_t SCK = LORA_SCK;
|
||||
static const uint8_t MOSI = LORA_MOSI;
|
||||
static const uint8_t MISO = LORA_MISO;
|
||||
|
||||
// The default Wire will be mapped to PMU and RTC
|
||||
static const uint8_t SCL = I2C_SCL;
|
||||
static const uint8_t SDA = I2C_SDA;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
8
variants/esp32s3/CDEBYTE_EoRa-S3/platformio.ini
Normal file
8
variants/esp32s3/CDEBYTE_EoRa-S3/platformio.ini
Normal file
@@ -0,0 +1,8 @@
|
||||
[env:CDEBYTE_EoRa-S3]
|
||||
extends = esp32s3_base
|
||||
board = CDEBYTE_EoRa-S3
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D CDEBYTE_EORA_S3
|
||||
-I variants/esp32s3/CDEBYTE_EoRa-S3
|
||||
-D GPS_POWER_TOGGLE
|
||||
63
variants/esp32s3/CDEBYTE_EoRa-S3/variant.h
Normal file
63
variants/esp32s3/CDEBYTE_EoRa-S3/variant.h
Normal file
@@ -0,0 +1,63 @@
|
||||
// LED - status indication
|
||||
#define LED_PIN 37
|
||||
|
||||
// Button - user interface
|
||||
#define BUTTON_PIN 0 // This is the BOOT button, and it has its own pull-up resistor
|
||||
|
||||
// SD card - TODO: test, currently untested, copied from T3S3 variant
|
||||
#define HAS_SDCARD
|
||||
#define SDCARD_USE_SPI1
|
||||
// TODO: rename this to make this SD-card specific
|
||||
#define SPI_CS 13
|
||||
#define SPI_SCK 14
|
||||
#define SPI_MOSI 11
|
||||
#define SPI_MISO 2
|
||||
// FIXME: there are two other SPI pins that are not defined here
|
||||
// Compatibility
|
||||
#define SDCARD_CS SPI_CS
|
||||
|
||||
// Battery voltage monitoring - TODO: test, currently untested, copied from T3S3 variant
|
||||
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO1_CHANNEL
|
||||
#define ADC_MULTIPLIER \
|
||||
2.11 // ratio of voltage divider = 2.0 (R10=1M, R13=1M), plus some undervoltage correction - TODO: this was carried over from
|
||||
// the T3S3, test to see if the undervoltage correction is needed.
|
||||
|
||||
// Display - OLED connected via I2C by the default hardware configuration
|
||||
#define HAS_SCREEN 1
|
||||
#define USE_SSD1306
|
||||
#define I2C_SCL 17
|
||||
#define I2C_SDA 18
|
||||
|
||||
// UART - The 1mm JST SH connector closest to the USB-C port
|
||||
#define UART_TX 43
|
||||
#define UART_RX 44
|
||||
|
||||
// Peripheral I2C - The 1mm JST SH connector furthest from the USB-C port which follows Adafruit connection standard. There are no
|
||||
// pull-up resistors on these lines, the downstream device needs to include them. TODO: test, currently untested
|
||||
#define I2C_SCL1 21
|
||||
#define I2C_SDA1 10
|
||||
|
||||
// Radio
|
||||
#define USE_SX1262 // CDEBYTE EoRa-S3-900TB <- CDEBYTE E22-900MM22S <- Semtech SX1262
|
||||
#define USE_SX1268 // CDEBYTE EoRa-S3-400TB <- CDEBYTE E22-400MM22S <- Semtech SX1268
|
||||
|
||||
#define SX126X_CS 7
|
||||
#define LORA_SCK 5
|
||||
#define LORA_MOSI 6
|
||||
#define LORA_MISO 3
|
||||
#define SX126X_RESET 8
|
||||
#define SX126X_BUSY 34
|
||||
#define SX126X_DIO1 33
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH // All switching is performed with DIO2, it is automatically inverted using circuitry.
|
||||
// CDEBYTE EoRa-S3 uses an XTAL, thus we do not need DIO3 as TCXO voltage reference. Don't define SX126X_DIO3_TCXO_VOLTAGE for
|
||||
// simplicity rather than defining it as 0.
|
||||
#define SX126X_MAX_POWER \
|
||||
22 // E22-900MM22S and E22-400MM22S have a raw SX1262 or SX1268 respsectively, they are rated to output up and including 22
|
||||
// dBm out of their SX126x IC.
|
||||
|
||||
// Compatibility with old variant.h file structure - FIXME: this should be done in the respective radio interface modules to clean
|
||||
// up all variants.
|
||||
#define LORA_CS SX126X_CS
|
||||
#define LORA_DIO1 SX126X_DIO1
|
||||
28
variants/esp32s3/EBYTE_ESP32-S3/pins_arduino.h
Normal file
28
variants/esp32s3/EBYTE_ESP32-S3/pins_arduino.h
Normal file
@@ -0,0 +1,28 @@
|
||||
// Need this file for ESP32-S3
|
||||
// No need to modify this file, changes to pins imported from variant.h
|
||||
// Most is similar to https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s3/pins_arduino.h
|
||||
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
#include <variant.h>
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x1001
|
||||
|
||||
// Serial
|
||||
static const uint8_t TX = UART_TX;
|
||||
static const uint8_t RX = UART_RX;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t SS = LORA_CS;
|
||||
static const uint8_t SCK = LORA_SCK;
|
||||
static const uint8_t MOSI = LORA_MOSI;
|
||||
static const uint8_t MISO = LORA_MISO;
|
||||
|
||||
// The default Wire will be mapped to PMU and RTC
|
||||
static const uint8_t SCL = I2C_SCL;
|
||||
static const uint8_t SDA = I2C_SDA;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
9
variants/esp32s3/EBYTE_ESP32-S3/platformio.ini
Normal file
9
variants/esp32s3/EBYTE_ESP32-S3/platformio.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
[env:EBYTE_ESP32-S3]
|
||||
extends = esp32s3_base
|
||||
; board assumes the lowest spec WROOM module: 4 MB (Quad SPI) Flash, No PSRAM
|
||||
board = ESP32-S3-WROOM-1-N4
|
||||
board_level = extra
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D EBYTE_ESP32_S3
|
||||
-I variants/esp32s3/EBYTE_ESP32-S3
|
||||
193
variants/esp32s3/EBYTE_ESP32-S3/variant.h
Normal file
193
variants/esp32s3/EBYTE_ESP32-S3/variant.h
Normal file
@@ -0,0 +1,193 @@
|
||||
// Supporting information: https://github.com/S5NC/EBYTE_ESP32-S3/
|
||||
|
||||
// Originally developed for E22-900M30S with ESP32-S3-WROOM-1-N4
|
||||
// NOTE: Uses ESP32-S3-WROOM-1-N4.json in boards folder (via platformio.ini board field), assumes 4 MB (quad SPI) flash, no PSRAM
|
||||
|
||||
// FIXME: implement SX12 module type autodetection and have setup for each case (add E32 support)
|
||||
// E32 has same pinout except having extra pins. I assume that the GND on it is connected internally to other GNDs so it is not a
|
||||
// problem to NC the extra GND pins.
|
||||
|
||||
// For each EBYTE module pin in this section, provide the pin number of the ESP32-S3 you connected it to
|
||||
// The ESP32-S3 is great because YOU CAN USE PRACTICALLY ANY PINS for the connections, but avoid some pins (such as on the WROOM
|
||||
// modules the following): strapping pins (except 0 as a user button input as it already has a pulldown resistor in typical
|
||||
// application schematic) (0, 3, 45, 46), USB-reserved (19, 20), and pins which aren't present on the WROOM-2 module for
|
||||
// compatiblity as it uses octal SPI, or are likely connected internally in either WROOM version (26-37), and avoid pins whose
|
||||
// voltages are set by the SPI voltage (47, 48), and pins that don't exist (22-25) You can ALSO set the SPI pins (SX126X_CS,
|
||||
// SX126X_SCK, SX126X_MISO, SX126X_MOSI) to any pin with the ESP32-S3 due to \ GPIO Matrix / IO MUX / RTC IO MUX \, and also the
|
||||
// serial pins, but this isn't recommended for Serial0 as the WROOM modules have a 499 Ohm resistor on U0TXD (to reduce harmonics
|
||||
// but also acting as a sort of protection)
|
||||
|
||||
// We have many free pins on the ESP32-S3-WROOM-X-Y module, perhaps it is best to use one of its pins to control TXEN, and use
|
||||
// DIO2 as an extra interrupt, but right now Meshtastic does not benefit from having another interrupt pin available.
|
||||
|
||||
// Adding two 0-ohm links on your PCB design so that you can choose between the two modes for controlling the E22's TXEN would
|
||||
// enable future software to make the most of an extra available interrupt pin
|
||||
|
||||
// Possible improvement: can add extremely low resistance MOSFET to physically toggle power to E22 module when in full sleep (not
|
||||
// waiting for interrupt)?
|
||||
|
||||
// PA stands for Power Amplifier, used when transmitting to increase output power
|
||||
// LNA stands for Low Noise Amplifier, used when \ listening for / receiving \ data to increase sensitivity
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Have custom connections or functionality? Configure them in this section //
|
||||
// //
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define SX126X_CS 14 // EBYTE module's NSS pin // FIXME: rename to SX126X_SS
|
||||
#define LORA_SCK 21 // EBYTE module's SCK pin
|
||||
#define LORA_MOSI 38 // EBYTE module's MOSI pin
|
||||
#define LORA_MISO 39 // EBYTE module's MISO pin
|
||||
#define SX126X_RESET 40 // EBYTE module's NRST pin
|
||||
#define SX126X_BUSY 41 // EBYTE module's BUSY pin
|
||||
#define SX126X_DIO1 42 // EBYTE module's DIO1 pin
|
||||
// We don't define a pin for SX126X_DIO2 as Meshtastic doesn't use it as an interrupt output, so it is never connected to an MCU
|
||||
// pin! Also E22 module datasheets say not to connect it to an MCU pin.
|
||||
// We don't define a pin for SX126X_DIO3 as Meshtastic doesn't use it as an interrupt output, so it is never connected to an MCU
|
||||
// pin! Also E22 module datasheets say to use it as the TCXO's reference voltage.
|
||||
// E32 module (which uses SX1276) may not have ability to set TCXO voltage using a DIO pin.
|
||||
|
||||
// The radio module needs to be told whether to enable RX mode or TX mode. Each radio module takes different actions based on
|
||||
// these values, but generally the path from the antenna to SX1262 is changed from signal output to signal input. Also, if there
|
||||
// are LNAs (Low-Noise Amplifiers) or PAs (Power Amplifiers) in the output or input paths, their power is also controlled by
|
||||
// these pins. You should never have both TXEN and RXEN set high, this can cause problems for some radio modules, and is
|
||||
// commonly referred to as 'undefined behaviour' in datasheets. For the SX1262, you shouldn't connect DIO2 to the MCU. DIO2 is
|
||||
// an output only, and can be controlled via SPI instructions, the use for this is to save an MCU pin by using the DIO2 pin to
|
||||
// control the RF switching mode.
|
||||
|
||||
// Choose ONLY ONE option from below, comment in/out the '/*'s and '*/'s
|
||||
// SX126X_TXEN is the E22's [SX1262's] TXEN pin, SX126X_RXEN is the E22's [SX1262's] RXEN pin
|
||||
|
||||
// Option 1: E22's TXEN pin connected to E22's DIO2 pin, E22's RXEN pin connected to NEGATED output of E22's DIO2 pin (more
|
||||
// expensive option hardware-wise, is the 'most proper' way, removes need for routing one/two traces from MCU to RF switching
|
||||
// pins), however you can't have E22 in low-power 'sleep' mode (TXEN and RXEN both low cannot be achieved this this option).
|
||||
/*
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_TXEN RADIOLIB_NC
|
||||
#define SX126X_RXEN RADIOLIB_NC
|
||||
*/
|
||||
|
||||
// Option 2: E22's TXEN pin connected to E22's DIO2 pin, E22's RXEN pin connected to MCU pin (cheaper option hardware-wise,
|
||||
// removes need for routing another trace from MCU to an RF switching pin).
|
||||
// /*
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_TXEN RADIOLIB_NC
|
||||
#define SX126X_RXEN 10
|
||||
// */
|
||||
|
||||
// Option 3: E22's TXEN pin connected to MCU pin, E22's RXEN pin connected to MCU pin (cheaper option hardware-wise, allows for
|
||||
// ramping up PA before transmission (add/expand on feature yourself in RadioLib) if PA takes a while to stabilise)
|
||||
// Don't define DIO2_AS_RF_SWITCH because we only use DIO2 or an MCU pin mutually exclusively to connect to E22's TXEN (to prevent
|
||||
// a short if they are both connected at the same time (suboptimal PCB design) and there's a slight non-neglibible delay and/or
|
||||
// voltage difference between DIO2 and TXEN). Can use DIO2 as an IRQ (but not in Meshtastic at the moment).
|
||||
/*
|
||||
#define SX126X_TXEN 9
|
||||
#define SX126X_RXEN 10
|
||||
*/
|
||||
|
||||
// (NOT RECOMMENDED, if need to ramp up PA before transmission, better to use option 3)
|
||||
// Option 4: E22's TXEN pin connected to MCU pin, E22's RXEN pin connected to NEGATED output of E22's DIO2 pin (more expensive
|
||||
// option hardware-wise, allows for ramping up PA before transmission (add/expand on feature yourself in RadioLib) if PA takes
|
||||
// a while to stabilise, removes need for routing another trace from MCU to an RF switching pin, however may mean if in
|
||||
// RadioLib you don't tell DIO2 to go high to indicate transmission (so the negated output goes to RXEN to turn the LNA off)
|
||||
// then you may end up enabling E22's TXEN and RXEN pins at the same time whilst you ramp up the PA which is not ideal,
|
||||
// changing DIO2's switching advance in RadioLib may not even be possible, may be baked into the SX126x).
|
||||
/*
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_TXEN 9
|
||||
#define SX126X_RXEN RADIOLIB_NC
|
||||
*/
|
||||
|
||||
// Status
|
||||
#define LED_PIN 1
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
// External notification
|
||||
// FIXME: Check if EXT_NOTIFY_OUT actualy has any effect and removes the need for setting the external notication pin in the
|
||||
// app/preferences
|
||||
#define EXT_NOTIFY_OUT 2 // The GPIO pin that acts as the external notification output (here we connect an LED to it)
|
||||
// Buzzer
|
||||
#define PIN_BUZZER 11
|
||||
// Buttons
|
||||
#define BUTTON_PIN 0 // Use the BOOT button as the user button
|
||||
// I2C
|
||||
#define I2C_SCL 18
|
||||
#define I2C_SDA 8
|
||||
// UART
|
||||
#define UART_TX 43
|
||||
#define UART_RX 44
|
||||
|
||||
// Power
|
||||
// Outputting 22dBm from SX1262 results in ~30dBm E22-900M30S output (module only uses last stage of the YP2233W PA)
|
||||
// Respect local regulations! If your E22-900M30S outputs the advertised 30 dBm and you use a 6 dBi antenna, you are at the
|
||||
// equivalent of 36 EIRP (Effective Isotropic Radiated Power), which in this case is the limit for non-HAM users in the US (4W
|
||||
// EIRP, at SPECIFIC frequencies).
|
||||
// In the EU (and UK), as of now, you are allowed 27 dBm ERP which is 29.15 EIRP.
|
||||
// https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32022D0180
|
||||
// https://www.legislation.gov.uk/uksi/1999/930/schedule/6/made
|
||||
// To respect the 29.15 dBm EIRP (at SPECIFIC frequencies, others are lower) EU limit with a 2.5 dBi gain antenna, consulting
|
||||
// https://github.com/S5NC/EBYTE_ESP32-S3/blob/main/power%20testing.txt, assuming 0.1 dBm insertion loss, output 20 dBm from the
|
||||
// E22-900M30S's SX1262. It is worth noting that if you are in this situation and don't have a HAM license, you may be better off
|
||||
// with a lower gain antenna, and output the difference as a higher total power input into the antenna, as your EIRP would be the
|
||||
// same, but you would get a wider angle of coverage. Also take insertion loss and possibly VSWR into account
|
||||
// (https://www.everythingrf.com/tech-resources/vswr). Please check regulations yourself and check airtime, usage (for example
|
||||
// whether you are airborne), frequency, and power laws.
|
||||
#define SX126X_MAX_POWER 22 // SX126xInterface.cpp defaults to 22 if not defined, but here we define it for good practice
|
||||
|
||||
// Display
|
||||
// FIXME: change behavior in src to default to not having screen if is undefined
|
||||
// FIXME: remove 0/1 option for HAS_SCREEN in src, change to being defined or not
|
||||
// FIXME: check if it actually causes a crash when not specifiying that a display isn't present
|
||||
#define HAS_SCREEN 0 // Assume no screen present by default to prevent crash...
|
||||
|
||||
// GPS
|
||||
// FIXME: unsure what to define HAS_GPS as if GPS isn't always present
|
||||
#define HAS_GPS 1 // Don't need to set this to 0 to prevent a crash as it doesn't crash if GPS not found, will probe by default
|
||||
#define PIN_GPS_EN 15
|
||||
#define GPS_EN_ACTIVE 1
|
||||
#define GPS_TX_PIN 16
|
||||
#define GPS_RX_PIN 17
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// You should have no need to modify the code below, nor in pins_arduino.h //
|
||||
// //
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define USE_SX1262 // E22-900M30S, E22-900M22S, and E22-900MM22S (not E220!) use SX1262
|
||||
#define USE_SX1268 // E22-400M30S, E22-400M33S, E22-400M22S, and E22-400MM22S use SX1268
|
||||
|
||||
// The below isn't needed as we directly define SX126X_TXEN and SX126X_RXEN instead of using proxies E22_TXEN and E22_RXEN
|
||||
/*
|
||||
// FALLBACK: If somehow E22_TXEN isn't defined or clearly isn't a valid pin number, set it to RADIOLIB_NC to avoid SX126X_TXEN
|
||||
being defined but having no value #if (!defined(E22_TXEN) || !(0 <= E22_TXEN && E22_TXEN <= 48)) #define E22_TXEN RADIOLIB_NC
|
||||
#endif
|
||||
// FALLBACK: If somehow E22_RXEN isn't defined or clearly isn't a valid pin number, set it to RADIOLIB_NC to avoid SX126X_RXEN
|
||||
being defined but having no value #if (!defined(E22_RXEN) || !(0 <= E22_RXEN && E22_RXEN <= 48)) #define E22_RXEN RADIOLIB_NC
|
||||
#endif
|
||||
#define SX126X_TXEN E22_TXEN
|
||||
#define SX126X_RXEN E22_RXEN
|
||||
*/
|
||||
|
||||
// E22 series TCXO voltage is 1.8V per https://www.ebyte.com/en/pdf-down.aspx?id=781 (source
|
||||
// https://github.com/jgromes/RadioLib/issues/12#issuecomment-520695575), so set it as such
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
|
||||
#define LORA_CS SX126X_CS // FIXME: for some reason both are used in /src
|
||||
|
||||
// Many of the below values would only be used if USE_RF95 was defined, but it's not as we aren't actually using an RF95, just
|
||||
// that the 4 pins above are named like it If they aren't used they don't need to be defined and doing so cause confusion to those
|
||||
// adapting this file LORA_RESET value is never used in src (as we are not using RF95), so no need to define LORA_DIO0 is not used
|
||||
// in src (as we are not using RF95) as SX1262 does not have it per SX1262 datasheet, so no need to define
|
||||
// FIXME: confirm that the linked lines below are actually only called when using the SX126x or SX128x and no other modules
|
||||
// then use SX126X_DIO1 and SX128X_DIO1 respectively for that purpose, removing the need for RF95-style LORA_* definitions when
|
||||
// the RF95 isn't used
|
||||
#define LORA_DIO1 \
|
||||
SX126X_DIO1 // The old name is used in
|
||||
// https://github.com/meshtastic/firmware/blob/7eff5e7bcb2084499b723c5e3846c15ee089e36d/src/sleep.cpp#L298, so
|
||||
// must also define the old name
|
||||
// LORA_DIO2 value is never used in src (as we are not using RF95), so no need to define, and if DIO2_AS_RF_SWITCH is set then it
|
||||
// cannot serve any extra function even if requested to LORA_DIO3 value is never used in src (as we are not using RF95), so no
|
||||
// need to define, and DIO3_AS_TCXO_AT_1V8 is set so it cannot serve any extra function even if requested to (from 13.3.2.1
|
||||
// DioxMask in SX1262 datasheet: Note that if DIO2 or DIO3 are used to control the RF Switch or the TCXO, the IRQ will not be
|
||||
// generated even if it is mapped to the pins.)
|
||||
28
variants/esp32s3/ELECROW-ThinkNode-M2/pins_arduino.h
Normal file
28
variants/esp32s3/ELECROW-ThinkNode-M2/pins_arduino.h
Normal file
@@ -0,0 +1,28 @@
|
||||
// Need this file for ESP32-S3
|
||||
// No need to modify this file, changes to pins imported from variant.h
|
||||
// Most is similar to https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s3/pins_arduino.h
|
||||
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
#include <variant.h>
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x1001
|
||||
|
||||
// Serial
|
||||
static const uint8_t TX = UART_TX;
|
||||
static const uint8_t RX = UART_RX;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t SS = LORA_CS;
|
||||
static const uint8_t SCK = LORA_SCK;
|
||||
static const uint8_t MOSI = LORA_MOSI;
|
||||
static const uint8_t MISO = LORA_MISO;
|
||||
|
||||
// The default Wire will be mapped to PMU and RTC
|
||||
static const uint8_t SCL = I2C_SCL;
|
||||
static const uint8_t SDA = I2C_SDA;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
7
variants/esp32s3/ELECROW-ThinkNode-M2/platformio.ini
Normal file
7
variants/esp32s3/ELECROW-ThinkNode-M2/platformio.ini
Normal file
@@ -0,0 +1,7 @@
|
||||
[env:thinknode_m2]
|
||||
extends = esp32s3_base
|
||||
board = ESP32-S3-WROOM-1-N4
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D ELECROW_ThinkNode_M2
|
||||
-I variants/esp32s3/ELECROW-ThinkNode-M2
|
||||
65
variants/esp32s3/ELECROW-ThinkNode-M2/variant.h
Normal file
65
variants/esp32s3/ELECROW-ThinkNode-M2/variant.h
Normal file
@@ -0,0 +1,65 @@
|
||||
// Status
|
||||
#define LED_PIN 1
|
||||
|
||||
#define PIN_BUTTON1 47 // 功能键
|
||||
#define PIN_BUTTON2 4 // 电源键
|
||||
#define ALT_BUTTON_PIN PIN_BUTTON2
|
||||
#define ALT_BUTTON_ACTIVE_LOW false
|
||||
#define ALT_BUTTON_ACTIVE_PULLUP false
|
||||
|
||||
#define LED_POWER 6
|
||||
#define ADC_V 42
|
||||
// USB_CHECK
|
||||
#define EXT_PWR_DETECT 7
|
||||
|
||||
#define PIN_BUZZER 5
|
||||
|
||||
#define I2C_SCL 15
|
||||
#define I2C_SDA 16
|
||||
|
||||
#define UART_TX 43
|
||||
#define UART_RX 44
|
||||
|
||||
#define VEXT_ENABLE 46 // for OLED
|
||||
#define VEXT_ON_VALUE HIGH
|
||||
|
||||
#define SX126X_CS 10
|
||||
#define LORA_SCK 12
|
||||
#define LORA_MOSI 11
|
||||
#define LORA_MISO 13
|
||||
#define SX126X_RESET 21
|
||||
#define SX126X_BUSY 14
|
||||
#define SX126X_DIO1 3
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
// #define SX126X_DIO3 9
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 3.3
|
||||
|
||||
#define SX126X_MAX_POWER 22 // SX126xInterface.cpp defaults to 22 if not defined, but here we define it for good practice
|
||||
#define USE_SX1262
|
||||
#define LORA_CS SX126X_CS // FIXME: for some reason both are used in /src
|
||||
#define LORA_DIO1 SX126X_DIO1
|
||||
#define SX126X_POWER_EN 48
|
||||
|
||||
// Battery
|
||||
// #define BATTERY_PIN 2
|
||||
#define BATTERY_PIN 17
|
||||
// #define ADC_CHANNEL ADC1_GPIO2_CHANNEL
|
||||
#define ADC_CHANNEL ADC2_GPIO17_CHANNEL
|
||||
#define BATTERY_SENSE_RESOLUTION_BITS 12
|
||||
#define BATTERY_SENSE_RESOLUTION 4096.0
|
||||
#undef AREF_VOLTAGE
|
||||
#define AREF_VOLTAGE 3.0
|
||||
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
|
||||
#define ADC_MULTIPLIER (1.548F)
|
||||
#define BAT_MEASURE_ADC_UNIT 2
|
||||
|
||||
#define HAS_SCREEN 1
|
||||
#define USE_SH1106 1
|
||||
|
||||
// PCF8563 RTC Module
|
||||
// #define PCF8563_RTC 0x51
|
||||
// #define PIN_RTC_INT 48 // Interrupt from the PCF8563 RTC
|
||||
#define HAS_RTC 0
|
||||
#define HAS_GPS 0
|
||||
|
||||
#define BUTTON_PIN PIN_BUTTON1
|
||||
29
variants/esp32s3/bpi_picow_esp32_s3/pins_arduino.h
Normal file
29
variants/esp32s3/bpi_picow_esp32_s3/pins_arduino.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x1001
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
// The default Wire will be mapped to PMU and RTC
|
||||
static const uint8_t SDA = 12;
|
||||
static const uint8_t SCL = 14;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t MISO = 39;
|
||||
static const uint8_t SCK = 21;
|
||||
static const uint8_t MOSI = 38;
|
||||
static const uint8_t SS = 17;
|
||||
|
||||
// #define SPI_MOSI (11)
|
||||
// #define SPI_SCK (14)
|
||||
// #define SPI_MISO (2)
|
||||
// #define SPI_CS (13)
|
||||
|
||||
// #define SDCARD_CS SPI_CS
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
16
variants/esp32s3/bpi_picow_esp32_s3/platformio.ini
Normal file
16
variants/esp32s3/bpi_picow_esp32_s3/platformio.ini
Normal file
@@ -0,0 +1,16 @@
|
||||
[env:bpi_picow_esp32_s3]
|
||||
extends = esp32s3_base
|
||||
board = bpi_picow_esp32_s3
|
||||
board_level = extra
|
||||
;OpenOCD flash method
|
||||
;upload_protocol = esp-builtin
|
||||
;Normal method
|
||||
upload_protocol = esptool
|
||||
;upload_port = /dev/ttyACM2
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
caveman99/ESP32 Codec2@^1.0.1
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D PRIVATE_HW
|
||||
-I variants/esp32s3/bpi_picow_esp32_s3
|
||||
74
variants/esp32s3/bpi_picow_esp32_s3/variant.h
Normal file
74
variants/esp32s3/bpi_picow_esp32_s3/variant.h
Normal file
@@ -0,0 +1,74 @@
|
||||
#define HAS_GPS 0
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
|
||||
// #define HAS_SCREEN 0
|
||||
|
||||
// #define HAS_SDCARD
|
||||
// #define SDCARD_USE_SPI1
|
||||
|
||||
#define USE_SSD1306
|
||||
#define I2C_SDA 12
|
||||
#define I2C_SCL 14
|
||||
|
||||
#define LED_PIN 46
|
||||
#define LED_STATE_ON 0 // State when LED is litted
|
||||
|
||||
// #define BUTTON_PIN 15 // Pico OLED 1.3 User key 0 - removed User key 1 (17)
|
||||
|
||||
#define BUTTON_PIN 40
|
||||
// #define BUTTON_PIN 0 // This is the BOOT button pad at the moment
|
||||
// #define BUTTON_NEED_PULLUP
|
||||
|
||||
// #define USE_RF95 // RFM95/SX127x
|
||||
|
||||
#undef LORA_SCK
|
||||
#undef LORA_MISO
|
||||
#undef LORA_MOSI
|
||||
#undef LORA_CS
|
||||
|
||||
// WaveShare Core1262-868M OK
|
||||
// https://www.waveshare.com/wiki/Core1262-868M
|
||||
#define USE_SX1262
|
||||
|
||||
#ifdef USE_SX1262
|
||||
#define LORA_MISO 39
|
||||
#define LORA_SCK 21
|
||||
#define LORA_MOSI 38
|
||||
#define LORA_CS 17
|
||||
#define LORA_RESET 42
|
||||
#define LORA_DIO1 5
|
||||
#define LORA_BUSY 47
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_BUSY
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
#endif
|
||||
|
||||
// #define USE_SX1280
|
||||
#ifdef USE_SX1280
|
||||
#define LORA_MISO 1
|
||||
#define LORA_SCK 3
|
||||
#define LORA_MOSI 4
|
||||
#define LORA_CS 2
|
||||
#define LORA_RESET 17
|
||||
#define LORA_DIO1 12
|
||||
#define LORA_BUSY 47
|
||||
#define SX128X_CS LORA_CS
|
||||
#define SX128X_DIO1 LORA_DIO1
|
||||
#define SX128X_BUSY LORA_BUSY
|
||||
#define SX128X_RESET LORA_RESET
|
||||
#endif
|
||||
|
||||
// #define USE_EINK
|
||||
/*
|
||||
* eink display pins
|
||||
*/
|
||||
// #define PIN_EINK_CS
|
||||
// #define PIN_EINK_BUSY
|
||||
// #define PIN_EINK_DC
|
||||
// #define PIN_EINK_RES (-1)
|
||||
// #define PIN_EINK_SCLK 3
|
||||
// #define PIN_EINK_MOSI 4
|
||||
26
variants/esp32s3/crowpanel-esp32s3-5-epaper/pins_arduino.h
Normal file
26
variants/esp32s3/crowpanel-esp32s3-5-epaper/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 = 21;
|
||||
static const uint8_t SCL = 15;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t SS = 14;
|
||||
static const uint8_t MOSI = 8;
|
||||
static const uint8_t MISO = 9;
|
||||
static const uint8_t SCK = 3;
|
||||
|
||||
#define SPI_MOSI (40)
|
||||
#define SPI_SCK (39)
|
||||
#define SPI_MISO (13)
|
||||
#define SPI_CS (10)
|
||||
// IO42 TF_3V3_CTL
|
||||
#define SDCARD_CS SPI_CS
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
89
variants/esp32s3/crowpanel-esp32s3-5-epaper/platformio.ini
Normal file
89
variants/esp32s3/crowpanel-esp32s3-5-epaper/platformio.ini
Normal file
@@ -0,0 +1,89 @@
|
||||
[env:crowpanel-esp32s3-5-epaper]
|
||||
extends = esp32s3_base
|
||||
board_build.arduino.memory_type = qio_opi
|
||||
board_build.flash_mode = qio
|
||||
board_build.psram_type = opi
|
||||
board_upload.flash_size = 8MB
|
||||
board_upload.maximum_size = 8388608
|
||||
board_build.partitions = default_8MB.csv
|
||||
board = esp32-s3-devkitc-1
|
||||
;upload_port = /dev/ttyUSB0
|
||||
board_level = extra
|
||||
upload_protocol = esptool
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D CROWPANEL_ESP32S3_5_EPAPER
|
||||
-I variants/esp32s3/crowpanel-esp32s3-5-epaper
|
||||
-D PRIVATE_HW
|
||||
-DBOARD_HAS_PSRAM
|
||||
-DGPS_POWER_TOGGLE
|
||||
-DEINK_DISPLAY_MODEL=GxEPD2_579_GDEY0579T93 ;https://www.good-display.com/product/439.html
|
||||
-DEINK_WIDTH=792
|
||||
-DEINK_HEIGHT=272
|
||||
-DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
||||
-DEINK_LIMIT_FASTREFRESH=100 ; How many consecutive fast-refreshes are permitted
|
||||
;-DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates
|
||||
;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip
|
||||
|
||||
[env:crowpanel-esp32s3-4-epaper]
|
||||
extends = esp32s3_base
|
||||
board_build.arduino.memory_type = qio_opi
|
||||
board_build.flash_mode = qio
|
||||
board_build.psram_type = opi
|
||||
board_upload.flash_size = 8MB
|
||||
board_upload.maximum_size = 8388608
|
||||
board_build.partitions = default_8MB.csv
|
||||
board = esp32-s3-devkitc-1
|
||||
;upload_port = /dev/ttyUSB0
|
||||
board_level = extra
|
||||
upload_protocol = esptool
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D CROWPANEL_ESP32S3_4_EPAPER
|
||||
-I variants/esp32s3/crowpanel-esp32s3-5-epaper
|
||||
-D PRIVATE_HW
|
||||
-DBOARD_HAS_PSRAM
|
||||
-DGPS_POWER_TOGGLE
|
||||
-DEINK_DISPLAY_MODEL=GxEPD2_420_GYE042A87 ; similar Panel: GDEY042T81 : https://www.good-display.com/product/386.html
|
||||
-DEINK_WIDTH=400
|
||||
-DEINK_HEIGHT=300
|
||||
-DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
||||
-DEINK_LIMIT_FASTREFRESH=100 ; How many consecutive fast-refreshes are permitted
|
||||
;-DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates
|
||||
;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip
|
||||
|
||||
[env:crowpanel-esp32s3-2-epaper]
|
||||
extends = esp32s3_base
|
||||
board_build.arduino.memory_type = qio_opi
|
||||
board_build.flash_mode = qio
|
||||
board_build.psram_type = opi
|
||||
board_upload.flash_size = 8MB
|
||||
board_upload.maximum_size = 8388608
|
||||
board_build.partitions = default_8MB.csv
|
||||
board = esp32-s3-devkitc-1
|
||||
;upload_port = /dev/ttyUSB0
|
||||
board_level = extra
|
||||
upload_protocol = esptool
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D CROWPANEL_ESP32S3_2_EPAPER
|
||||
-I variants/esp32s3/crowpanel-esp32s3-5-epaper
|
||||
-D PRIVATE_HW
|
||||
-DBOARD_HAS_PSRAM
|
||||
-DGPS_POWER_TOGGLE
|
||||
-DEINK_DISPLAY_MODEL=GxEPD2_290_GDEY029T94 ;https://www.good-display.com/product/389.html
|
||||
-DEINK_WIDTH=296
|
||||
-DEINK_HEIGHT=128
|
||||
-DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
||||
-DEINK_LIMIT_FASTREFRESH=100 ; How many consecutive fast-refreshes are permitted
|
||||
;-DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates
|
||||
;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip
|
||||
77
variants/esp32s3/crowpanel-esp32s3-5-epaper/variant.h
Normal file
77
variants/esp32s3/crowpanel-esp32s3-5-epaper/variant.h
Normal file
@@ -0,0 +1,77 @@
|
||||
#define HAS_SDCARD
|
||||
#define SDCARD_USE_SPI1
|
||||
|
||||
// Display (E-Ink)
|
||||
#define USE_EINK
|
||||
#define PIN_EINK_CS 45
|
||||
#define PIN_EINK_BUSY 48
|
||||
#define PIN_EINK_DC 46
|
||||
#define PIN_EINK_RES 47
|
||||
#define PIN_EINK_SCLK 12
|
||||
#define PIN_EINK_MOSI 11
|
||||
#define VEXT_ENABLE 7 // e-ink power enable pin
|
||||
#define VEXT_ON_VALUE HIGH
|
||||
|
||||
#define PIN_POWER_EN 42 // TF/SD Card Power Enable Pin
|
||||
|
||||
// #define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to
|
||||
// measure battery voltage ratio of voltage divider = 2.0 (assumption)
|
||||
// #define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.
|
||||
// #define ADC_CHANNEL ADC1_GPIO1_CHANNEL
|
||||
|
||||
#define I2C_SDA SDA // 21
|
||||
#define I2C_SCL SCL // 15
|
||||
|
||||
#define GPS_DEFAULT_NOT_PRESENT 1
|
||||
// #define GPS_RX_PIN 44
|
||||
// #define GPS_TX_PIN 43
|
||||
|
||||
#define LED_PIN 41
|
||||
#define BUTTON_PIN 2
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
// Buzzer - noisy ?
|
||||
#define PIN_BUZZER (0 + 18)
|
||||
|
||||
// Wheel
|
||||
// Up 6
|
||||
// Push 5
|
||||
// Down 4
|
||||
// MENU Top 2
|
||||
// EXIT Bottom 1
|
||||
|
||||
// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and
|
||||
// we will probe at runtime for RF95 and if not found then probe for SX1262
|
||||
// #define USE_RF95 // RFM95/SX127x
|
||||
#define USE_SX1262
|
||||
// #define USE_SX1280
|
||||
|
||||
#define LORA_SCK 3
|
||||
#define LORA_MISO 9
|
||||
#define LORA_MOSI 8
|
||||
#define LORA_CS 14
|
||||
#define LORA_RESET 38
|
||||
|
||||
#define LORA_DIO1 16
|
||||
#define LORA_DIO2 17
|
||||
|
||||
// per SX1262_Receive_Interrupt/utilities.h
|
||||
#ifdef USE_SX1262
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
#endif
|
||||
|
||||
// per SX128x_Receive_Interrupt/utilities.h
|
||||
#ifdef USE_SX1280
|
||||
#define SX128X_CS LORA_CS
|
||||
#define SX128X_DIO1 LORA_DIO1
|
||||
#define SX128X_BUSY LORA_DIO2
|
||||
#define SX128X_RESET LORA_RESET
|
||||
#define SX128X_RXEN 21
|
||||
#define SX128X_TXEN 15
|
||||
#define SX128X_MAX_POWER 3
|
||||
#endif
|
||||
26
variants/esp32s3/diy/my_esp32s3_diy_eink/pins_arduino.h
Normal file
26
variants/esp32s3/diy/my_esp32s3_diy_eink/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 = 18;
|
||||
static const uint8_t SCL = 17;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t MISO = 3;
|
||||
static const uint8_t SCK = 5;
|
||||
static const uint8_t MOSI = 6;
|
||||
static const uint8_t SS = 7;
|
||||
|
||||
// #define SPI_MOSI (11)
|
||||
// #define SPI_SCK (14)
|
||||
// #define SPI_MISO (2)
|
||||
// #define SPI_CS (13)
|
||||
|
||||
// #define SDCARD_CS SPI_CS
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
28
variants/esp32s3/diy/my_esp32s3_diy_eink/platformio.ini
Normal file
28
variants/esp32s3/diy/my_esp32s3_diy_eink/platformio.ini
Normal file
@@ -0,0 +1,28 @@
|
||||
[env:my-esp32s3-diy-eink]
|
||||
board_level = extra
|
||||
extends = esp32s3_base
|
||||
board = my_esp32s3_diy_eink
|
||||
board_build.arduino.memory_type = dio_opi
|
||||
board_build.mcu = esp32s3
|
||||
board_build.f_cpu = 240000000L
|
||||
upload_protocol = esptool
|
||||
;upload_port = /dev/ttyACM1
|
||||
upload_speed = 921600
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
zinggjm/GxEPD2@^1.6.2
|
||||
adafruit/Adafruit NeoPixel @ ^1.12.0
|
||||
build_unflags =
|
||||
${esp32s3_base.build_unflags}
|
||||
-DARDUINO_USB_MODE=1
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D PRIVATE_HW
|
||||
-I variants/esp32s3/diy/my_esp32s3_diy_eink
|
||||
-Dmy
|
||||
-DEINK_DISPLAY_MODEL=GxEPD2_290_T5D
|
||||
-DEINK_WIDTH=296
|
||||
-DEINK_HEIGHT=128
|
||||
-DBOARD_HAS_PSRAM
|
||||
-mfix-esp32-psram-cache-issue
|
||||
-DARDUINO_USB_MODE=0
|
||||
60
variants/esp32s3/diy/my_esp32s3_diy_eink/variant.h
Normal file
60
variants/esp32s3/diy/my_esp32s3_diy_eink/variant.h
Normal file
@@ -0,0 +1,60 @@
|
||||
#define HAS_GPS 0
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
|
||||
// #define HAS_SCREEN 0
|
||||
// #define HAS_SDCARD
|
||||
// #define SDCARD_USE_SPI1
|
||||
|
||||
// #define USE_SSD1306
|
||||
|
||||
#define I2C_SDA 18 // 1 // I2C pins for this board
|
||||
#define I2C_SCL 17 // 2
|
||||
|
||||
// #define LED_PIN 38 // This is a RGB LED not a standard LED
|
||||
#define HAS_NEOPIXEL // Enable the use of neopixels
|
||||
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
|
||||
#define NEOPIXEL_DATA 38 // gpio pin used to send data to the neopixels
|
||||
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
|
||||
|
||||
#define BUTTON_PIN 0 // This is the BOOT button
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
// #define USE_RF95 // RFM95/SX127x
|
||||
// #define USE_SX1262
|
||||
#define USE_SX1280
|
||||
|
||||
#define LORA_MISO 3
|
||||
#define LORA_SCK 5
|
||||
#define LORA_MOSI 6
|
||||
#define LORA_CS 7
|
||||
|
||||
#define LORA_RESET 8
|
||||
#define LORA_DIO1 16
|
||||
|
||||
#ifdef USE_SX1262
|
||||
#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY 15
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_RXEN 4
|
||||
#define SX126X_TXEN 9
|
||||
#endif
|
||||
|
||||
#ifdef USE_SX1280
|
||||
#define SX128X_CS LORA_CS
|
||||
#define SX128X_DIO1 LORA_DIO1
|
||||
#define SX128X_BUSY 15
|
||||
#define SX128X_RESET LORA_RESET
|
||||
#endif
|
||||
|
||||
#define USE_EINK
|
||||
/*
|
||||
* eink display pins
|
||||
*/
|
||||
#define PIN_EINK_CS 13
|
||||
#define PIN_EINK_BUSY 2
|
||||
#define PIN_EINK_DC 1
|
||||
#define PIN_EINK_RES (-1)
|
||||
#define PIN_EINK_SCLK 5
|
||||
#define PIN_EINK_MOSI 6
|
||||
26
variants/esp32s3/diy/my_esp32s3_diy_oled/pins_arduino.h
Normal file
26
variants/esp32s3/diy/my_esp32s3_diy_oled/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 = 18;
|
||||
static const uint8_t SCL = 17;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t MISO = 3;
|
||||
static const uint8_t SCK = 5;
|
||||
static const uint8_t MOSI = 6;
|
||||
static const uint8_t SS = 7;
|
||||
|
||||
// #define SPI_MOSI (11)
|
||||
// #define SPI_SCK (14)
|
||||
// #define SPI_MISO (2)
|
||||
// #define SPI_CS (13)
|
||||
|
||||
// #define SDCARD_CS SPI_CS
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
23
variants/esp32s3/diy/my_esp32s3_diy_oled/platformio.ini
Normal file
23
variants/esp32s3/diy/my_esp32s3_diy_oled/platformio.ini
Normal file
@@ -0,0 +1,23 @@
|
||||
[env:my-esp32s3-diy-oled]
|
||||
board_level = extra
|
||||
extends = esp32s3_base
|
||||
board = my-esp32s3-diy-oled
|
||||
board_build.arduino.memory_type = dio_opi
|
||||
board_build.mcu = esp32s3
|
||||
board_build.f_cpu = 240000000L
|
||||
upload_protocol = esptool
|
||||
;upload_port = /dev/ttyACM0
|
||||
upload_speed = 921600
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
adafruit/Adafruit NeoPixel @ ^1.12.0
|
||||
build_unflags =
|
||||
${esp32s3_base.build_unflags}
|
||||
-DARDUINO_USB_MODE=1
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D PRIVATE_HW
|
||||
-I variants/esp32s3/diy/my_esp32s3_diy_oled
|
||||
-DBOARD_HAS_PSRAM
|
||||
-mfix-esp32-psram-cache-issue
|
||||
-DARDUINO_USB_MODE=0
|
||||
60
variants/esp32s3/diy/my_esp32s3_diy_oled/variant.h
Normal file
60
variants/esp32s3/diy/my_esp32s3_diy_oled/variant.h
Normal file
@@ -0,0 +1,60 @@
|
||||
#define HAS_GPS 0
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
|
||||
// #define HAS_SCREEN 0
|
||||
// #define HAS_SDCARD
|
||||
// #define SDCARD_USE_SPI1
|
||||
|
||||
#define USE_SSD1306
|
||||
|
||||
#define I2C_SDA 18 // 1 // I2C pins for this board
|
||||
#define I2C_SCL 17 // 2
|
||||
|
||||
// #define LED_PIN 38 // This is a RGB LED not a standard LED
|
||||
#define HAS_NEOPIXEL // Enable the use of neopixels
|
||||
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
|
||||
#define NEOPIXEL_DATA 38 // gpio pin used to send data to the neopixels
|
||||
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
|
||||
|
||||
#define BUTTON_PIN 0 // This is the BOOT button
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
// #define USE_RF95 // RFM95/SX127x
|
||||
// #define USE_SX1262
|
||||
#define USE_SX1280
|
||||
|
||||
#define LORA_MISO 3
|
||||
#define LORA_SCK 5
|
||||
#define LORA_MOSI 6
|
||||
#define LORA_CS 7
|
||||
|
||||
#define LORA_RESET 8
|
||||
#define LORA_DIO1 16
|
||||
|
||||
#ifdef USE_SX1262
|
||||
#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY 15
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_RXEN 4
|
||||
#define SX126X_TXEN 9
|
||||
#endif
|
||||
|
||||
#ifdef USE_SX1280
|
||||
#define SX128X_CS LORA_CS
|
||||
#define SX128X_DIO1 LORA_DIO1
|
||||
#define SX128X_BUSY 15
|
||||
#define SX128X_RESET LORA_RESET
|
||||
#endif
|
||||
|
||||
// #define USE_EINK
|
||||
/*
|
||||
* eink display pins
|
||||
*/
|
||||
// #define PIN_EINK_CS 13
|
||||
// #define PIN_EINK_BUSY 2
|
||||
// #define PIN_EINK_DC 1
|
||||
// #define PIN_EINK_RES (-1)
|
||||
// #define PIN_EINK_SCLK 5
|
||||
// #define PIN_EINK_MOSI 6
|
||||
18
variants/esp32s3/diy/t-energy-s3_e22/platformio.ini
Normal file
18
variants/esp32s3/diy/t-energy-s3_e22/platformio.ini
Normal file
@@ -0,0 +1,18 @@
|
||||
; NanoVHF T-Energy-S3 + E22(0)-xxxM - DIY
|
||||
[env:t-energy-s3_e22]
|
||||
extends = esp32s3_base
|
||||
board = esp32-s3-devkitc-1
|
||||
board_build.partitions = default_16MB.csv
|
||||
board_level = extra
|
||||
board_upload.flash_size = 16MB ;Specify the FLASH capacity as 16MB
|
||||
board_build.arduino.memory_type = qio_opi ;Enable internal PSRAM
|
||||
build_unflags =
|
||||
${esp32s3_base.build_unflags}
|
||||
-D ARDUINO_USB_MODE=1
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D EBYTE_ESP32_S3
|
||||
-D BOARD_HAS_PSRAM
|
||||
-D ARDUINO_USB_MODE=0
|
||||
-D ARDUINO_USB_CDC_ON_BOOT=1
|
||||
-I variants/esp32s3/diy/t-energy-s3_e22
|
||||
46
variants/esp32s3/diy/t-energy-s3_e22/variant.h
Normal file
46
variants/esp32s3/diy/t-energy-s3_e22/variant.h
Normal file
@@ -0,0 +1,46 @@
|
||||
// NanoVHF T-Energy-S3 + E22(0)-xxxM - DIY
|
||||
// https://github.com/NanoVHF/Meshtastic-DIY/tree/main/PCB/ESP-32-devkit_EBYTE-E22/Mesh-v1.06-TTGO-T18
|
||||
|
||||
// Battery
|
||||
#define BATTERY_PIN 3
|
||||
#define ADC_MULTIPLIER 2.0
|
||||
#define ADC_CHANNEL ADC1_GPIO3_CHANNEL
|
||||
|
||||
// Button on NanoVHF PCB
|
||||
#define BUTTON_PIN 39
|
||||
|
||||
// I2C via connectors on NanoVHF PCB
|
||||
#define I2C_SCL 2
|
||||
#define I2C_SDA 42
|
||||
|
||||
// Screen (disabled)
|
||||
#define HAS_SCREEN 0 // Assume no screen present by default to prevent crash...
|
||||
|
||||
// GPS via T-Energy-S3 onboard connector
|
||||
#define HAS_GPS 1
|
||||
#define GPS_TX_PIN 43
|
||||
#define GPS_RX_PIN 44
|
||||
|
||||
// LoRa
|
||||
#define USE_SX1262 // E22-900M30S, E22-900M22S, and E22-900MM22S (not E220!) use SX1262
|
||||
#define USE_SX1268 // E22-400M30S, E22-400M33S, E22-400M22S, and E22-400MM22S use SX1268
|
||||
|
||||
#define SX126X_MAX_POWER 22 // SX126xInterface.cpp defaults to 22 if not defined, but here we define it for good practice
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // E22 series TCXO reference voltage is 1.8V
|
||||
|
||||
#define SX126X_CS 5 // EBYTE module's NSS pin // FIXME: rename to SX126X_SS
|
||||
#define SX126X_SCK 6 // EBYTE module's SCK pin
|
||||
#define SX126X_MOSI 13 // EBYTE module's MOSI pin
|
||||
#define SX126X_MISO 4 // EBYTE module's MISO pin
|
||||
#define SX126X_RESET 1 // EBYTE module's NRST pin
|
||||
#define SX126X_BUSY 48 // EBYTE module's BUSY pin
|
||||
#define SX126X_DIO1 47 // EBYTE module's DIO1 pin
|
||||
|
||||
#define SX126X_TXEN 10 // Schematic connects EBYTE module's TXEN pin to MCU
|
||||
#define SX126X_RXEN 12 // Schematic connects EBYTE module's RXEN pin to MCU
|
||||
|
||||
#define LORA_CS SX126X_CS // Compatibility with variant file configuration structure
|
||||
#define LORA_SCK SX126X_SCK // Compatibility with variant file configuration structure
|
||||
#define LORA_MOSI SX126X_MOSI // Compatibility with variant file configuration structure
|
||||
#define LORA_MISO SX126X_MISO // Compatibility with variant file configuration structure
|
||||
#define LORA_DIO1 SX126X_DIO1 // Compatibility with variant file configuration structure
|
||||
29
variants/esp32s3/dreamcatcher/platformio.ini
Normal file
29
variants/esp32s3/dreamcatcher/platformio.ini
Normal file
@@ -0,0 +1,29 @@
|
||||
[env:dreamcatcher] ; 2301, latest revision
|
||||
extends = esp32s3_base
|
||||
board = esp32s3box
|
||||
board_build.partitions = default_16MB.csv
|
||||
board_level = extra
|
||||
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D PRIVATE_HW
|
||||
-D OTHERNET_DC_REV=2301
|
||||
-I variants/esp32s3/dreamcatcher
|
||||
-D ARDUINO_USB_CDC_ON_BOOT=1
|
||||
|
||||
lib_deps = ${esp32s3_base.lib_deps}
|
||||
earlephilhower/ESP8266Audio@^1.9.9
|
||||
earlephilhower/ESP8266SAM@^1.0.1
|
||||
|
||||
[env:dreamcatcher-2206]
|
||||
extends = esp32s3_base
|
||||
board = esp32s3box
|
||||
board_build.partitions = default_16MB.csv
|
||||
board_level = extra
|
||||
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D PRIVATE_HW
|
||||
-D OTHERNET_DC_REV=2206
|
||||
-I variants/esp32s3/dreamcatcher
|
||||
-D ARDUINO_USB_CDC_ON_BOOT=1
|
||||
17
variants/esp32s3/dreamcatcher/rfswitch.h
Normal file
17
variants/esp32s3/dreamcatcher/rfswitch.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "RadioLib.h"
|
||||
|
||||
// RF Switch Matrix SubG RFO_HP_LF / RFO_LP_LF / RFI_[NP]_LF0
|
||||
// DIO5 -> RFSW0_V1
|
||||
// DIO6 -> RFSW1_V2
|
||||
// DIO7 -> ANT_CTRL_ON + ESP_IO9/LR_GPS_ANT_DC_EN -> RFI_GPS (Bias-T GPS)
|
||||
|
||||
static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_LR11X0_DIO7, RADIOLIB_NC,
|
||||
RADIOLIB_NC};
|
||||
|
||||
static const Module::RfSwitchMode_t rfswitch_table[] = {
|
||||
// mode DIO5 DIO6 DIO7
|
||||
{LR11x0::MODE_STBY, {LOW, LOW, LOW}}, {LR11x0::MODE_RX, {HIGH, LOW, LOW}},
|
||||
{LR11x0::MODE_TX, {LOW, HIGH, LOW}}, {LR11x0::MODE_TX_HP, {LOW, HIGH, LOW}},
|
||||
{LR11x0::MODE_TX_HF, {LOW, LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW, HIGH}},
|
||||
{LR11x0::MODE_WIFI, {LOW, LOW, LOW}}, END_OF_MODE_TABLE,
|
||||
};
|
||||
110
variants/esp32s3/dreamcatcher/variant.h
Normal file
110
variants/esp32s3/dreamcatcher/variant.h
Normal file
@@ -0,0 +1,110 @@
|
||||
#undef I2C_SDA
|
||||
#undef I2C_SCL
|
||||
#define I2C_SDA 16 // I2C pins for this board
|
||||
#define I2C_SCL 17
|
||||
|
||||
#define I2C_SDA1 45
|
||||
#define I2C_SCL1 46
|
||||
|
||||
#define LED_PIN 6
|
||||
#define LED_STATE_ON 1
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define HAS_TPS65233
|
||||
|
||||
// V1 of SubG Switch SMA 0 or F Selector 1
|
||||
// #define RF_SW_SUBG1 8
|
||||
// V2 of SubG Switch SMA 1 or F Selector 0
|
||||
// #define RF_SW_SUBG2 5
|
||||
|
||||
#define RESET_OLED 8 // Emulate RF_SW_SUBG1, Use F Connector
|
||||
#define VTFT_CTRL 5 // Emulate RF_SW_SUBG2, for SMA swap the pin values
|
||||
|
||||
#if OTHERNET_DC_REV == 2206
|
||||
#define USE_LR1120
|
||||
|
||||
#define SPI_MISO 37
|
||||
#define SPI_MOSI 39
|
||||
#define SPI_SCK 38
|
||||
#define SDCARD_CS 40
|
||||
|
||||
#define PIN_BUZZER 48
|
||||
|
||||
// These can either be used for GPS or a serial link. Define through Protobufs
|
||||
// #define GPS_RX_PIN 10
|
||||
// #define GPS_TX_PIN 21
|
||||
|
||||
#define PIN_POWER_EN 7 // RF section power supply enable
|
||||
#define PERIPHERAL_WARMUP_MS 1000 // wait for TPS chip to initialize
|
||||
#define TPS_EXTM 45 // connected, but not used
|
||||
#define BIAS_T_ENABLE 9 // needs to be low
|
||||
#define BIAS_T_VALUE 0
|
||||
#else // 2301
|
||||
#define USE_LR1121
|
||||
#define SPI_MISO 10
|
||||
#define SPI_MOSI 39
|
||||
#define SPI_SCK 38
|
||||
|
||||
#define SDCARD_CS 40
|
||||
|
||||
// This is only informational, we always use SD cards in 1 bit mode
|
||||
#define SPI_DATA1 15
|
||||
#define SPI_DATA2 18
|
||||
|
||||
// These can either be used for GPS or a serial link. Define through Protobufs
|
||||
// #define GPS_RX_PIN 36
|
||||
// #define GPS_TX_PIN 37
|
||||
|
||||
// dac / amp instead of buzzer
|
||||
#define HAS_I2S
|
||||
#define DAC_I2S_BCK 21
|
||||
#define DAC_I2S_WS 9
|
||||
#define DAC_I2S_DOUT 48
|
||||
#define DAC_I2S_MCLK 44
|
||||
|
||||
#define BIAS_T_ENABLE 7 // needs to be low
|
||||
#define BIAS_T_VALUE 0
|
||||
#define BIAS_T_SUBGHZ 2 // also needs to be low, we hijack SENSOR_POWER_CTRL_PIN to emulate this
|
||||
#define SENSOR_POWER_CTRL_PIN BIAS_T_SUBGHZ
|
||||
#define SENSOR_POWER_ON 0
|
||||
#endif
|
||||
|
||||
#define HAS_SDCARD // Have SPI interface SD card slot
|
||||
#define SDCARD_USE_SPI1
|
||||
|
||||
#define LORA_RESET 3
|
||||
#define LORA_SCK 12
|
||||
#define LORA_MISO 13
|
||||
#define LORA_MOSI 11
|
||||
#define LORA_CS 14
|
||||
#define LORA_DIO9 4
|
||||
#define LORA_DIO2 47
|
||||
|
||||
#define LR1120_IRQ_PIN LORA_DIO9
|
||||
#define LR1120_NRESET_PIN LORA_RESET
|
||||
#define LR1120_BUSY_PIN LORA_DIO2
|
||||
#define LR1120_SPI_NSS_PIN LORA_CS
|
||||
#define LR1120_SPI_SCK_PIN LORA_SCK
|
||||
#define LR1120_SPI_MOSI_PIN LORA_MOSI
|
||||
#define LR1120_SPI_MISO_PIN LORA_MISO
|
||||
|
||||
#define LR1121_IRQ_PIN LORA_DIO9
|
||||
#define LR1121_NRESET_PIN LORA_RESET
|
||||
#define LR1121_BUSY_PIN LORA_DIO2
|
||||
#define LR1121_SPI_NSS_PIN LORA_CS
|
||||
#define LR1121_SPI_SCK_PIN LORA_SCK
|
||||
#define LR1121_SPI_MOSI_PIN LORA_MOSI
|
||||
#define LR1121_SPI_MISO_PIN LORA_MISO
|
||||
|
||||
#define LR11X0_DIO3_TCXO_VOLTAGE 1.8
|
||||
#define LR11X0_DIO_AS_RF_SWITCH
|
||||
|
||||
// This board needs external switching between sub-GHz and 2.4G circuits
|
||||
|
||||
// V1 of RF1 selector SubG 1 or 2.4GHz 0
|
||||
// #define RF_SW_SMA1 42
|
||||
// V2 of RF1 Selector SubG 0 or 2.4GHz 1
|
||||
// #define RF_SW_SMA2 41
|
||||
|
||||
#define LR11X0_RF_SWITCH_SUBGHZ 42
|
||||
#define LR11X0_RF_SWITCH_2_4GHZ 41
|
||||
58
variants/esp32s3/elecrow_panel/pins_arduino.h
Normal file
58
variants/esp32s3/elecrow_panel/pins_arduino.h
Normal file
@@ -0,0 +1,58 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
static const uint8_t SDA = 15;
|
||||
static const uint8_t SCL = 16;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t SS = -1;
|
||||
static const uint8_t MOSI = 48;
|
||||
static const uint8_t MISO = 47;
|
||||
static const uint8_t SCK = 41;
|
||||
|
||||
static const uint8_t SPI_MOSI = 6;
|
||||
static const uint8_t SPI_SCK = 5;
|
||||
static const uint8_t SPI_MISO = 4;
|
||||
|
||||
static const uint8_t A0 = 1;
|
||||
static const uint8_t A1 = 2;
|
||||
static const uint8_t A2 = 3;
|
||||
static const uint8_t A3 = 4;
|
||||
static const uint8_t A4 = 5;
|
||||
static const uint8_t A5 = 6;
|
||||
static const uint8_t A6 = 7;
|
||||
static const uint8_t A7 = 8;
|
||||
static const uint8_t A8 = 9;
|
||||
static const uint8_t A9 = 10;
|
||||
static const uint8_t A10 = 11;
|
||||
static const uint8_t A11 = 12;
|
||||
static const uint8_t A12 = 13;
|
||||
static const uint8_t A13 = 14;
|
||||
static const uint8_t A14 = 15;
|
||||
static const uint8_t A15 = 16;
|
||||
static const uint8_t A16 = 17;
|
||||
static const uint8_t A17 = 18;
|
||||
static const uint8_t A18 = 19;
|
||||
static const uint8_t A19 = 20;
|
||||
|
||||
static const uint8_t T1 = 1;
|
||||
static const uint8_t T2 = 2;
|
||||
static const uint8_t T3 = 3;
|
||||
static const uint8_t T4 = 4;
|
||||
static const uint8_t T5 = 5;
|
||||
static const uint8_t T6 = 6;
|
||||
static const uint8_t T7 = 7;
|
||||
static const uint8_t T8 = 8;
|
||||
static const uint8_t T9 = 9;
|
||||
static const uint8_t T10 = 10;
|
||||
static const uint8_t T11 = 11;
|
||||
static const uint8_t T12 = 12;
|
||||
static const uint8_t T13 = 13;
|
||||
static const uint8_t T14 = 14;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
132
variants/esp32s3/elecrow_panel/platformio.ini
Normal file
132
variants/esp32s3/elecrow_panel/platformio.ini
Normal file
@@ -0,0 +1,132 @@
|
||||
[crowpanel_base]
|
||||
extends = esp32s3_base
|
||||
board = crowpanel
|
||||
board_check = true
|
||||
upload_protocol = esptool
|
||||
board_build.partitions = default_16MB.csv ; must be here for some reason, board.json is not enough !?
|
||||
build_flags = ${esp32s3_base.build_flags} -Os
|
||||
-I variants/esp32s3/elecrow_panel
|
||||
-D ELECROW_PANEL
|
||||
-D CONFIG_ARDUHAL_LOG_COLORS
|
||||
-D RADIOLIB_DEBUG_SPI=0
|
||||
-D RADIOLIB_DEBUG_PROTOCOL=0
|
||||
-D RADIOLIB_DEBUG_BASIC=0
|
||||
-D RADIOLIB_VERBOSE_ASSERT=0
|
||||
-D RADIOLIB_SPI_PARANOID=0
|
||||
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
|
||||
-D MESHTASTIC_EXCLUDE_INPUTBROKER=1
|
||||
-D MESHTASTIC_EXCLUDE_WEBSERVER=1
|
||||
-D MESHTASTIC_EXCLUDE_SERIAL=1
|
||||
-D MESHTASTIC_EXCLUDE_SOCKETAPI=1
|
||||
-D MESHTASTIC_EXCLUDE_SCREEN=1
|
||||
-D MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1
|
||||
-D HAS_TELEMETRY=0
|
||||
-D CONFIG_DISABLE_HAL_LOCKS=1
|
||||
-D USE_PIN_BUZZER
|
||||
-D HAS_SCREEN=0
|
||||
-D HAS_TFT=1
|
||||
-D RAM_SIZE=6144
|
||||
-D LV_LVGL_H_INCLUDE_SIMPLE
|
||||
-D LV_CONF_INCLUDE_SIMPLE
|
||||
-D LV_COMP_CONF_INCLUDE_SIMPLE
|
||||
-D LV_USE_SYSMON=0
|
||||
-D LV_USE_PROFILER=0
|
||||
-D LV_USE_PERF_MONITOR=0
|
||||
-D LV_USE_MEM_MONITOR=0
|
||||
-D LV_USE_LOG=0
|
||||
-D LV_BUILD_TEST=0
|
||||
-D USE_LOG_DEBUG
|
||||
-D LOG_DEBUG_INC=\"DebugConfiguration.h\"
|
||||
-D USE_PACKET_API
|
||||
-D HAS_SDCARD
|
||||
-D SD_SPI_FREQUENCY=75000000
|
||||
|
||||
lib_deps = ${esp32s3_base.lib_deps}
|
||||
${device-ui_base.lib_deps}
|
||||
earlephilhower/ESP8266Audio@1.9.9
|
||||
earlephilhower/ESP8266SAM@1.0.1
|
||||
lovyan03/LovyanGFX@1.2.0 ; note: v1.2.7 breaks the elecrow 7" display functionality
|
||||
hideakitai/TCA9534@0.1.1
|
||||
|
||||
[crowpanel_small_esp32s3_base] ; 2.4, 2.8, 3.5 inch
|
||||
extends = crowpanel_base
|
||||
build_flags =
|
||||
${crowpanel_base.build_flags}
|
||||
-D CROW_SELECT=1
|
||||
-D SDCARD_USE_SOFT_SPI
|
||||
-D SDCARD_CS=7
|
||||
-D SPI_DRIVER_SELECT=2
|
||||
-D LGFX_DRIVER_TEMPLATE
|
||||
-D LGFX_DRIVER=LGFX_GENERIC
|
||||
-D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_GENERIC.h\"
|
||||
-D VIEW_320x240
|
||||
-D MAP_FULL_REDRAW
|
||||
|
||||
[crowpanel_large_esp32s3_base] ; 4.3, 5.0, 7.0 inch
|
||||
extends = crowpanel_base
|
||||
build_flags =
|
||||
${crowpanel_base.build_flags}
|
||||
-D CROW_SELECT=2
|
||||
-D SDCARD_CS=7
|
||||
-D LGFX_DRIVER=LGFX_ELECROW70
|
||||
-D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_ELECROW70.h\"
|
||||
-D DISPLAY_SET_RESOLUTION
|
||||
|
||||
[env:elecrow-adv-24-28-tft]
|
||||
extends = crowpanel_small_esp32s3_base
|
||||
build_flags =
|
||||
${crowpanel_small_esp32s3_base.build_flags}
|
||||
-D SPI_FREQUENCY=80000000
|
||||
-D LGFX_SCREEN_WIDTH=240
|
||||
-D LGFX_SCREEN_HEIGHT=320
|
||||
-D DISPLAY_SIZE=320x240 ; landscape mode
|
||||
-D LGFX_PANEL=ST7789
|
||||
-D LGFX_ROTATION=1
|
||||
-D LGFX_CFG_HOST=SPI2_HOST
|
||||
-D LGFX_PIN_SCK=42
|
||||
-D LGFX_PIN_MOSI=39
|
||||
-D LGFX_PIN_DC=41
|
||||
-D LGFX_PIN_CS=40
|
||||
-D LGFX_PIN_BL=38
|
||||
-D LGFX_TOUCH=FT5x06
|
||||
-D LGFX_TOUCH_I2C_ADDR=0x38
|
||||
-D LGFX_TOUCH_I2C_SDA=15
|
||||
-D LGFX_TOUCH_I2C_SCL=16
|
||||
-D LGFX_TOUCH_INT=47
|
||||
-D LGFX_TOUCH_RST=48
|
||||
-D LGFX_TOUCH_ROTATION=0
|
||||
|
||||
[env:elecrow-adv-35-tft]
|
||||
extends = crowpanel_small_esp32s3_base
|
||||
board_level = pr
|
||||
build_flags =
|
||||
${crowpanel_small_esp32s3_base.build_flags}
|
||||
-D LV_CACHE_DEF_SIZE=2097152
|
||||
-D SPI_FREQUENCY=60000000
|
||||
-D LGFX_SCREEN_WIDTH=320
|
||||
-D LGFX_SCREEN_HEIGHT=480
|
||||
-D DISPLAY_SIZE=320x480 ; portrait mode
|
||||
-D LGFX_PANEL=ILI9488
|
||||
-D LGFX_ROTATION=0
|
||||
-D LGFX_CFG_HOST=SPI2_HOST
|
||||
-D LGFX_PIN_SCK=42
|
||||
-D LGFX_PIN_MOSI=39
|
||||
-D LGFX_PIN_DC=41
|
||||
-D LGFX_PIN_CS=40
|
||||
-D LGFX_PIN_BL=38
|
||||
-D LGFX_TOUCH=GT911
|
||||
-D LGFX_TOUCH_I2C_ADDR=0x5D
|
||||
-D LGFX_TOUCH_I2C_SDA=15
|
||||
-D LGFX_TOUCH_I2C_SCL=16
|
||||
-D LGFX_TOUCH_INT=47
|
||||
-D LGFX_TOUCH_RST=48
|
||||
-D LGFX_TOUCH_ROTATION=0
|
||||
-D DISPLAY_SET_RESOLUTION
|
||||
|
||||
; 4.3, 5.0, 7.0 inch 800x480 IPS (V1)
|
||||
[env:elecrow-adv1-43-50-70-tft]
|
||||
extends = crowpanel_large_esp32s3_base
|
||||
build_flags =
|
||||
${crowpanel_large_esp32s3_base.build_flags}
|
||||
-D VIEW_320x240
|
||||
-D DISPLAY_SIZE=800x480 ; landscape mode
|
||||
90
variants/esp32s3/elecrow_panel/variant.h
Normal file
90
variants/esp32s3/elecrow_panel/variant.h
Normal file
@@ -0,0 +1,90 @@
|
||||
#define I2C_SDA 15
|
||||
#define I2C_SCL 16
|
||||
|
||||
#if CROW_SELECT == 1
|
||||
#define WAKE_ON_TOUCH
|
||||
#define SCREEN_TOUCH_INT 47
|
||||
#define USE_POWERSAVE
|
||||
#define SLEEP_TIME 180
|
||||
#endif
|
||||
|
||||
#if CROW_SELECT == 1
|
||||
// dac / amp
|
||||
// #define HAS_I2S // didn't get I2S sound working
|
||||
#define PIN_BUZZER 8 // using pwm buzzer instead (nobody will notice, lol)
|
||||
#define DAC_I2S_BCK 13
|
||||
#define DAC_I2S_WS 11
|
||||
#define DAC_I2S_DOUT 12
|
||||
#define DAC_I2S_MCLK 8 // don't use GPIO0 because it's assigned to LoRa or button
|
||||
#else
|
||||
#define PIN_BUZZER 8
|
||||
#endif
|
||||
|
||||
// GPS via UART1 connector
|
||||
#define GPS_DEFAULT_NOT_PRESENT 1
|
||||
#define HAS_GPS 1
|
||||
#if CROW_SELECT == 1
|
||||
#define GPS_RX_PIN 18
|
||||
#define GPS_TX_PIN 17
|
||||
#else
|
||||
// GPIOs shared with LoRa or MIC module
|
||||
#define GPS_RX_PIN 19
|
||||
#define GPS_TX_PIN 20
|
||||
#endif
|
||||
|
||||
// Extension Slot Layout, viewed from above (2.4-3.5)
|
||||
// DIO1/IO1 o o IO2/NRESET
|
||||
// SCK/IO10 o o IO16/NC
|
||||
// MISO/IO9 o o IO15/NC
|
||||
// MOSI/IO3 o o NC/DIO2
|
||||
// 3V3 o o IO46/BUSY
|
||||
// GND o o IO0/NSS
|
||||
// 5V/NC o o NC/DIO3
|
||||
// J9 J8
|
||||
|
||||
// Extension Slot Layout, viewed from above (4.3-7.0)
|
||||
// !! DIO1/IO20 o o IO19/NRESET !!
|
||||
// !! SCK/IO5 o o IO16/NC
|
||||
// !! MISO/IO4 o o IO15/NC
|
||||
// !! MOSI/IO6 o o NC/DIO2
|
||||
// 3V3 o o IO2/BUSY !!
|
||||
// GND o o IO0/NSS
|
||||
// 5V/NC o o NC/DIO3
|
||||
// J9 J8
|
||||
|
||||
// LoRa
|
||||
#define USE_SX1262
|
||||
|
||||
#if CROW_SELECT == 1
|
||||
// 2.4", 2.8, 3.5"""
|
||||
#define HW_SPI1_DEVICE
|
||||
#define LORA_CS 0
|
||||
#define LORA_SCK 10
|
||||
#define LORA_MISO 9
|
||||
#define LORA_MOSI 3
|
||||
|
||||
#define LORA_RESET 2
|
||||
#define LORA_DIO1 1 // SX1262 IRQ
|
||||
#define LORA_DIO2 46 // SX1262 BUSY
|
||||
|
||||
// need to pull IO45 low to enable LORA and disable Microphone on 24 28 35
|
||||
#define SENSOR_POWER_CTRL_PIN 45
|
||||
#define SENSOR_POWER_ON LOW
|
||||
#else
|
||||
// 4.3", 5.0", 7.0"
|
||||
#define LORA_CS 0
|
||||
#define LORA_SCK 5
|
||||
#define LORA_MISO 4
|
||||
#define LORA_MOSI 6
|
||||
|
||||
#define LORA_RESET 19
|
||||
#define LORA_DIO1 20 // SX1262 IRQ
|
||||
#define LORA_DIO2 2 // SX1262 BUSY
|
||||
#endif
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 3.3
|
||||
28
variants/esp32s3/esp32-s3-pico/pins_arduino.h
Normal file
28
variants/esp32s3/esp32-s3-pico/pins_arduino.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#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 = 15;
|
||||
static const uint8_t SCL = 16;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t MISO = 37;
|
||||
static const uint8_t SCK = 35;
|
||||
static const uint8_t MOSI = 36;
|
||||
static const uint8_t SS = 14;
|
||||
|
||||
static const uint8_t BAT_ADC_PIN = 26;
|
||||
|
||||
// #define SPI_MOSI (11)
|
||||
// #define SPI_SCK (14)
|
||||
// #define SPI_MISO (2)
|
||||
// #define SPI_CS (13)
|
||||
|
||||
// #define SDCARD_CS SPI_CS
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
26
variants/esp32s3/esp32-s3-pico/platformio.ini
Normal file
26
variants/esp32s3/esp32-s3-pico/platformio.ini
Normal file
@@ -0,0 +1,26 @@
|
||||
[env:ESP32-S3-Pico]
|
||||
|
||||
board_level = extra
|
||||
extends = esp32s3_base
|
||||
upload_protocol = esptool
|
||||
board = esp32-s3-pico
|
||||
board_build.partitions = default_16MB.csv
|
||||
|
||||
board_upload.use_1200bps_touch = yes
|
||||
board_upload.wait_for_upload_port = yes
|
||||
board_upload.require_upload_port = yes
|
||||
|
||||
;upload_port = /dev/ttyACM0
|
||||
|
||||
build_flags = ${esp32s3_base.build_flags}
|
||||
-DESP32_S3_PICO
|
||||
;-DPRIVATE_HW
|
||||
-Ivariants/esp32s3/esp32-s3-pico
|
||||
-DBOARD_HAS_PSRAM
|
||||
-DEINK_DISPLAY_MODEL=GxEPD2_290_T94_V2
|
||||
-DEINK_WIDTH=296
|
||||
-DEINK_HEIGHT=128
|
||||
|
||||
lib_deps = ${esp32s3_base.lib_deps}
|
||||
zinggjm/GxEPD2@^1.6.2
|
||||
adafruit/Adafruit NeoPixel @ ^1.12.0
|
||||
81
variants/esp32s3/esp32-s3-pico/variant.h
Normal file
81
variants/esp32s3/esp32-s3-pico/variant.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
|
||||
*/
|
||||
#define HAS_GPS 0
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
|
||||
#define EXT_NOTIFY_OUT 22
|
||||
#define BUTTON_PIN 0 // 17
|
||||
|
||||
// #define LED_PIN PIN_LED
|
||||
// Board has RGB LED 21
|
||||
#define HAS_NEOPIXEL // Enable the use of neopixels
|
||||
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
|
||||
#define NEOPIXEL_DATA 21 // gpio pin used to send data to the neopixels
|
||||
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
|
||||
|
||||
// The usbPower state is revered ?
|
||||
// DEBUG | ??:??:?? 365 [Power] Battery: usbPower=0, isCharging=0, batMv=4116, batPct=90
|
||||
// DEBUG | ??:??:?? 385 [Power] Battery: usbPower=1, isCharging=1, batMv=4243, batPct=0
|
||||
|
||||
// https://www.waveshare.com/img/devkit/ESP32-S3-Pico/ESP32-S3-Pico-details-inter-1.jpg
|
||||
// digram is incorrect labeled as battery pin is getting readings on GPIO7_CH1?
|
||||
#define BATTERY_PIN 7
|
||||
#define ADC_CHANNEL ADC1_GPIO7_CHANNEL
|
||||
// #define ADC_CHANNEL ADC1_GPIO6_CHANNEL
|
||||
// ratio of voltage divider = 3.0 (R17=200k, R18=100k)
|
||||
#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic
|
||||
|
||||
#define I2C_SDA 15
|
||||
#define I2C_SCL 16
|
||||
|
||||
// Enable secondary bus for external periherals
|
||||
// https://www.waveshare.com/wiki/Pico-OLED-1.3
|
||||
// #define USE_SH1107_128_64
|
||||
// Not working
|
||||
#define I2C_SDA1 17
|
||||
#define I2C_SCL1 18
|
||||
|
||||
#define BUTTON_PIN 0 // This is the BOOT button
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
// #define USE_RF95 // RFM95/SX127x
|
||||
#define USE_SX1262
|
||||
// #define USE_SX1280
|
||||
|
||||
#define LORA_MISO 37
|
||||
#define LORA_SCK 35
|
||||
#define LORA_MOSI 36
|
||||
#define LORA_CS 14
|
||||
|
||||
#define LORA_RESET 40
|
||||
#define LORA_DIO1 4
|
||||
#define LORA_DIO2 13
|
||||
|
||||
#ifdef USE_SX1262
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
#endif
|
||||
|
||||
#ifdef USE_SX1280
|
||||
#define SX128X_CS LORA_CS
|
||||
#define SX128X_DIO1 LORA_DIO1
|
||||
#define SX128X_BUSY 9
|
||||
#define SX128X_RESET LORA_RESET
|
||||
#endif
|
||||
|
||||
#define USE_EINK
|
||||
/*
|
||||
* eink display pins
|
||||
*/
|
||||
#define PIN_EINK_CS 34
|
||||
#define PIN_EINK_BUSY 38
|
||||
#define PIN_EINK_DC 33
|
||||
#define PIN_EINK_RES 42 // 37 //(-1) // cant be MISO Waveshare ??)
|
||||
#define PIN_EINK_SCLK 35
|
||||
#define PIN_EINK_MOSI 36
|
||||
10
variants/esp32s3/heltec_capsule_sensor_v3/platformio.ini
Normal file
10
variants/esp32s3/heltec_capsule_sensor_v3/platformio.ini
Normal file
@@ -0,0 +1,10 @@
|
||||
[env:heltec_capsule_sensor_v3]
|
||||
extends = esp32s3_base
|
||||
board = heltec_wifi_lora_32_V3
|
||||
board_check = true
|
||||
board_build.partitions = default_8MB.csv
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags} -I variants/esp32s3/heltec_capsule_sensor_v3
|
||||
-D HELTEC_CAPSULE_SENSOR_V3
|
||||
-D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output
|
||||
55
variants/esp32s3/heltec_capsule_sensor_v3/variant.h
Normal file
55
variants/esp32s3/heltec_capsule_sensor_v3/variant.h
Normal file
@@ -0,0 +1,55 @@
|
||||
#define LED_PIN 33
|
||||
#define LED_PIN2 34
|
||||
#define EXT_PWR_DETECT 35
|
||||
|
||||
#define BUTTON_PIN 18
|
||||
#define BUTTON_ACTIVE_LOW false
|
||||
#define BUTTON_ACTIVE_PULLUP false
|
||||
|
||||
#define BATTERY_PIN 7 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO7_CHANNEL
|
||||
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider
|
||||
#define ADC_MULTIPLIER (4.9 * 1.045)
|
||||
#define ADC_CTRL 36 // active HIGH, powers the voltage divider. Only on 1.1
|
||||
#define ADC_CTRL_ENABLED HIGH
|
||||
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#define GPS_RX_PIN 5
|
||||
#define GPS_TX_PIN 4
|
||||
#define PIN_GPS_RESET 3
|
||||
#define GPS_RESET_MODE LOW
|
||||
#define PIN_GPS_PPS 1
|
||||
#define PIN_GPS_EN 21
|
||||
#define GPS_EN_ACTIVE HIGH
|
||||
|
||||
#define USE_SX1262
|
||||
#define LORA_DIO0 -1 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 12
|
||||
#define LORA_DIO1 14 // SX1262 IRQ
|
||||
#define LORA_DIO2 13 // SX1262 BUSY
|
||||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
||||
|
||||
#define LORA_SCK 9
|
||||
#define LORA_MISO 11
|
||||
#define LORA_MOSI 10
|
||||
#define LORA_CS 8
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
|
||||
#define I2C_SDA 1
|
||||
#define I2C_SCL 2
|
||||
#define HAS_SCREEN 0
|
||||
#define SENSOR_POWER_CTRL_PIN 21
|
||||
#define SENSOR_POWER_ON 1
|
||||
|
||||
#define PERIPHERAL_WARMUP_MS 100
|
||||
#define SENSOR_GPS_CONFLICT
|
||||
|
||||
#define ESP32S3_WAKE_TYPE ESP_EXT1_WAKEUP_ANY_HIGH
|
||||
12
variants/esp32s3/heltec_sensor_hub/platformio.ini
Normal file
12
variants/esp32s3/heltec_sensor_hub/platformio.ini
Normal file
@@ -0,0 +1,12 @@
|
||||
[env:heltec_sensor_hub]
|
||||
extends = esp32s3_base
|
||||
board = heltec_wifi_lora_32_V3
|
||||
board_check = true
|
||||
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-I variants/esp32s3/heltec_sensor_hub
|
||||
-D HELTEC_SENSOR_HUB
|
||||
|
||||
lib_deps = ${esp32s3_base.lib_deps}
|
||||
adafruit/Adafruit NeoPixel @ ^1.12.0
|
||||
48
variants/esp32s3/heltec_sensor_hub/variant.h
Normal file
48
variants/esp32s3/heltec_sensor_hub/variant.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#define EXT_PWR_DETECT 20
|
||||
|
||||
#define BUTTON_PIN 17
|
||||
#define BUTTON_ACTIVE_LOW false
|
||||
#define BUTTON_ACTIVE_PULLUP false
|
||||
|
||||
#define BATTERY_PIN 7 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO7_CHANNEL
|
||||
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider
|
||||
#define ADC_MULTIPLIER (4.9 * 1.045)
|
||||
#define ADC_CTRL 34 // active HIGH, powers the voltage divider. Only on 1.1
|
||||
#define ADC_CTRL_ENABLED HIGH
|
||||
|
||||
#define HAS_NEOPIXEL // Enable the use of neopixels
|
||||
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
|
||||
#define NEOPIXEL_DATA 18 // gpio pin used to send data to the neopixels
|
||||
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
|
||||
|
||||
#define USE_SX1262
|
||||
#define LORA_DIO0 RADIOLIB_NC
|
||||
#define LORA_RESET 12
|
||||
#define LORA_DIO1 14 // SX1262 IRQ
|
||||
#define LORA_DIO2 13 // SX1262 BUSY
|
||||
|
||||
#define LORA_SCK 9
|
||||
#define LORA_MISO 11
|
||||
#define LORA_MOSI 10
|
||||
#define LORA_CS 8
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
|
||||
#define I2C_SDA 1
|
||||
#define I2C_SCL 2
|
||||
#define HAS_SCREEN 0
|
||||
#define SENSOR_POWER_CTRL_PIN 33
|
||||
#define SENSOR_POWER_ON 1
|
||||
|
||||
#define PERIPHERAL_WARMUP_MS 100
|
||||
|
||||
#define ESP32S3_WAKE_TYPE ESP_EXT1_WAKEUP_ANY_HIGH
|
||||
|
||||
#define ENVIRONMENTAL_TELEMETRY_MODULE_ENABLE 1
|
||||
11
variants/esp32s3/heltec_v3/platformio.ini
Normal file
11
variants/esp32s3/heltec_v3/platformio.ini
Normal file
@@ -0,0 +1,11 @@
|
||||
[env:heltec-v3]
|
||||
extends = esp32s3_base
|
||||
board = heltec_wifi_lora_32_V3
|
||||
board_level = pr
|
||||
board_check = true
|
||||
board_build.partitions = default_8MB.csv
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D HELTEC_V3
|
||||
-I variants/esp32s3/heltec_v3
|
||||
-D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
42
variants/esp32s3/heltec_v3/variant.h
Normal file
42
variants/esp32s3/heltec_v3/variant.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#define LED_PIN LED
|
||||
|
||||
#define USE_SSD1306 // Heltec_v3 has a SSD1306 display
|
||||
|
||||
#define RESET_OLED RST_OLED
|
||||
#define I2C_SDA SDA_OLED // I2C pins for this board
|
||||
#define I2C_SCL SCL_OLED
|
||||
|
||||
// Enable secondary bus for external periherals
|
||||
#define I2C_SDA1 SDA
|
||||
#define I2C_SCL1 SCL
|
||||
|
||||
#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define ADC_CTRL 37
|
||||
#define ADC_CTRL_ENABLED LOW
|
||||
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO1_CHANNEL
|
||||
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider
|
||||
#define ADC_MULTIPLIER 4.9 * 1.045
|
||||
|
||||
#define USE_SX1262
|
||||
|
||||
#define LORA_DIO0 -1 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 12
|
||||
#define LORA_DIO1 14 // SX1262 IRQ
|
||||
#define LORA_DIO2 13 // SX1262 BUSY
|
||||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
||||
|
||||
#define LORA_SCK 9
|
||||
#define LORA_MISO 11
|
||||
#define LORA_MOSI 10
|
||||
#define LORA_CS 8
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
35
variants/esp32s3/heltec_vision_master_e213/einkDetect.h
Normal file
35
variants/esp32s3/heltec_vision_master_e213/einkDetect.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include "configuration.h"
|
||||
|
||||
enum class EInkDetectionResult : uint8_t {
|
||||
LCMEN213EFC1 = 0, // Initial version
|
||||
E0213A367 = 1, // E213 PCB marked V1.1 (Mid 2025)
|
||||
};
|
||||
|
||||
EInkDetectionResult detectEInk()
|
||||
{
|
||||
// Test 1: Logic of BUSY pin
|
||||
|
||||
// Determines controller IC manufacturer
|
||||
// Fitipower: busy when LOW
|
||||
// Solomon Systech: busy when HIGH
|
||||
|
||||
// Force display BUSY by holding reset pin active
|
||||
pinMode(PIN_EINK_RES, OUTPUT);
|
||||
digitalWrite(PIN_EINK_RES, LOW);
|
||||
|
||||
delay(10);
|
||||
|
||||
// Read whether pin is HIGH or LOW while busy
|
||||
pinMode(PIN_EINK_BUSY, INPUT);
|
||||
bool busyLogic = digitalRead(PIN_EINK_BUSY);
|
||||
|
||||
// Test complete. Release pin
|
||||
pinMode(PIN_EINK_RES, INPUT);
|
||||
|
||||
if (busyLogic == LOW)
|
||||
return EInkDetectionResult::LCMEN213EFC1;
|
||||
else // busy HIGH
|
||||
return EInkDetectionResult::E0213A367;
|
||||
}
|
||||
117
variants/esp32s3/heltec_vision_master_e213/nicheGraphics.h
Normal file
117
variants/esp32s3/heltec_vision_master_e213/nicheGraphics.h
Normal file
@@ -0,0 +1,117 @@
|
||||
#pragma once
|
||||
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
|
||||
|
||||
// InkHUD-specific components
|
||||
// ---------------------------
|
||||
#include "graphics/niche/InkHUD/InkHUD.h"
|
||||
|
||||
// Applets
|
||||
#include "graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/DM/DMApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h"
|
||||
|
||||
// Shared NicheGraphics components
|
||||
// --------------------------------
|
||||
#include "graphics/niche/Drivers/EInk/E0213A367.h"
|
||||
#include "graphics/niche/Drivers/EInk/LCMEN2R13EFC1.h"
|
||||
#include "graphics/niche/Inputs/TwoButton.h"
|
||||
|
||||
#include "buzz.h" // Button feedback
|
||||
#include "einkDetect.h" // Detect display model at runtime
|
||||
|
||||
void setupNicheGraphics()
|
||||
{
|
||||
using namespace NicheGraphics;
|
||||
|
||||
// Detect E-Ink Model
|
||||
// -------------------
|
||||
|
||||
EInkDetectionResult displayModel = detectEInk();
|
||||
|
||||
// SPI
|
||||
// -----------------------------
|
||||
|
||||
// Display is connected to HSPI
|
||||
SPIClass *hspi = new SPIClass(HSPI);
|
||||
hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS);
|
||||
|
||||
// E-Ink Driver
|
||||
// -----------------------------
|
||||
|
||||
Drivers::EInk *driver;
|
||||
|
||||
if (displayModel == EInkDetectionResult::LCMEN213EFC1) // V1 (unmarked)
|
||||
driver = new Drivers::LCMEN213EFC1;
|
||||
else if (displayModel == EInkDetectionResult::E0213A367) // V1.1
|
||||
driver = new Drivers::E0213A367;
|
||||
|
||||
driver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);
|
||||
|
||||
// InkHUD
|
||||
// ----------------------------
|
||||
|
||||
InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();
|
||||
|
||||
// Set the E-Ink driver
|
||||
inkhud->setDriver(driver);
|
||||
|
||||
// Set how many FAST updates per FULL update
|
||||
// Set how unhealthy additional FAST updates beyond this number are
|
||||
|
||||
if (displayModel == EInkDetectionResult::LCMEN213EFC1) // V1 (unmarked)
|
||||
inkhud->setDisplayResilience(10, 1.5);
|
||||
else if (displayModel == EInkDetectionResult::E0213A367) // V1.1
|
||||
inkhud->setDisplayResilience(15, 3);
|
||||
|
||||
// Select fonts
|
||||
InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;
|
||||
InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;
|
||||
InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;
|
||||
|
||||
// Customize default settings
|
||||
inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle?
|
||||
inkhud->persistence->settings.rotation = 3; // 270 degrees clockwise
|
||||
inkhud->persistence->settings.userTiles.count = 1; // One tile only by default, keep things simple for new users
|
||||
inkhud->persistence->settings.optionalMenuItems.nextTile = false; // Behavior handled by aux button instead
|
||||
|
||||
// Pick applets
|
||||
// Note: order of applets determines priority of "auto-show" feature
|
||||
inkhud->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown
|
||||
inkhud->addApplet("DMs", new InkHUD::DMApplet); // -
|
||||
inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); // -
|
||||
inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); // -
|
||||
inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated
|
||||
inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); // -
|
||||
inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0
|
||||
|
||||
// Start running InkHUD
|
||||
inkhud->begin();
|
||||
|
||||
// Buttons
|
||||
// --------------------------
|
||||
|
||||
Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component
|
||||
|
||||
// #0: Main User Button
|
||||
buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin());
|
||||
buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });
|
||||
buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });
|
||||
|
||||
// #1: Aux Button
|
||||
buttons->setWiring(1, PIN_BUTTON2);
|
||||
buttons->setHandlerShortPress(1, [inkhud]() {
|
||||
inkhud->nextTile();
|
||||
playChirp();
|
||||
});
|
||||
|
||||
// Begin handling button events
|
||||
buttons->start();
|
||||
}
|
||||
|
||||
#endif
|
||||
61
variants/esp32s3/heltec_vision_master_e213/pins_arduino.h
Normal file
61
variants/esp32s3/heltec_vision_master_e213/pins_arduino.h
Normal file
@@ -0,0 +1,61 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static const uint8_t LED_BUILTIN = 45; // LED is not populated on earliest board variant
|
||||
#define BUILTIN_LED LED_BUILTIN // Backward compatibility
|
||||
#define LED_BUILTIN LED_BUILTIN
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
static const uint8_t SDA = 39;
|
||||
static const uint8_t SCL = 38;
|
||||
|
||||
static const uint8_t SS = 8;
|
||||
static const uint8_t MOSI = 10;
|
||||
static const uint8_t MISO = 11;
|
||||
static const uint8_t SCK = 9;
|
||||
|
||||
static const uint8_t A0 = 1;
|
||||
static const uint8_t A1 = 2;
|
||||
static const uint8_t A2 = 3;
|
||||
static const uint8_t A3 = 4;
|
||||
static const uint8_t A4 = 5;
|
||||
static const uint8_t A5 = 6;
|
||||
static const uint8_t A6 = 7;
|
||||
static const uint8_t A7 = 8;
|
||||
static const uint8_t A8 = 9;
|
||||
static const uint8_t A9 = 10;
|
||||
static const uint8_t A10 = 11;
|
||||
static const uint8_t A11 = 12;
|
||||
static const uint8_t A12 = 13;
|
||||
static const uint8_t A13 = 14;
|
||||
static const uint8_t A14 = 15;
|
||||
static const uint8_t A15 = 16;
|
||||
static const uint8_t A16 = 17;
|
||||
static const uint8_t A17 = 18;
|
||||
static const uint8_t A18 = 19;
|
||||
static const uint8_t A19 = 20;
|
||||
|
||||
static const uint8_t T1 = 1;
|
||||
static const uint8_t T2 = 2;
|
||||
static const uint8_t T3 = 3;
|
||||
static const uint8_t T4 = 4;
|
||||
static const uint8_t T5 = 5;
|
||||
static const uint8_t T6 = 6;
|
||||
static const uint8_t T7 = 7;
|
||||
static const uint8_t T8 = 8;
|
||||
static const uint8_t T9 = 9;
|
||||
static const uint8_t T10 = 10;
|
||||
static const uint8_t T11 = 11;
|
||||
static const uint8_t T12 = 12;
|
||||
static const uint8_t T13 = 13;
|
||||
static const uint8_t T14 = 14;
|
||||
|
||||
static const uint8_t RST_LoRa = 12;
|
||||
static const uint8_t BUSY_LoRa = 13;
|
||||
static const uint8_t DIO1 = 14;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
40
variants/esp32s3/heltec_vision_master_e213/platformio.ini
Normal file
40
variants/esp32s3/heltec_vision_master_e213/platformio.ini
Normal file
@@ -0,0 +1,40 @@
|
||||
[env:heltec-vision-master-e213]
|
||||
extends = esp32s3_base
|
||||
board = heltec_vision_master_e213
|
||||
board_build.partitions = default_8MB.csv
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-Ivariants/esp32s3/heltec_vision_master_e213
|
||||
-DHELTEC_VISION_MASTER_E213
|
||||
-DUSE_EINK
|
||||
-DGXEPD2_DRIVER_0=GxEPD2_213_FC1
|
||||
-DGXEPD2_DRIVER_1=GxEPD2_213_E0213A367
|
||||
-DEINK_WIDTH=250
|
||||
-DEINK_HEIGHT=122
|
||||
-DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
||||
-DEINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted
|
||||
-DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
|
||||
-DEINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting"
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip
|
||||
lewisxhe/PCF8563_Library@^1.0.1
|
||||
upload_speed = 115200
|
||||
|
||||
[env:heltec-vision-master-e213-inkhud]
|
||||
extends = esp32s3_base, inkhud
|
||||
board = heltec_vision_master_e213
|
||||
board_level = pr
|
||||
board_build.partitions = default_8MB.csv
|
||||
build_src_filter =
|
||||
${esp32_base.build_src_filter}
|
||||
${inkhud.build_src_filter}
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
${inkhud.build_flags}
|
||||
-I variants/esp32s3/heltec_vision_master_e213
|
||||
-D HELTEC_VISION_MASTER_E213
|
||||
lib_deps =
|
||||
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
|
||||
${esp32s3_base.lib_deps}
|
||||
upload_speed = 921600
|
||||
54
variants/esp32s3/heltec_vision_master_e213/variant.h
Normal file
54
variants/esp32s3/heltec_vision_master_e213/variant.h
Normal file
@@ -0,0 +1,54 @@
|
||||
#define LED_PIN 45 // LED is not populated on earliest board variant
|
||||
#define BUTTON_PIN 0
|
||||
#define PIN_BUTTON2 21 // Second built-in button
|
||||
#define ALT_BUTTON_PIN PIN_BUTTON2 // Send the up event
|
||||
|
||||
// I2C
|
||||
#define I2C_SDA SDA
|
||||
#define I2C_SCL SCL
|
||||
|
||||
// Display (E-Ink)
|
||||
#define PIN_EINK_CS 5
|
||||
#define PIN_EINK_BUSY 1
|
||||
#define PIN_EINK_DC 2
|
||||
#define PIN_EINK_RES 3
|
||||
#define PIN_EINK_SCLK 4
|
||||
#define PIN_EINK_MOSI 6
|
||||
|
||||
// SPI
|
||||
#define SPI_INTERFACES_COUNT 2
|
||||
#define PIN_SPI_MISO 11
|
||||
#define PIN_SPI_MOSI 10
|
||||
#define PIN_SPI_SCK 9
|
||||
|
||||
// Power
|
||||
#define VEXT_ENABLE 18 // Powers the E-Ink display, and the 3.3V supply to the I2C QuickLink connector
|
||||
#define PERIPHERAL_WARMUP_MS 1000 // Make sure I2C QuickLink has stable power before continuing
|
||||
#define VEXT_ON_VALUE HIGH
|
||||
#define ADC_CTRL 46
|
||||
#define ADC_CTRL_ENABLED HIGH
|
||||
#define BATTERY_PIN 7
|
||||
#define ADC_CHANNEL ADC1_GPIO7_CHANNEL
|
||||
#define ADC_MULTIPLIER 4.9 * 1.03
|
||||
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5
|
||||
|
||||
// LoRa
|
||||
#define USE_SX1262
|
||||
|
||||
#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module
|
||||
#define LORA_RESET 12
|
||||
#define LORA_DIO1 14 // SX1262 IRQ
|
||||
#define LORA_DIO2 13 // SX1262 BUSY
|
||||
|
||||
#define LORA_SCK 9
|
||||
#define LORA_MISO 11
|
||||
#define LORA_MOSI 10
|
||||
#define LORA_CS 8
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
114
variants/esp32s3/heltec_vision_master_e290/nicheGraphics.h
Normal file
114
variants/esp32s3/heltec_vision_master_e290/nicheGraphics.h
Normal file
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
|
||||
Most of the Meshtastic firmware uses preprocessor macros throughout the code to support different hardware variants.
|
||||
NicheGraphics attempts a different approach:
|
||||
|
||||
Per-device config takes place in this setupNicheGraphics() method
|
||||
(And a small amount in platformio.ini)
|
||||
|
||||
This file sets up InkHUD for Heltec VM-E290.
|
||||
Different NicheGraphics UIs and different hardware variants will each have their own setup procedure.
|
||||
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
|
||||
|
||||
// InkHUD-specific components
|
||||
// ---------------------------
|
||||
#include "graphics/niche/InkHUD/InkHUD.h"
|
||||
|
||||
// Applets
|
||||
#include "graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/DM/DMApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h"
|
||||
|
||||
// Shared NicheGraphics components
|
||||
// --------------------------------
|
||||
#include "graphics/niche/Drivers/EInk/DEPG0290BNS800.h"
|
||||
#include "graphics/niche/Inputs/TwoButton.h"
|
||||
|
||||
// Button feedback
|
||||
#include "buzz.h"
|
||||
|
||||
void setupNicheGraphics()
|
||||
{
|
||||
using namespace NicheGraphics;
|
||||
|
||||
// SPI
|
||||
// -----------------------------
|
||||
|
||||
// Display is connected to HSPI
|
||||
SPIClass *hspi = new SPIClass(HSPI);
|
||||
hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS);
|
||||
|
||||
// E-Ink Driver
|
||||
// -----------------------------
|
||||
|
||||
Drivers::EInk *driver = new Drivers::DEPG0290BNS800;
|
||||
driver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY);
|
||||
|
||||
// InkHUD
|
||||
// ----------------------------
|
||||
|
||||
InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();
|
||||
|
||||
// Set the E-Ink driver
|
||||
inkhud->setDriver(driver);
|
||||
|
||||
// Set how many FAST updates per FULL update
|
||||
// Set how unhealthy additional FAST updates beyond this number are
|
||||
inkhud->setDisplayResilience(7, 1.5);
|
||||
|
||||
// Select fonts
|
||||
InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;
|
||||
InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;
|
||||
InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;
|
||||
|
||||
// Customize default settings
|
||||
inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle?
|
||||
inkhud->persistence->settings.rotation = 1; // 90 degrees clockwise
|
||||
inkhud->persistence->settings.userTiles.count = 1; // One tile only by default, keep things simple for new users
|
||||
inkhud->persistence->settings.optionalMenuItems.nextTile = false; // Behavior handled by aux button instead
|
||||
|
||||
// Pick applets
|
||||
// Note: order of applets determines priority of "auto-show" feature
|
||||
inkhud->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown
|
||||
inkhud->addApplet("DMs", new InkHUD::DMApplet); // -
|
||||
inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); // -
|
||||
inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); // -
|
||||
inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated
|
||||
inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); // -
|
||||
inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0
|
||||
|
||||
// Start running InkHUD
|
||||
inkhud->begin();
|
||||
|
||||
// Buttons
|
||||
// --------------------------
|
||||
|
||||
Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // A shared NicheGraphics component
|
||||
|
||||
// #0: Main User Button
|
||||
buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin());
|
||||
buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });
|
||||
buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });
|
||||
|
||||
// #1: Aux Button
|
||||
buttons->setWiring(1, PIN_BUTTON2);
|
||||
buttons->setHandlerShortPress(1, [inkhud]() {
|
||||
inkhud->nextTile();
|
||||
playChirp();
|
||||
});
|
||||
|
||||
// Begin handling button events
|
||||
buttons->start();
|
||||
}
|
||||
|
||||
#endif
|
||||
61
variants/esp32s3/heltec_vision_master_e290/pins_arduino.h
Normal file
61
variants/esp32s3/heltec_vision_master_e290/pins_arduino.h
Normal file
@@ -0,0 +1,61 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static const uint8_t LED_BUILTIN = 45; // LED is not populated on earliest board variant
|
||||
#define BUILTIN_LED LED_BUILTIN // Backward compatibility
|
||||
#define LED_BUILTIN LED_BUILTIN
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
static const uint8_t SDA = 39;
|
||||
static const uint8_t SCL = 38;
|
||||
|
||||
static const uint8_t SS = 8;
|
||||
static const uint8_t MOSI = 10;
|
||||
static const uint8_t MISO = 11;
|
||||
static const uint8_t SCK = 9;
|
||||
|
||||
static const uint8_t A0 = 1;
|
||||
static const uint8_t A1 = 2;
|
||||
static const uint8_t A2 = 3;
|
||||
static const uint8_t A3 = 4;
|
||||
static const uint8_t A4 = 5;
|
||||
static const uint8_t A5 = 6;
|
||||
static const uint8_t A6 = 7;
|
||||
static const uint8_t A7 = 8;
|
||||
static const uint8_t A8 = 9;
|
||||
static const uint8_t A9 = 10;
|
||||
static const uint8_t A10 = 11;
|
||||
static const uint8_t A11 = 12;
|
||||
static const uint8_t A12 = 13;
|
||||
static const uint8_t A13 = 14;
|
||||
static const uint8_t A14 = 15;
|
||||
static const uint8_t A15 = 16;
|
||||
static const uint8_t A16 = 17;
|
||||
static const uint8_t A17 = 18;
|
||||
static const uint8_t A18 = 19;
|
||||
static const uint8_t A19 = 20;
|
||||
|
||||
static const uint8_t T1 = 1;
|
||||
static const uint8_t T2 = 2;
|
||||
static const uint8_t T3 = 3;
|
||||
static const uint8_t T4 = 4;
|
||||
static const uint8_t T5 = 5;
|
||||
static const uint8_t T6 = 6;
|
||||
static const uint8_t T7 = 7;
|
||||
static const uint8_t T8 = 8;
|
||||
static const uint8_t T9 = 9;
|
||||
static const uint8_t T10 = 10;
|
||||
static const uint8_t T11 = 11;
|
||||
static const uint8_t T12 = 12;
|
||||
static const uint8_t T13 = 13;
|
||||
static const uint8_t T14 = 14;
|
||||
|
||||
static const uint8_t RST_LoRa = 12;
|
||||
static const uint8_t BUSY_LoRa = 13;
|
||||
static const uint8_t DIO1 = 14;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
42
variants/esp32s3/heltec_vision_master_e290/platformio.ini
Normal file
42
variants/esp32s3/heltec_vision_master_e290/platformio.ini
Normal file
@@ -0,0 +1,42 @@
|
||||
; Using the original screen class
|
||||
[env:heltec-vision-master-e290]
|
||||
extends = esp32s3_base
|
||||
board = heltec_vision_master_e290
|
||||
board_build.partitions = default_8MB.csv
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-I variants/esp32s3/heltec_vision_master_e290
|
||||
-D DISPLAY_FLIP_SCREEN ; Orient so the LoRa antenna faces up
|
||||
-D HELTEC_VISION_MASTER_E290
|
||||
-D BUTTON_CLICK_MS=200
|
||||
-D EINK_DISPLAY_MODEL=GxEPD2_290_BN8
|
||||
-D EINK_WIDTH=296
|
||||
-D EINK_HEIGHT=128
|
||||
-D USE_EINK
|
||||
-D USE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
||||
-D EINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted
|
||||
-D EINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting"
|
||||
|
||||
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
https://github.com/meshtastic/GxEPD2/archive/448c8538129fde3d02a7cb5e6fc81971ad92547f.zip
|
||||
lewisxhe/PCF8563_Library@^1.0.1
|
||||
upload_speed = 115200
|
||||
|
||||
[env:heltec-vision-master-e290-inkhud]
|
||||
extends = esp32s3_base, inkhud
|
||||
board = heltec_vision_master_e290
|
||||
board_build.partitions = default_8MB.csv
|
||||
build_src_filter =
|
||||
${esp32_base.build_src_filter}
|
||||
${inkhud.build_src_filter}
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
${inkhud.build_flags}
|
||||
-I variants/esp32s3/heltec_vision_master_e290
|
||||
-D HELTEC_VISION_MASTER_E290
|
||||
lib_deps =
|
||||
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
|
||||
${esp32s3_base.lib_deps}
|
||||
upload_speed = 921600
|
||||
53
variants/esp32s3/heltec_vision_master_e290/variant.h
Normal file
53
variants/esp32s3/heltec_vision_master_e290/variant.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#define LED_PIN 45 // LED is not populated on earliest board variant
|
||||
#define BUTTON_PIN 0
|
||||
#define PIN_BUTTON2 21 // Second built-in button
|
||||
#define ALT_BUTTON_PIN PIN_BUTTON2 // Send the up event
|
||||
|
||||
// I2C
|
||||
#define I2C_SDA SDA
|
||||
#define I2C_SCL SCL
|
||||
|
||||
// Display (E-Ink)
|
||||
#define PIN_EINK_CS 3
|
||||
#define PIN_EINK_BUSY 6
|
||||
#define PIN_EINK_DC 4
|
||||
#define PIN_EINK_RES 5
|
||||
#define PIN_EINK_SCLK 2
|
||||
#define PIN_EINK_MOSI 1
|
||||
|
||||
// SPI
|
||||
#define SPI_INTERFACES_COUNT 2
|
||||
#define PIN_SPI_MISO 11
|
||||
#define PIN_SPI_MOSI 10
|
||||
#define PIN_SPI_SCK 9
|
||||
|
||||
// Power
|
||||
#define VEXT_ENABLE 18 // Powers the E-Ink display only
|
||||
#define VEXT_ON_VALUE HIGH
|
||||
#define ADC_CTRL 46
|
||||
#define ADC_CTRL_ENABLED HIGH
|
||||
#define BATTERY_PIN 7
|
||||
#define ADC_CHANNEL ADC1_GPIO7_CHANNEL
|
||||
#define ADC_MULTIPLIER 4.9 * 1.03
|
||||
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5
|
||||
|
||||
// LoRa
|
||||
#define USE_SX1262
|
||||
|
||||
#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module
|
||||
#define LORA_RESET 12
|
||||
#define LORA_DIO1 14 // SX1262 IRQ
|
||||
#define LORA_DIO2 13 // SX1262 BUSY
|
||||
|
||||
#define LORA_SCK 9
|
||||
#define LORA_MISO 11
|
||||
#define LORA_MOSI 10
|
||||
#define LORA_CS 8
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
61
variants/esp32s3/heltec_vision_master_t190/pins_arduino.h
Normal file
61
variants/esp32s3/heltec_vision_master_t190/pins_arduino.h
Normal file
@@ -0,0 +1,61 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static const uint8_t LED_BUILTIN = 35;
|
||||
#define BUILTIN_LED LED_BUILTIN // backward compatibility
|
||||
#define LED_BUILTIN LED_BUILTIN
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
static const uint8_t SDA = 2;
|
||||
static const uint8_t SCL = 1;
|
||||
|
||||
static const uint8_t SS = 8;
|
||||
static const uint8_t MOSI = 10;
|
||||
static const uint8_t MISO = 11;
|
||||
static const uint8_t SCK = 9;
|
||||
|
||||
static const uint8_t A0 = 1;
|
||||
static const uint8_t A1 = 2;
|
||||
static const uint8_t A2 = 3;
|
||||
static const uint8_t A3 = 4;
|
||||
static const uint8_t A4 = 5;
|
||||
static const uint8_t A5 = 6;
|
||||
static const uint8_t A6 = 7;
|
||||
static const uint8_t A7 = 8;
|
||||
static const uint8_t A8 = 9;
|
||||
static const uint8_t A9 = 10;
|
||||
static const uint8_t A10 = 11;
|
||||
static const uint8_t A11 = 12;
|
||||
static const uint8_t A12 = 13;
|
||||
static const uint8_t A13 = 14;
|
||||
static const uint8_t A14 = 15;
|
||||
static const uint8_t A15 = 16;
|
||||
static const uint8_t A16 = 17;
|
||||
static const uint8_t A17 = 18;
|
||||
static const uint8_t A18 = 19;
|
||||
static const uint8_t A19 = 20;
|
||||
|
||||
static const uint8_t T1 = 1;
|
||||
static const uint8_t T2 = 2;
|
||||
static const uint8_t T3 = 3;
|
||||
static const uint8_t T4 = 4;
|
||||
static const uint8_t T5 = 5;
|
||||
static const uint8_t T6 = 6;
|
||||
static const uint8_t T7 = 7;
|
||||
static const uint8_t T8 = 8;
|
||||
static const uint8_t T9 = 9;
|
||||
static const uint8_t T10 = 10;
|
||||
static const uint8_t T11 = 11;
|
||||
static const uint8_t T12 = 12;
|
||||
static const uint8_t T13 = 13;
|
||||
static const uint8_t T14 = 14;
|
||||
|
||||
static const uint8_t RST_LoRa = 12;
|
||||
static const uint8_t BUSY_LoRa = 13;
|
||||
static const uint8_t DIO0 = 14;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
13
variants/esp32s3/heltec_vision_master_t190/platformio.ini
Normal file
13
variants/esp32s3/heltec_vision_master_t190/platformio.ini
Normal file
@@ -0,0 +1,13 @@
|
||||
[env:heltec-vision-master-t190]
|
||||
extends = esp32s3_base
|
||||
board = heltec_vision_master_t190
|
||||
board_build.partitions = default_8MB.csv
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-I variants/esp32s3/heltec_vision_master_t190
|
||||
-D HELTEC_VISION_MASTER_T190
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
lewisxhe/PCF8563_Library@^1.0.1
|
||||
https://github.com/meshtastic/st7789/archive/bd33ea58ddfe4a5e4a66d53300ccbd38d66ac21f.zip
|
||||
upload_speed = 921600
|
||||
73
variants/esp32s3/heltec_vision_master_t190/variant.h
Normal file
73
variants/esp32s3/heltec_vision_master_t190/variant.h
Normal file
@@ -0,0 +1,73 @@
|
||||
#ifndef HAS_TFT
|
||||
#define BUTTON_PIN 0
|
||||
#define PIN_BUTTON2 21 // Second built-in button
|
||||
#define ALT_BUTTON_PIN PIN_BUTTON2 // Send the up event
|
||||
|
||||
// I2C
|
||||
#define I2C_SDA SDA
|
||||
#define I2C_SCL SCL
|
||||
|
||||
// Display (TFT)
|
||||
#define USE_ST7789
|
||||
#define ST7789_NSS 39
|
||||
#define ST7789_RS 47 // DC
|
||||
#define ST7789_SDA 48 // MOSI
|
||||
#define ST7789_SCK 38
|
||||
#define ST7789_RESET 40
|
||||
#define ST7789_MISO 4
|
||||
#define ST7789_BUSY -1
|
||||
#define VTFT_CTRL 7
|
||||
#define VTFT_LEDA 17
|
||||
#define TFT_BACKLIGHT_ON HIGH
|
||||
#define ST7789_SPI_HOST SPI2_HOST
|
||||
#define SPI_FREQUENCY 10000000
|
||||
#define SPI_READ_FREQUENCY 10000000
|
||||
#define TFT_HEIGHT 170
|
||||
#define TFT_WIDTH 320
|
||||
#define TFT_OFFSET_X 0
|
||||
#define TFT_OFFSET_Y 0
|
||||
// #define TFT_OFFSET_ROTATION 0
|
||||
// #define SCREEN_ROTATE
|
||||
// #define SCREEN_TRANSITION_FRAMERATE 5
|
||||
#define BRIGHTNESS_DEFAULT 100 // Medium Low Brightnes
|
||||
|
||||
// #define SLEEP_TIME 120
|
||||
|
||||
// SPI
|
||||
#define SPI_INTERFACES_COUNT 2
|
||||
#define PIN_SPI_MISO 11
|
||||
#define PIN_SPI_MOSI 10
|
||||
#define PIN_SPI_SCK 9
|
||||
|
||||
// Power
|
||||
#define VEXT_ENABLE 5
|
||||
#define VEXT_ON_VALUE HIGH
|
||||
#define ADC_CTRL 46
|
||||
#define ADC_CTRL_ENABLED HIGH
|
||||
#define BATTERY_PIN 6
|
||||
#define ADC_CHANNEL ADC1_GPIO6_CHANNEL
|
||||
#define ADC_MULTIPLIER 4.9 * 1.03 // Voltage divider is roughly 1:1
|
||||
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // Voltage divider output is quite high
|
||||
|
||||
// LoRa
|
||||
#define USE_SX1262
|
||||
|
||||
#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module
|
||||
#define LORA_RESET 12
|
||||
#define LORA_DIO1 14 // SX1262 IRQ
|
||||
#define LORA_DIO2 13 // SX1262 BUSY
|
||||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
||||
|
||||
#define LORA_SCK 9
|
||||
#define LORA_MISO 11
|
||||
#define LORA_MOSI 10
|
||||
#define LORA_CS 8
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
#endif // HAS_TFT
|
||||
35
variants/esp32s3/heltec_wireless_paper/einkDetect.h
Normal file
35
variants/esp32s3/heltec_wireless_paper/einkDetect.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include "configuration.h"
|
||||
|
||||
enum class EInkDetectionResult : uint8_t {
|
||||
LCMEN213EFC1 = 0, // V1.1
|
||||
E0213A367 = 1, // V1.1.1, V1.2
|
||||
};
|
||||
|
||||
EInkDetectionResult detectEInk()
|
||||
{
|
||||
// Test 1: Logic of BUSY pin
|
||||
|
||||
// Determines controller IC manufacturer
|
||||
// Fitipower: busy when LOW
|
||||
// Solomon Systech: busy when HIGH
|
||||
|
||||
// Force display BUSY by holding reset pin active
|
||||
pinMode(PIN_EINK_RES, OUTPUT);
|
||||
digitalWrite(PIN_EINK_RES, LOW);
|
||||
|
||||
delay(10);
|
||||
|
||||
// Read whether pin is HIGH or LOW while busy
|
||||
pinMode(PIN_EINK_BUSY, INPUT);
|
||||
bool busyLogic = digitalRead(PIN_EINK_BUSY);
|
||||
|
||||
// Test complete. Release pin
|
||||
pinMode(PIN_EINK_RES, INPUT);
|
||||
|
||||
if (busyLogic == LOW)
|
||||
return EInkDetectionResult::LCMEN213EFC1;
|
||||
else // busy HIGH
|
||||
return EInkDetectionResult::E0213A367;
|
||||
}
|
||||
110
variants/esp32s3/heltec_wireless_paper/nicheGraphics.h
Normal file
110
variants/esp32s3/heltec_wireless_paper/nicheGraphics.h
Normal file
@@ -0,0 +1,110 @@
|
||||
#pragma once
|
||||
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
|
||||
|
||||
// InkHUD-specific components
|
||||
// ---------------------------
|
||||
#include "graphics/niche/InkHUD/InkHUD.h"
|
||||
|
||||
// Applets
|
||||
#include "graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/DM/DMApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h"
|
||||
#include "graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h"
|
||||
|
||||
// Shared NicheGraphics components
|
||||
// --------------------------------
|
||||
#include "graphics/niche/Drivers/EInk/E0213A367.h"
|
||||
#include "graphics/niche/Drivers/EInk/LCMEN2R13EFC1.h"
|
||||
#include "graphics/niche/Inputs/TwoButton.h"
|
||||
|
||||
#include "einkDetect.h" // Detect display model at runtime
|
||||
|
||||
void setupNicheGraphics()
|
||||
{
|
||||
using namespace NicheGraphics;
|
||||
|
||||
// Detect E-Ink Model
|
||||
// -------------------
|
||||
|
||||
EInkDetectionResult displayModel = detectEInk();
|
||||
|
||||
// SPI
|
||||
// -----------------------------
|
||||
|
||||
// Display is connected to HSPI
|
||||
SPIClass *hspi = new SPIClass(HSPI);
|
||||
hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS);
|
||||
|
||||
// E-Ink Driver
|
||||
// -----------------------------
|
||||
|
||||
Drivers::EInk *driver;
|
||||
|
||||
if (displayModel == EInkDetectionResult::LCMEN213EFC1) // V1.1
|
||||
driver = new Drivers::LCMEN213EFC1;
|
||||
else if (displayModel == EInkDetectionResult::E0213A367) // V1.1.1, V1.2
|
||||
driver = new Drivers::E0213A367;
|
||||
|
||||
driver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);
|
||||
|
||||
// InkHUD
|
||||
// ----------------------------
|
||||
|
||||
InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();
|
||||
|
||||
// Set the E-Ink driver
|
||||
inkhud->setDriver(driver);
|
||||
|
||||
// Set how many FAST updates per FULL update
|
||||
// Set how unhealthy additional FAST updates beyond this number are
|
||||
|
||||
if (displayModel == EInkDetectionResult::LCMEN213EFC1) // V1.1 (unmarked)
|
||||
inkhud->setDisplayResilience(10, 1.5);
|
||||
else if (displayModel == EInkDetectionResult::E0213A367) // V1.1.1, V1.2
|
||||
inkhud->setDisplayResilience(15, 3);
|
||||
|
||||
// Select fonts
|
||||
InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;
|
||||
InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;
|
||||
InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;
|
||||
|
||||
// Customize default settings
|
||||
inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle?
|
||||
inkhud->persistence->settings.rotation = 3; // 270 degrees clockwise
|
||||
inkhud->persistence->settings.userTiles.count = 1; // One tile only by default, keep things simple for new users
|
||||
|
||||
// Pick applets
|
||||
// Note: order of applets determines priority of "auto-show" feature
|
||||
inkhud->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown
|
||||
inkhud->addApplet("DMs", new InkHUD::DMApplet); // -
|
||||
inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); // -
|
||||
inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); // -
|
||||
inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated
|
||||
inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); // -
|
||||
inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0
|
||||
|
||||
// Start running InkHUD
|
||||
inkhud->begin();
|
||||
|
||||
// Buttons
|
||||
// --------------------------
|
||||
|
||||
Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component
|
||||
|
||||
// #0: Main User Button
|
||||
buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin());
|
||||
buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });
|
||||
buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });
|
||||
|
||||
// No aux button on this board
|
||||
|
||||
// Begin handling button events
|
||||
buttons->start();
|
||||
}
|
||||
|
||||
#endif
|
||||
61
variants/esp32s3/heltec_wireless_paper/pins_arduino.h
Normal file
61
variants/esp32s3/heltec_wireless_paper/pins_arduino.h
Normal file
@@ -0,0 +1,61 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static const uint8_t LED_BUILTIN = 18;
|
||||
#define BUILTIN_LED LED_BUILTIN // backward compatibility
|
||||
#define LED_BUILTIN LED_BUILTIN
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
static const uint8_t SDA = 41;
|
||||
static const uint8_t SCL = 42;
|
||||
|
||||
static const uint8_t SS = 8;
|
||||
static const uint8_t MOSI = 10;
|
||||
static const uint8_t MISO = 11;
|
||||
static const uint8_t SCK = 9;
|
||||
|
||||
static const uint8_t A0 = 1;
|
||||
static const uint8_t A1 = 2;
|
||||
static const uint8_t A2 = 3;
|
||||
static const uint8_t A3 = 4;
|
||||
static const uint8_t A4 = 5;
|
||||
static const uint8_t A5 = 6;
|
||||
static const uint8_t A6 = 7;
|
||||
static const uint8_t A7 = 8;
|
||||
static const uint8_t A8 = 9;
|
||||
static const uint8_t A9 = 10;
|
||||
static const uint8_t A10 = 11;
|
||||
static const uint8_t A11 = 12;
|
||||
static const uint8_t A12 = 13;
|
||||
static const uint8_t A13 = 14;
|
||||
static const uint8_t A14 = 15;
|
||||
static const uint8_t A15 = 16;
|
||||
static const uint8_t A16 = 17;
|
||||
static const uint8_t A17 = 18;
|
||||
static const uint8_t A18 = 19;
|
||||
static const uint8_t A19 = 20;
|
||||
|
||||
static const uint8_t T1 = 1;
|
||||
static const uint8_t T2 = 2;
|
||||
static const uint8_t T3 = 3;
|
||||
static const uint8_t T4 = 4;
|
||||
static const uint8_t T5 = 5;
|
||||
static const uint8_t T6 = 6;
|
||||
static const uint8_t T7 = 7;
|
||||
static const uint8_t T8 = 8;
|
||||
static const uint8_t T9 = 9;
|
||||
static const uint8_t T10 = 10;
|
||||
static const uint8_t T11 = 11;
|
||||
static const uint8_t T12 = 12;
|
||||
static const uint8_t T13 = 13;
|
||||
static const uint8_t T14 = 14;
|
||||
|
||||
static const uint8_t RST_LoRa = 12;
|
||||
static const uint8_t BUSY_LoRa = 13;
|
||||
static const uint8_t DIO1 = 14;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
40
variants/esp32s3/heltec_wireless_paper/platformio.ini
Normal file
40
variants/esp32s3/heltec_wireless_paper/platformio.ini
Normal file
@@ -0,0 +1,40 @@
|
||||
; Using the original screen class
|
||||
[env:heltec-wireless-paper]
|
||||
extends = esp32s3_base
|
||||
board = heltec_wifi_lora_32_V3
|
||||
board_build.partitions = default_8MB.csv
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-I variants/esp32s3/heltec_wireless_paper
|
||||
-D HELTEC_WIRELESS_PAPER
|
||||
-D GXEPD2_DRIVER_0=GxEPD2_213_FC1
|
||||
-D GXEPD2_DRIVER_1=GxEPD2_213_E0213A367
|
||||
-D EINK_WIDTH=250
|
||||
-D EINK_HEIGHT=122
|
||||
-D USE_EINK
|
||||
-D USE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
||||
-D EINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted
|
||||
-D EINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
|
||||
-D EINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting"
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip
|
||||
lewisxhe/PCF8563_Library@^1.0.1
|
||||
upload_speed = 115200
|
||||
|
||||
[env:heltec-wireless-paper-inkhud]
|
||||
extends = esp32s3_base, inkhud
|
||||
board = heltec_wifi_lora_32_V3
|
||||
board_build.partitions = default_8MB.csv
|
||||
build_src_filter =
|
||||
${esp32_base.build_src_filter}
|
||||
${inkhud.build_src_filter}
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
${inkhud.build_flags}
|
||||
-I variants/esp32s3/heltec_wireless_paper
|
||||
-D HELTEC_WIRELESS_PAPER
|
||||
lib_deps =
|
||||
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
|
||||
${esp32s3_base.lib_deps}
|
||||
upload_speed = 921600
|
||||
55
variants/esp32s3/heltec_wireless_paper/variant.h
Normal file
55
variants/esp32s3/heltec_wireless_paper/variant.h
Normal file
@@ -0,0 +1,55 @@
|
||||
#define LED_PIN 18
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
// I2C
|
||||
#define I2C_SDA SDA
|
||||
#define I2C_SCL SCL
|
||||
|
||||
// Display (E-Ink)
|
||||
#define PIN_EINK_CS 4
|
||||
#define PIN_EINK_BUSY 7
|
||||
#define PIN_EINK_DC 5
|
||||
#define PIN_EINK_RES 6
|
||||
#define PIN_EINK_SCLK 3
|
||||
#define PIN_EINK_MOSI 2
|
||||
|
||||
// SPI
|
||||
#define SPI_INTERFACES_COUNT 2
|
||||
#define PIN_SPI_MISO 11
|
||||
#define PIN_SPI_MOSI 10
|
||||
#define PIN_SPI_SCK 9
|
||||
|
||||
// Power
|
||||
#define VEXT_ENABLE 45 // Active low, powers the E-Ink display
|
||||
#define VEXT_ON_VALUE LOW
|
||||
#define ADC_CTRL 19
|
||||
#define BATTERY_PIN 20
|
||||
#define ADC_CHANNEL ADC2_GPIO20_CHANNEL
|
||||
#define ADC_MULTIPLIER 2 // Voltage divider is roughly 1:1
|
||||
#define BAT_MEASURE_ADC_UNIT 2 // Use ADC2
|
||||
#define ADC_ATTENUATION ADC_ATTEN_DB_12 // Voltage divider output is quite high
|
||||
#define ADC_CTRL_ENABLED LOW
|
||||
|
||||
#define NO_EXT_GPIO 1
|
||||
#define NO_GPS 1
|
||||
|
||||
// LoRa
|
||||
#define USE_SX1262
|
||||
|
||||
#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module
|
||||
#define LORA_RESET 12
|
||||
#define LORA_DIO1 14 // SX1262 IRQ
|
||||
#define LORA_DIO2 13 // SX1262 BUSY
|
||||
|
||||
#define LORA_SCK 9
|
||||
#define LORA_MISO 11
|
||||
#define LORA_MOSI 10
|
||||
#define LORA_CS 8
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
66
variants/esp32s3/heltec_wireless_paper_v1/pins_arduino.h
Normal file
66
variants/esp32s3/heltec_wireless_paper_v1/pins_arduino.h
Normal file
@@ -0,0 +1,66 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static const uint8_t LED_BUILTIN = 18;
|
||||
#define BUILTIN_LED LED_BUILTIN // backward compatibility
|
||||
#define LED_BUILTIN LED_BUILTIN
|
||||
|
||||
static const uint8_t KEY_BUILTIN = 0;
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
static const uint8_t SDA = 41;
|
||||
static const uint8_t SCL = 42;
|
||||
|
||||
static const uint8_t SS = 8;
|
||||
static const uint8_t MOSI = 10;
|
||||
static const uint8_t MISO = 11;
|
||||
static const uint8_t SCK = 9;
|
||||
|
||||
static const uint8_t A0 = 1;
|
||||
static const uint8_t A1 = 2;
|
||||
static const uint8_t A2 = 3;
|
||||
static const uint8_t A3 = 4;
|
||||
static const uint8_t A4 = 5;
|
||||
static const uint8_t A5 = 6;
|
||||
static const uint8_t A6 = 7;
|
||||
static const uint8_t A7 = 8;
|
||||
static const uint8_t A8 = 9;
|
||||
static const uint8_t A9 = 10;
|
||||
static const uint8_t A10 = 11;
|
||||
static const uint8_t A11 = 12;
|
||||
static const uint8_t A12 = 13;
|
||||
static const uint8_t A13 = 14;
|
||||
static const uint8_t A14 = 15;
|
||||
static const uint8_t A15 = 16;
|
||||
static const uint8_t A16 = 17;
|
||||
static const uint8_t A17 = 18;
|
||||
static const uint8_t A18 = 19;
|
||||
static const uint8_t A19 = 20;
|
||||
|
||||
static const uint8_t T1 = 1;
|
||||
static const uint8_t T2 = 2;
|
||||
static const uint8_t T3 = 3;
|
||||
static const uint8_t T4 = 4;
|
||||
static const uint8_t T5 = 5;
|
||||
static const uint8_t T6 = 6;
|
||||
static const uint8_t T7 = 7;
|
||||
static const uint8_t T8 = 8;
|
||||
static const uint8_t T9 = 9;
|
||||
static const uint8_t T10 = 10;
|
||||
static const uint8_t T11 = 11;
|
||||
static const uint8_t T12 = 12;
|
||||
static const uint8_t T13 = 13;
|
||||
static const uint8_t T14 = 14;
|
||||
|
||||
static const uint8_t Vext = 45;
|
||||
static const uint8_t LED = 18;
|
||||
|
||||
static const uint8_t RST_LoRa = 12;
|
||||
static const uint8_t BUSY_LoRa = 13;
|
||||
static const uint8_t DIO1 = 14;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
20
variants/esp32s3/heltec_wireless_paper_v1/platformio.ini
Normal file
20
variants/esp32s3/heltec_wireless_paper_v1/platformio.ini
Normal file
@@ -0,0 +1,20 @@
|
||||
[env:heltec-wireless-paper-v1_0]
|
||||
extends = esp32s3_base
|
||||
board_level = extra
|
||||
board = heltec_wifi_lora_32_V3
|
||||
board_build.partitions = default_8MB.csv
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-I variants/esp32s3/heltec_wireless_paper_v1
|
||||
-D HELTEC_WIRELESS_PAPER_V1_0
|
||||
-D EINK_DISPLAY_MODEL=GxEPD2_213_BN
|
||||
-D EINK_WIDTH=250
|
||||
-D EINK_HEIGHT=122
|
||||
-D USE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
||||
-D EINK_LIMIT_FASTREFRESH=5 ; How many consecutive fast-refreshes are permitted
|
||||
-D EINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
https://github.com/meshtastic/GxEPD2/archive/55f618961db45a23eff0233546430f1e5a80f63a.zip
|
||||
lewisxhe/PCF8563_Library@^1.0.1
|
||||
upload_speed = 115200
|
||||
56
variants/esp32s3/heltec_wireless_paper_v1/variant.h
Normal file
56
variants/esp32s3/heltec_wireless_paper_v1/variant.h
Normal file
@@ -0,0 +1,56 @@
|
||||
#define LED_PIN 18
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
// I2C
|
||||
#define I2C_SDA SDA
|
||||
#define I2C_SCL SCL
|
||||
|
||||
// Display (E-Ink)
|
||||
#define USE_EINK
|
||||
#define PIN_EINK_CS 4
|
||||
#define PIN_EINK_BUSY 7
|
||||
#define PIN_EINK_DC 5
|
||||
#define PIN_EINK_RES 6
|
||||
#define PIN_EINK_SCLK 3
|
||||
#define PIN_EINK_MOSI 2
|
||||
|
||||
// SPI
|
||||
#define SPI_INTERFACES_COUNT 2
|
||||
#define PIN_SPI_MISO 11
|
||||
#define PIN_SPI_MOSI 10
|
||||
#define PIN_SPI_SCK 9
|
||||
|
||||
// Power
|
||||
#define VEXT_ENABLE 45 // Active low, powers the E-Ink display
|
||||
#define VEXT_ON_VALUE LOW
|
||||
#define ADC_CTRL 19
|
||||
#define BATTERY_PIN 20
|
||||
#define ADC_CHANNEL ADC2_GPIO20_CHANNEL
|
||||
#define ADC_MULTIPLIER 2 // Voltage divider is roughly 1:1
|
||||
#define BAT_MEASURE_ADC_UNIT 2 // Use ADC2
|
||||
#define ADC_ATTENUATION ADC_ATTEN_DB_12 // Voltage divider output is quite high
|
||||
#define ADC_CTRL_ENABLED LOW
|
||||
|
||||
#define NO_EXT_GPIO 1
|
||||
#define NO_GPS 1
|
||||
|
||||
// LoRa
|
||||
#define USE_SX1262
|
||||
|
||||
#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module
|
||||
#define LORA_RESET 12
|
||||
#define LORA_DIO1 14 // SX1262 IRQ
|
||||
#define LORA_DIO2 13 // SX1262 BUSY
|
||||
|
||||
#define LORA_SCK 9
|
||||
#define LORA_MISO 11
|
||||
#define LORA_MOSI 10
|
||||
#define LORA_CS 8
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
72
variants/esp32s3/heltec_wireless_tracker/pins_arduino.h
Normal file
72
variants/esp32s3/heltec_wireless_tracker/pins_arduino.h
Normal file
@@ -0,0 +1,72 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include "soc/soc_caps.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define WIFI_LoRa_32_V3 true
|
||||
#define DISPLAY_HEIGHT 80
|
||||
#define DISPLAY_WIDTH 160
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x1001
|
||||
|
||||
static const uint8_t LED_BUILTIN = 18;
|
||||
#define BUILTIN_LED LED_BUILTIN // backward compatibility
|
||||
#define LED_BUILTIN LED_BUILTIN
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
static const uint8_t SDA = 45;
|
||||
static const uint8_t SCL = 46;
|
||||
|
||||
static const uint8_t SS = 8;
|
||||
static const uint8_t MOSI = 10;
|
||||
static const uint8_t MISO = 11;
|
||||
static const uint8_t SCK = 9;
|
||||
|
||||
static const uint8_t A0 = 1;
|
||||
static const uint8_t A1 = 2;
|
||||
static const uint8_t A2 = 3;
|
||||
static const uint8_t A3 = 4;
|
||||
static const uint8_t A4 = 5;
|
||||
static const uint8_t A5 = 6;
|
||||
static const uint8_t A6 = 7;
|
||||
static const uint8_t A7 = 8;
|
||||
static const uint8_t A8 = 9;
|
||||
static const uint8_t A9 = 10;
|
||||
static const uint8_t A10 = 11;
|
||||
static const uint8_t A11 = 12;
|
||||
static const uint8_t A12 = 13;
|
||||
static const uint8_t A13 = 14;
|
||||
static const uint8_t A14 = 15;
|
||||
static const uint8_t A15 = 16;
|
||||
static const uint8_t A16 = 17;
|
||||
static const uint8_t A17 = 18;
|
||||
static const uint8_t A18 = 19;
|
||||
static const uint8_t A19 = 20;
|
||||
|
||||
static const uint8_t T1 = 1;
|
||||
static const uint8_t T2 = 2;
|
||||
static const uint8_t T3 = 3;
|
||||
static const uint8_t T4 = 4;
|
||||
static const uint8_t T5 = 5;
|
||||
static const uint8_t T6 = 6;
|
||||
static const uint8_t T7 = 7;
|
||||
static const uint8_t T8 = 8;
|
||||
static const uint8_t T9 = 9;
|
||||
static const uint8_t T10 = 10;
|
||||
static const uint8_t T11 = 11;
|
||||
static const uint8_t T12 = 12;
|
||||
static const uint8_t T13 = 13;
|
||||
static const uint8_t T14 = 14;
|
||||
|
||||
static const uint8_t Vext = 36;
|
||||
static const uint8_t LED = 18;
|
||||
|
||||
static const uint8_t RST_LoRa = 12;
|
||||
static const uint8_t BUSY_LoRa = 13;
|
||||
static const uint8_t DIO0 = 14;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
16
variants/esp32s3/heltec_wireless_tracker/platformio.ini
Normal file
16
variants/esp32s3/heltec_wireless_tracker/platformio.ini
Normal file
@@ -0,0 +1,16 @@
|
||||
[env:heltec-wireless-tracker]
|
||||
extends = esp32s3_base
|
||||
board = heltec_wireless_tracker
|
||||
board_build.partitions = default_8MB.csv
|
||||
upload_protocol = esptool
|
||||
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-I variants/esp32s3/heltec_wireless_tracker
|
||||
-D HELTEC_TRACKER_V1_1
|
||||
-D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output
|
||||
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
lovyan03/LovyanGFX@^1.2.0
|
||||
78
variants/esp32s3/heltec_wireless_tracker/variant.h
Normal file
78
variants/esp32s3/heltec_wireless_tracker/variant.h
Normal file
@@ -0,0 +1,78 @@
|
||||
#define LED_PIN 18
|
||||
|
||||
#define _VARIANT_HELTEC_WIRELESS_TRACKER
|
||||
#define HELTEC_TRACKER_V1_X
|
||||
|
||||
// I2C
|
||||
#define I2C_SDA SDA
|
||||
#define I2C_SCL SCL
|
||||
|
||||
// ST7735S TFT LCD
|
||||
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
||||
#define ST7735_CS 38
|
||||
#define ST7735_RS 40 // DC
|
||||
#define ST7735_SDA 42 // MOSI
|
||||
#define ST7735_SCK 41
|
||||
#define ST7735_RESET 39
|
||||
#define ST7735_MISO -1
|
||||
#define ST7735_BUSY -1
|
||||
#define TFT_BL 21 /* V1.1 PCB marking */
|
||||
#define ST7735_SPI_HOST SPI3_HOST
|
||||
#define SPI_FREQUENCY 40000000
|
||||
#define SPI_READ_FREQUENCY 16000000
|
||||
#define SCREEN_ROTATE
|
||||
#define TFT_HEIGHT DISPLAY_WIDTH
|
||||
#define TFT_WIDTH DISPLAY_HEIGHT
|
||||
#define TFT_OFFSET_X 26
|
||||
#define TFT_OFFSET_Y -1
|
||||
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
||||
#define DISPLAY_FORCE_SMALL_FONTS
|
||||
|
||||
// pin 3 is Vext on v1.1 - HIGH enables LDO for Vext rail which goes to:
|
||||
// GPS UC6580: GPS V_DET(8), VDD_IO(7), DCDC_IN(21), pulls up RESETN(17), D_SEL(33) and BOOT_MODE(34) through 10kR
|
||||
// GPS LNA SW7125DE: VCC(4), pulls up SHDN(5) through 10kR
|
||||
// LED: VDD, LEDA (through diode)
|
||||
|
||||
#define VEXT_ENABLE 3 // active HIGH - powers the GPS, GPS LNA and OLED
|
||||
#define VEXT_ON_VALUE HIGH
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO1_CHANNEL
|
||||
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider
|
||||
#define ADC_MULTIPLIER 4.9 * 1.045
|
||||
#define ADC_CTRL 2 // active HIGH, powers the voltage divider. Only on 1.1
|
||||
#define ADC_USE_PULLUP // Use internal pullup/pulldown instead of actively driving the output
|
||||
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#define GPS_RX_PIN 33
|
||||
#define GPS_TX_PIN 34
|
||||
#define PIN_GPS_RESET 35
|
||||
#define PIN_GPS_PPS 36
|
||||
// #define PIN_GPS_EN 3 // Uncomment to power off the GPS with triple-click on Tracker v1.1, though we'll also lose the
|
||||
// display.
|
||||
|
||||
#define GPS_RESET_MODE LOW
|
||||
#define GPS_UC6580
|
||||
#define GPS_BAUDRATE 115200
|
||||
|
||||
#define USE_SX1262
|
||||
#define LORA_DIO0 -1 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 12
|
||||
#define LORA_DIO1 14 // SX1262 IRQ
|
||||
#define LORA_DIO2 13 // SX1262 BUSY
|
||||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
||||
|
||||
#define LORA_SCK 9
|
||||
#define LORA_MISO 11
|
||||
#define LORA_MOSI 10
|
||||
#define LORA_CS 8
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
72
variants/esp32s3/heltec_wireless_tracker_V1_0/pins_arduino.h
Normal file
72
variants/esp32s3/heltec_wireless_tracker_V1_0/pins_arduino.h
Normal file
@@ -0,0 +1,72 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include "soc/soc_caps.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define WIFI_LoRa_32_V3 true
|
||||
#define DISPLAY_HEIGHT 80
|
||||
#define DISPLAY_WIDTH 160
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x1001
|
||||
|
||||
static const uint8_t LED_BUILTIN = 18;
|
||||
#define BUILTIN_LED LED_BUILTIN // backward compatibility
|
||||
#define LED_BUILTIN LED_BUILTIN
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
static const uint8_t SDA = 5;
|
||||
static const uint8_t SCL = 6;
|
||||
|
||||
static const uint8_t SS = 8;
|
||||
static const uint8_t MOSI = 10;
|
||||
static const uint8_t MISO = 11;
|
||||
static const uint8_t SCK = 9;
|
||||
|
||||
static const uint8_t A0 = 1;
|
||||
static const uint8_t A1 = 2;
|
||||
static const uint8_t A2 = 3;
|
||||
static const uint8_t A3 = 4;
|
||||
static const uint8_t A4 = 5;
|
||||
static const uint8_t A5 = 6;
|
||||
static const uint8_t A6 = 7;
|
||||
static const uint8_t A7 = 8;
|
||||
static const uint8_t A8 = 9;
|
||||
static const uint8_t A9 = 10;
|
||||
static const uint8_t A10 = 11;
|
||||
static const uint8_t A11 = 12;
|
||||
static const uint8_t A12 = 13;
|
||||
static const uint8_t A13 = 14;
|
||||
static const uint8_t A14 = 15;
|
||||
static const uint8_t A15 = 16;
|
||||
static const uint8_t A16 = 17;
|
||||
static const uint8_t A17 = 18;
|
||||
static const uint8_t A18 = 19;
|
||||
static const uint8_t A19 = 20;
|
||||
|
||||
static const uint8_t T1 = 1;
|
||||
static const uint8_t T2 = 2;
|
||||
static const uint8_t T3 = 3;
|
||||
static const uint8_t T4 = 4;
|
||||
static const uint8_t T5 = 5;
|
||||
static const uint8_t T6 = 6;
|
||||
static const uint8_t T7 = 7;
|
||||
static const uint8_t T8 = 8;
|
||||
static const uint8_t T9 = 9;
|
||||
static const uint8_t T10 = 10;
|
||||
static const uint8_t T11 = 11;
|
||||
static const uint8_t T12 = 12;
|
||||
static const uint8_t T13 = 13;
|
||||
static const uint8_t T14 = 14;
|
||||
|
||||
static const uint8_t Vext = 36;
|
||||
static const uint8_t LED = 18;
|
||||
|
||||
static const uint8_t RST_LoRa = 12;
|
||||
static const uint8_t BUSY_LoRa = 13;
|
||||
static const uint8_t DIO0 = 14;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
15
variants/esp32s3/heltec_wireless_tracker_V1_0/platformio.ini
Normal file
15
variants/esp32s3/heltec_wireless_tracker_V1_0/platformio.ini
Normal file
@@ -0,0 +1,15 @@
|
||||
[env:heltec-wireless-tracker-V1-0]
|
||||
extends = esp32s3_base
|
||||
board_level = extra
|
||||
board = heltec_wireless_tracker
|
||||
board_build.partitions = default_8MB.csv
|
||||
upload_protocol = esptool
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-I variants/esp32s3/heltec_wireless_tracker_V1_0
|
||||
-D HELTEC_TRACKER_V1_0
|
||||
-D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
lovyan03/LovyanGFX@^1.2.0
|
||||
72
variants/esp32s3/heltec_wireless_tracker_V1_0/variant.h
Normal file
72
variants/esp32s3/heltec_wireless_tracker_V1_0/variant.h
Normal file
@@ -0,0 +1,72 @@
|
||||
#define LED_PIN 18
|
||||
|
||||
#define HELTEC_TRACKER_V1_X
|
||||
|
||||
// I2C
|
||||
#define I2C_SDA SDA
|
||||
#define I2C_SCL SCL
|
||||
|
||||
// ST7735S TFT LCD
|
||||
#define ST7735S 1 // there are different (sub-)versions of ST7735
|
||||
#define ST7735_CS 38
|
||||
#define ST7735_RS 40 // DC
|
||||
#define ST7735_SDA 42 // MOSI
|
||||
#define ST7735_SCK 41
|
||||
#define ST7735_RESET 39
|
||||
#define ST7735_MISO -1
|
||||
#define ST7735_BUSY -1
|
||||
#define TFT_BL 45
|
||||
#define ST7735_SPI_HOST SPI3_HOST
|
||||
#define SPI_FREQUENCY 40000000
|
||||
#define SPI_READ_FREQUENCY 16000000
|
||||
#define SCREEN_ROTATE
|
||||
#define TFT_HEIGHT DISPLAY_WIDTH
|
||||
#define TFT_WIDTH DISPLAY_HEIGHT
|
||||
#define TFT_OFFSET_X 26
|
||||
#define TFT_OFFSET_Y -1
|
||||
#define VTFT_CTRL 46 // Heltec Tracker needs this pulled low for TFT
|
||||
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
|
||||
#define DISPLAY_FORCE_SMALL_FONTS
|
||||
|
||||
#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost
|
||||
#define VEXT_ON_VALUE LOW
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO1_CHANNEL
|
||||
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider
|
||||
#define ADC_MULTIPLIER 4.9 * 1.045
|
||||
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#define GPS_RX_PIN 33
|
||||
#define GPS_TX_PIN 34
|
||||
#define PIN_GPS_RESET 35
|
||||
#define PIN_GPS_PPS 36
|
||||
|
||||
#define PIN_GPS_EN 37 // Heltec Tracker needs this pulled low for GPS
|
||||
#define GPS_EN_ACTIVE LOW
|
||||
|
||||
#define GPS_RESET_MODE LOW
|
||||
#define GPS_UC6580
|
||||
#define GPS_BAUDRATE 115200
|
||||
|
||||
#define USE_SX1262
|
||||
#define LORA_DIO0 -1 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 12
|
||||
#define LORA_DIO1 14 // SX1262 IRQ
|
||||
#define LORA_DIO2 13 // SX1262 BUSY
|
||||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
||||
|
||||
#define LORA_SCK 9
|
||||
#define LORA_MISO 11
|
||||
#define LORA_MOSI 10
|
||||
#define LORA_CS 8
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
10
variants/esp32s3/heltec_wsl_v3/platformio.ini
Normal file
10
variants/esp32s3/heltec_wsl_v3/platformio.ini
Normal file
@@ -0,0 +1,10 @@
|
||||
[env:heltec-wsl-v3]
|
||||
extends = esp32s3_base
|
||||
board = heltec_wifi_lora_32_V3
|
||||
board_build.partitions = default_8MB.csv
|
||||
# Temporary until espressif creates a release with this new target
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D HELTEC_WSL_V3
|
||||
-I variants/esp32s3/heltec_wsl_v3
|
||||
-D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
36
variants/esp32s3/heltec_wsl_v3/variant.h
Normal file
36
variants/esp32s3/heltec_wsl_v3/variant.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#define I2C_SCL SCL
|
||||
#define I2C_SDA SDA
|
||||
|
||||
#define LED_PIN LED
|
||||
|
||||
#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost
|
||||
#define VEXT_ON_VALUE LOW
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define ADC_CTRL 37
|
||||
#define ADC_CTRL_ENABLED LOW
|
||||
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO1_CHANNEL
|
||||
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider
|
||||
#define ADC_MULTIPLIER 4.9 * 1.045
|
||||
|
||||
#define USE_SX1262
|
||||
|
||||
#define LORA_DIO0 -1 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 12
|
||||
#define LORA_DIO1 14 // SX1262 IRQ
|
||||
#define LORA_DIO2 13 // SX1262 BUSY
|
||||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
||||
|
||||
#define LORA_SCK 9
|
||||
#define LORA_MISO 11
|
||||
#define LORA_MOSI 10
|
||||
#define LORA_CS 8
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
21
variants/esp32s3/icarus/pins_arduino.h
Normal file
21
variants/esp32s3/icarus/pins_arduino.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define USB_VID 0x2886
|
||||
#define USB_PID 0x0059
|
||||
|
||||
// GPIO48 Reference: https://github.com/espressif/arduino-esp32/pull/8600
|
||||
|
||||
// The default Wire will be mapped to Screen and Sensors
|
||||
static const uint8_t SDA = 8;
|
||||
static const uint8_t SCL = 9;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t MISO = 39;
|
||||
static const uint8_t SCK = 21;
|
||||
static const uint8_t MOSI = 38;
|
||||
static const uint8_t SS = 17;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
21
variants/esp32s3/icarus/platformio.ini
Normal file
21
variants/esp32s3/icarus/platformio.ini
Normal file
@@ -0,0 +1,21 @@
|
||||
[env:icarus]
|
||||
extends = esp32s3_base
|
||||
board = icarus
|
||||
board_level = extra
|
||||
board_check = true
|
||||
board_build.mcu = esp32s3
|
||||
board_build.partitions = default_8MB.csv
|
||||
upload_protocol = esptool
|
||||
upload_speed = 921600
|
||||
platform_packages = platformio/framework-arduinoespressif32@https://github.com/PowerFeather/powerfeather-meshtastic-arduino-lib/releases/download/2.0.16a/esp32-2.0.16.zip
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
build_unflags =
|
||||
${esp32s3_base.build_unflags}
|
||||
-DARDUINO_USB_MODE=1
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D PRIVATE_HW
|
||||
-I variants/esp32s3/icarus
|
||||
-DBOARD_HAS_PSRAM
|
||||
-DARDUINO_USB_MODE=0
|
||||
31
variants/esp32s3/icarus/variant.h
Normal file
31
variants/esp32s3/icarus/variant.h
Normal file
@@ -0,0 +1,31 @@
|
||||
// Icarus has a 1.3 inch OLED Screen
|
||||
#define SCREEN_SSD106
|
||||
|
||||
#define I2C_SDA 8
|
||||
#define I2C_SCL 9
|
||||
|
||||
#define I2C_SDA1 18
|
||||
#define I2C_SCL1 6
|
||||
|
||||
#define BUTTON_PIN 7 // Selection button
|
||||
|
||||
// RA-01SH/HT-RA62 LORA module
|
||||
#define USE_SX1262
|
||||
|
||||
#define LORA_MISO 39
|
||||
#define LORA_SCK 21
|
||||
#define LORA_MOSI 38
|
||||
#define LORA_CS 17
|
||||
|
||||
#define LORA_RESET 42
|
||||
#define LORA_DIO1 5
|
||||
|
||||
#ifdef USE_SX1262
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY 47
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
// DIO2 controlls an antenna switch
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#endif
|
||||
19
variants/esp32s3/link32_s3_v1/pins_arduino.h
Normal file
19
variants/esp32s3/link32_s3_v1/pins_arduino.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#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 = 47;
|
||||
static const uint8_t SCL = 48;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t SS = 21;
|
||||
static const uint8_t MOSI = 34;
|
||||
static const uint8_t MISO = 33;
|
||||
static const uint8_t SCK = 16;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
13
variants/esp32s3/link32_s3_v1/platformio.ini
Normal file
13
variants/esp32s3/link32_s3_v1/platformio.ini
Normal file
@@ -0,0 +1,13 @@
|
||||
[env:link32-s3-v1]
|
||||
extends = esp32s3_base
|
||||
board = esp32-s3-devkitc-1
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D LINK_32
|
||||
-I variants/esp32s3/link32_s3_v1
|
||||
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
|
||||
-DARDUINO_USB_CDC_ON_BOOT
|
||||
-DARDUINO_USB_MODE=1
|
||||
-DRADIOLIB_EXCLUDE_SX128X=1
|
||||
-DRADIOLIB_EXCLUDE_SX127X=1
|
||||
-DRADIOLIB_EXCLUDE_LR11X0=1
|
||||
44
variants/esp32s3/link32_s3_v1/variant.h
Normal file
44
variants/esp32s3/link32_s3_v1/variant.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#define BATTERY_PIN 15
|
||||
#define ADC_CHANNEL ADC2_GPIO15_CHANNEL // ADC channel for battery voltage measurement
|
||||
#define BATTERY_SENSE_SAMPLES 30
|
||||
#define BAT_MEASURE_ADC_UNIT 2 // Use ADC2 for battery measurement
|
||||
|
||||
#define USE_SSD1306
|
||||
|
||||
#define BUTTON_PIN 0 // Button pin for this board
|
||||
#define CANCEL_BUTTON_PIN 36
|
||||
#define CANCEL_BUTTON_ACTIVE_LOW true
|
||||
#define CANCEL_BUTTON_ACTIVE_PULLUP true
|
||||
|
||||
#define HAS_NEOPIXEL // If defined, we will use the neopixel library
|
||||
#define NEOPIXEL_DATA 35 // Neopixel pin for this board
|
||||
#define NEOPIXEL_COUNT 1 // Number of neopixels on this board
|
||||
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
|
||||
|
||||
#define ADC_MULTIPLIER 2
|
||||
|
||||
#define I2C_SDA 47 // I2C pins for this board
|
||||
#define I2C_SCL 48
|
||||
|
||||
#define USE_SX1262
|
||||
|
||||
#define LORA_SCK 16
|
||||
#define LORA_MISO 33
|
||||
#define LORA_MOSI 34
|
||||
#define LORA_CS 21
|
||||
#define LORA_RESET 18
|
||||
|
||||
#define LORA_DIO0 12 // a No connect on the SX1262 module
|
||||
#define LORA_DIO1 13
|
||||
#define LORA_DIO2 14 // Not really used
|
||||
|
||||
#define LORA_TCXO_GPIO 17
|
||||
|
||||
#define TCXO_OPTIONAL
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
63
variants/esp32s3/m5stack_cores3/pins_arduino.h
Normal file
63
variants/esp32s3/m5stack_cores3/pins_arduino.h
Normal file
@@ -0,0 +1,63 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include "soc/soc_caps.h"
|
||||
#include <stdint.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
|
||||
#define RGB_BUILTIN LED_BUILTIN
|
||||
#define RGB_BRIGHTNESS 64
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
static const uint8_t TXD2 = 17;
|
||||
static const uint8_t RXD2 = 18;
|
||||
|
||||
static const uint8_t SDA = 12;
|
||||
static const uint8_t SCL = 11;
|
||||
|
||||
static const uint8_t SS = 15;
|
||||
static const uint8_t MOSI = 37;
|
||||
static const uint8_t MISO = 35;
|
||||
static const uint8_t SCK = 36;
|
||||
|
||||
static const uint8_t G0 = 0;
|
||||
static const uint8_t G1 = 1;
|
||||
static const uint8_t G2 = 2;
|
||||
static const uint8_t G3 = 3;
|
||||
static const uint8_t G4 = 4;
|
||||
static const uint8_t G5 = 5;
|
||||
static const uint8_t G6 = 6;
|
||||
static const uint8_t G7 = 7;
|
||||
static const uint8_t G8 = 8;
|
||||
static const uint8_t G9 = 9;
|
||||
static const uint8_t G11 = 11;
|
||||
static const uint8_t G12 = 12;
|
||||
static const uint8_t G13 = 13;
|
||||
static const uint8_t G14 = 14;
|
||||
static const uint8_t G17 = 17;
|
||||
static const uint8_t G18 = 18;
|
||||
static const uint8_t G19 = 19;
|
||||
static const uint8_t G20 = 20;
|
||||
static const uint8_t G21 = 21;
|
||||
static const uint8_t G33 = 33;
|
||||
static const uint8_t G34 = 34;
|
||||
static const uint8_t G35 = 35;
|
||||
static const uint8_t G36 = 36;
|
||||
static const uint8_t G37 = 37;
|
||||
static const uint8_t G38 = 38;
|
||||
static const uint8_t G45 = 45;
|
||||
static const uint8_t G46 = 46;
|
||||
|
||||
static const uint8_t ADC = 10;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
13
variants/esp32s3/m5stack_cores3/platformio.ini
Normal file
13
variants/esp32s3/m5stack_cores3/platformio.ini
Normal file
@@ -0,0 +1,13 @@
|
||||
; M5stack CoreS3
|
||||
[env:m5stack-cores3]
|
||||
extends = esp32s3_base
|
||||
board = m5stack-cores3
|
||||
board_check = true
|
||||
board_build.partitions = default_16MB.csv
|
||||
upload_protocol = esptool
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D PRIVATE_HW
|
||||
-D M5STACK_CORES3
|
||||
-I variants/esp32s3/m5stack_cores3
|
||||
lib_deps = ${esp32_base.lib_deps}
|
||||
22
variants/esp32s3/m5stack_cores3/variant.h
Normal file
22
variants/esp32s3/m5stack_cores3/variant.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#define I2C_SDA 12
|
||||
#define I2C_SCL 11
|
||||
|
||||
#undef LORA_SCK
|
||||
#undef LORA_MISO
|
||||
#undef LORA_MOSI
|
||||
#undef LORA_CS
|
||||
|
||||
#define LORA_SCK 36
|
||||
#define LORA_MISO 35
|
||||
#define LORA_MOSI 37
|
||||
#define LORA_CS 6 // NSS
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 14 // IRQ
|
||||
#define LORA_RESET 5 // RESET
|
||||
#define LORA_RST 5 // RESET
|
||||
#define LORA_IRQ 14 // DIO0
|
||||
#define LORA_DIO1 RADIOLIB_NC // Not really used
|
||||
#define LORA_DIO2 RADIOLIB_NC // Not really used
|
||||
|
||||
#define HAS_AXP2101
|
||||
65
variants/esp32s3/mesh-tab/pins_arduino.h
Normal file
65
variants/esp32s3/mesh-tab/pins_arduino.h
Normal file
@@ -0,0 +1,65 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include "soc/soc_caps.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define USB_VID 0x303A
|
||||
#define USB_PID 0x80D6
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
static const uint8_t SDA = 8;
|
||||
static const uint8_t SCL = 9;
|
||||
|
||||
static const uint8_t SS = 5;
|
||||
static const uint8_t MOSI = 35;
|
||||
static const uint8_t MISO = 37;
|
||||
static const uint8_t SDO = 35;
|
||||
static const uint8_t SDI = 37;
|
||||
static const uint8_t SCK = 36;
|
||||
|
||||
static const uint8_t A0 = 1;
|
||||
static const uint8_t A1 = 2;
|
||||
static const uint8_t A2 = 3;
|
||||
static const uint8_t A3 = 4;
|
||||
static const uint8_t A4 = 5;
|
||||
static const uint8_t A5 = 6;
|
||||
static const uint8_t A6 = 7;
|
||||
static const uint8_t A7 = 8;
|
||||
static const uint8_t A8 = 9;
|
||||
static const uint8_t A9 = 10;
|
||||
static const uint8_t A10 = 11;
|
||||
static const uint8_t A11 = 12;
|
||||
static const uint8_t A12 = 13;
|
||||
|
||||
static const uint8_t T1 = 1;
|
||||
static const uint8_t T3 = 3;
|
||||
static const uint8_t T5 = 5;
|
||||
static const uint8_t T6 = 6;
|
||||
static const uint8_t T7 = 7;
|
||||
static const uint8_t T8 = 8;
|
||||
static const uint8_t T9 = 9;
|
||||
static const uint8_t T10 = 10;
|
||||
static const uint8_t T11 = 11;
|
||||
static const uint8_t T12 = 12;
|
||||
static const uint8_t T14 = 14;
|
||||
|
||||
static const uint8_t VBAT_SENSE = 2;
|
||||
static const uint8_t VBUS_SENSE = 34;
|
||||
|
||||
// User LED
|
||||
#define LED_BUILTIN 13
|
||||
#define BUILTIN_LED LED_BUILTIN // backward compatibility
|
||||
|
||||
static const uint8_t RGB_DATA = 40;
|
||||
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite()
|
||||
#define RGB_BUILTIN (RGB_DATA + SOC_GPIO_PIN_COUNT)
|
||||
#define RGB_BRIGHTNESS 64
|
||||
|
||||
static const uint8_t RGB_PWR = 39;
|
||||
static const uint8_t LDO2 = 39;
|
||||
static const uint8_t LED = 13;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
181
variants/esp32s3/mesh-tab/platformio.ini
Normal file
181
variants/esp32s3/mesh-tab/platformio.ini
Normal file
@@ -0,0 +1,181 @@
|
||||
; Base for Mesh-Tab device (esp32-s3 N16R2 + ra-sh01 lora)
|
||||
; https://github.com/valzzu/Mesh-Tab
|
||||
[mesh_tab_base]
|
||||
extends = esp32s3_base
|
||||
board = mesh-tab
|
||||
board_level = extra
|
||||
board_upload.flash_size = 16MB
|
||||
board_build.partitions = default_16MB.csv
|
||||
upload_protocol = esptool
|
||||
build_flags = ${esp32s3_base.build_flags}
|
||||
-D MESH_TAB
|
||||
-D CONFIG_ARDUHAL_ESP_LOG
|
||||
-D CONFIG_ARDUHAL_LOG_COLORS=1
|
||||
-D CONFIG_DISABLE_HAL_LOCKS=1
|
||||
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
|
||||
-D MESHTASTIC_EXCLUDE_INPUTBROKER=1
|
||||
-D MESHTASTIC_EXCLUDE_BLUETOOTH=1
|
||||
-D MESHTASTIC_EXCLUDE_WEBSERVER=1
|
||||
-D LV_LVGL_H_INCLUDE_SIMPLE
|
||||
-D LV_CONF_INCLUDE_SIMPLE
|
||||
-D LV_COMP_CONF_INCLUDE_SIMPLE
|
||||
-D LV_USE_SYSMON=0
|
||||
-D LV_USE_PROFILER=0
|
||||
-D LV_USE_PERF_MONITOR=0
|
||||
-D LV_USE_MEM_MONITOR=0
|
||||
-D LV_USE_LOG=0
|
||||
-D LV_BUILD_TEST=0
|
||||
-D USE_LOG_DEBUG
|
||||
-D LOG_DEBUG_INC=\"DebugConfiguration.h\"
|
||||
-D RADIOLIB_SPI_PARANOID=0
|
||||
-D HAS_SCREEN=0
|
||||
-D HAS_TFT=1
|
||||
-D USE_PIN_BUZZER
|
||||
-D RAM_SIZE=1024
|
||||
-D LGFX_DRIVER_TEMPLATE
|
||||
-D LGFX_DRIVER=LGFX_GENERIC
|
||||
-D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_GENERIC.h\"
|
||||
-D LGFX_PIN_SCK=12
|
||||
-D LGFX_PIN_MOSI=13
|
||||
-D LGFX_PIN_MISO=11
|
||||
-D LGFX_PIN_DC=16
|
||||
-D LGFX_PIN_CS=10
|
||||
-D LGFX_PIN_RST=-1
|
||||
-D LGFX_PIN_BL=42
|
||||
-D LGFX_TOUCH_INT=41
|
||||
-D VIEW_320x240
|
||||
-D USE_PACKET_API
|
||||
-I variants/esp32s3/mesh-tab
|
||||
build_src_filter = ${esp32_base.build_src_filter}
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
${device-ui_base.lib_deps}
|
||||
lovyan03/LovyanGFX@^1.2.0
|
||||
|
||||
[mesh_tab_xpt2046]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_base.build_flags}
|
||||
-D LGFX_TOUCH=XPT2046
|
||||
-D LGFX_TOUCH_SPI_FREQ=2500000
|
||||
-D LGFX_TOUCH_SPI_HOST=2
|
||||
-D LGFX_TOUCH_CS=7
|
||||
-D LGFX_TOUCH_CLK=12
|
||||
-D LGFX_TOUCH_DO=11
|
||||
-D LGFX_TOUCH_DIN=13
|
||||
-D LGFX_TOUCH_X_MIN=300
|
||||
-D LGFX_TOUCH_X_MAX=3900
|
||||
-D LGFX_TOUCH_Y_MIN=400
|
||||
-D LGFX_TOUCH_Y_MAX=3900
|
||||
|
||||
[mesh_tab_ft5x06]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_base.build_flags}
|
||||
-D LGFX_TOUCH=FT5x06
|
||||
-D LGFX_TOUCH_I2C_FREQ=400000
|
||||
-D LGFX_TOUCH_I2C_PORT=0
|
||||
-D LGFX_TOUCH_I2C_ADDR=0x38
|
||||
-D LGFX_TOUCH_I2C_SDA=8
|
||||
-D LGFX_TOUCH_I2C_SCL=9
|
||||
-D LGFX_TOUCH_RST=7
|
||||
|
||||
; 3.2" TN TFT ST7789 / XPT2046: https://vi.aliexpress.com/item/1005005933490544.html
|
||||
[env:mesh-tab-3-2-TN-resistive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_xpt2046.build_flags}
|
||||
-D SPI_FREQUENCY=60000000
|
||||
-D LGFX_SCREEN_WIDTH=240
|
||||
-D LGFX_SCREEN_HEIGHT=320
|
||||
-D DISPLAY_SIZE=320x240 ; landscape mode
|
||||
-D LGFX_PANEL=ST7789
|
||||
-D LGFX_INVERT_COLOR=false
|
||||
-D LGFX_ROTATION=3
|
||||
-D LGFX_TOUCH_ROTATION=4
|
||||
|
||||
; 3.2" IPS TFT ILI9341 / XPT2046: https://www.aliexpress.com/item/1005006258575617.html
|
||||
[env:mesh-tab-3-2-IPS-resistive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_xpt2046.build_flags}
|
||||
-D SPI_FREQUENCY=60000000 ; if image is distorted then lower to 40 MHz
|
||||
-D LGFX_SCREEN_WIDTH=240
|
||||
-D LGFX_SCREEN_HEIGHT=320
|
||||
-D DISPLAY_SIZE=320x240 ; landscape mode
|
||||
-D LGFX_PANEL=ILI9341
|
||||
-D LGFX_ROTATION=1
|
||||
-D LGFX_TOUCH_ROTATION=4
|
||||
|
||||
; 3.5" IPS TFT ILI9488 / XPT2046: https://vi.aliexpress.com/item/1005006333922639.html
|
||||
[env:mesh-tab-3-5-IPS-resistive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_xpt2046.build_flags}
|
||||
-D SPI_FREQUENCY=60000000 ; may go higher upto 40/60/80 MHz
|
||||
-D DISPLAY_SET_RESOLUTION
|
||||
-D LGFX_SCREEN_WIDTH=320
|
||||
-D LGFX_SCREEN_HEIGHT=480
|
||||
-D DISPLAY_SIZE=320x480 ; portrait mode
|
||||
-D LGFX_PANEL=ILI9488
|
||||
-D LGFX_ROTATION=0
|
||||
-D LGFX_TOUCH_ROTATION=0
|
||||
|
||||
; 3.5" TN TFT ILI9488 / XPT2046: https://vi.aliexpress.com/item/32985467436.html
|
||||
[env:mesh-tab-3-5-TN-resistive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_xpt2046.build_flags}
|
||||
-D SPI_FREQUENCY=60000000
|
||||
-D DISPLAY_SET_RESOLUTION
|
||||
-D LGFX_SCREEN_WIDTH=320
|
||||
-D LGFX_SCREEN_HEIGHT=480
|
||||
-D DISPLAY_SIZE=320x480 ; portrait mode
|
||||
-D LGFX_PANEL=HX8357B
|
||||
-D LGFX_INVERT_COLOR=false
|
||||
-D LGFX_ROTATION=4
|
||||
-D LGFX_TOUCH_ROTATION=2
|
||||
|
||||
; 3.2" IPS TFT ILI9341 / FT6236: https://vi.aliexpress.com/item/1005006624072350.html
|
||||
[env:mesh-tab-3-2-IPS-capacitive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_ft5x06.build_flags}
|
||||
-D SPI_FREQUENCY=75000000 ; may go higher upto 60/80 MHz
|
||||
-D LGFX_SCREEN_WIDTH=240
|
||||
-D LGFX_SCREEN_HEIGHT=320
|
||||
-D DISPLAY_SIZE=320x240 ; landscape mode
|
||||
-D LGFX_PANEL=ILI9341
|
||||
-D LGFX_ROTATION=1
|
||||
-D LGFX_TOUCH_X_MIN=0
|
||||
-D LGFX_TOUCH_X_MAX=239
|
||||
-D LGFX_TOUCH_Y_MIN=0
|
||||
-D LGFX_TOUCH_Y_MAX=319
|
||||
-D LGFX_TOUCH_ROTATION=2
|
||||
|
||||
; 3.5" IPS TFT ILI9488 / FT6236: https://vi.aliexpress.com/item/1005006893699919.html
|
||||
[env:mesh-tab-3-5-IPS-capacitive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_ft5x06.build_flags}
|
||||
-D SPI_FREQUENCY=75000000 ; may go higher upto 40/60/80 MHz
|
||||
-D DISPLAY_SET_RESOLUTION
|
||||
-D LGFX_SCREEN_WIDTH=320
|
||||
-D LGFX_SCREEN_HEIGHT=480
|
||||
-D DISPLAY_SIZE=320x480 ; portrait mode
|
||||
-D LGFX_PANEL=ILI9488
|
||||
-D LGFX_ROTATION=2
|
||||
-D LGFX_TOUCH_X_MIN=0
|
||||
-D LGFX_TOUCH_X_MAX=319
|
||||
-D LGFX_TOUCH_Y_MIN=0
|
||||
-D LGFX_TOUCH_Y_MAX=479
|
||||
-D LGFX_TOUCH_ROTATION=0
|
||||
|
||||
; 4.0" IPS TFT ILI9488 / FT6236: https://vi.aliexpress.com/item/1005007082906950.html
|
||||
[env:mesh-tab-4-0-IPS-capacitive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_ft5x06.build_flags}
|
||||
-D SPI_FREQUENCY=75000000
|
||||
-D DISPLAY_SET_RESOLUTION
|
||||
-D LGFX_SCREEN_WIDTH=320
|
||||
-D LGFX_SCREEN_HEIGHT=480
|
||||
-D DISPLAY_SIZE=320x480 ; portrait mode
|
||||
-D LGFX_PANEL=HX8357B
|
||||
-D LGFX_ROTATION=4
|
||||
-D LGFX_TOUCH_X_MIN=0
|
||||
-D LGFX_TOUCH_X_MAX=319
|
||||
-D LGFX_TOUCH_Y_MIN=0
|
||||
-D LGFX_TOUCH_Y_MAX=479
|
||||
-D LGFX_TOUCH_ROTATION=6
|
||||
59
variants/esp32s3/mesh-tab/variant.h
Normal file
59
variants/esp32s3/mesh-tab/variant.h
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef _VARIANT_MESHTAB_DIY_
|
||||
#define _VARIANT_MESHTAB_DIY_
|
||||
|
||||
#define HAS_TOUCHSCREEN 1
|
||||
|
||||
#define USE_POWERSAVE
|
||||
#define SLEEP_TIME 180
|
||||
|
||||
// Analog pins
|
||||
#define BATTERY_PIN 4 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
// ratio of voltage divider (100k, 220k)
|
||||
#define ADC_MULTIPLIER 1.6 // 1.45 + 10% for correction of display undervoltage.
|
||||
#define ADC_CHANNEL ADC1_GPIO4_CHANNEL
|
||||
|
||||
// LED
|
||||
#define LED_PIN 21
|
||||
|
||||
// Button
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
// Button
|
||||
#define PIN_BUZZER 5
|
||||
|
||||
// GPS
|
||||
#define GPS_RX_PIN 18
|
||||
#define GPS_TX_PIN 17
|
||||
|
||||
// #define HAS_SDCARD 1
|
||||
#define SPI_MOSI 13
|
||||
#define SPI_SCK 12
|
||||
#define SPI_MISO 11
|
||||
#define SPI_CS 10
|
||||
#define SDCARD_CS 6
|
||||
|
||||
// LORA MODULES
|
||||
#define USE_SX1262
|
||||
|
||||
// LORA SPI
|
||||
#define LORA_SCK 36
|
||||
#define LORA_MISO 37
|
||||
#define LORA_MOSI 35
|
||||
#define LORA_CS 39
|
||||
|
||||
// LORA CONFIG
|
||||
#define LORA_DIO0 -1 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 14
|
||||
#define LORA_DIO1 15 // SX1262 IRQ
|
||||
#define LORA_DIO2 40 // SX1262 BUSY
|
||||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET 14
|
||||
#define SX126X_RXEN 47
|
||||
#define SX126X_TXEN RADIOLIB_NC // Assuming that DIO2 is connected to TXEN pin
|
||||
|
||||
#endif
|
||||
8
variants/esp32s3/nibble_esp32/platformio.ini
Normal file
8
variants/esp32s3/nibble_esp32/platformio.ini
Normal file
@@ -0,0 +1,8 @@
|
||||
[env:nibble-esp32]
|
||||
extends = esp32s3_base
|
||||
board = esp32-s3-zero
|
||||
board_level = extra
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D PRIVATE_HW
|
||||
-I variants/esp32s3/nibble_esp32
|
||||
18
variants/esp32s3/nibble_esp32/variant.h
Normal file
18
variants/esp32s3/nibble_esp32/variant.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#define I2C_SDA 11 // I2C pins for this board
|
||||
#define I2C_SCL 10
|
||||
|
||||
#define LED_PIN 1 // If defined we will blink this LED
|
||||
|
||||
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_SCK 6
|
||||
#define LORA_MISO 7
|
||||
#define LORA_MOSI 8
|
||||
#define LORA_CS 9
|
||||
#define LORA_DIO0 5 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 4
|
||||
|
||||
#define LORA_DIO1 RADIOLIB_NC
|
||||
#define LORA_DIO2 RADIOLIB_NC
|
||||
6
variants/esp32s3/nugget_s3_lora/platformio.ini
Normal file
6
variants/esp32s3/nugget_s3_lora/platformio.ini
Normal file
@@ -0,0 +1,6 @@
|
||||
[env:nugget-s3-lora]
|
||||
extends = esp32s3_base
|
||||
board = lolin_s3_mini
|
||||
board_level = extra
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags} -D ARDUINO_USB_CDC_ON_BOOT=1 -D PRIVATE_HW -I variants/esp32s3/nugget_s3_lora
|
||||
27
variants/esp32s3/nugget_s3_lora/variant.h
Normal file
27
variants/esp32s3/nugget_s3_lora/variant.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#define I2C_SDA 35 // I2C pins for this board
|
||||
#define I2C_SCL 36
|
||||
|
||||
#define USE_SSD1306
|
||||
#define DISPLAY_FLIP_SCREEN
|
||||
|
||||
#define LED_PIN 15 // If defined we will blink this LED
|
||||
|
||||
#define HAS_NEOPIXEL // Enable the use of neopixels
|
||||
#define NEOPIXEL_COUNT 3 // How many neopixels are connected
|
||||
#define NEOPIXEL_DATA 10 // gpio pin used to send data to the neopixels
|
||||
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use
|
||||
|
||||
// Button A (44), B (43), R (12), U (13), L (11), D (18)
|
||||
#define BUTTON_PIN 44 // If defined, this will be used for user button presses
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_SCK 6
|
||||
#define LORA_MISO 7
|
||||
#define LORA_MOSI 8
|
||||
#define LORA_CS 9
|
||||
#define LORA_DIO0 16 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 4
|
||||
|
||||
#define LORA_DIO1 RADIOLIB_NC
|
||||
#define LORA_DIO2 RADIOLIB_NC
|
||||
22
variants/esp32s3/picomputer-s3/pins_arduino.h
Normal file
22
variants/esp32s3/picomputer-s3/pins_arduino.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x1001
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
// The default Wire will be mapped to PMU and RTC
|
||||
static const uint8_t SDA = 8;
|
||||
static const uint8_t SCL = 9;
|
||||
|
||||
// Default SPI
|
||||
static const uint8_t MISO = 39;
|
||||
static const uint8_t SCK = 21;
|
||||
static const uint8_t MOSI = 38;
|
||||
static const uint8_t SS = 40;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
56
variants/esp32s3/picomputer-s3/platformio.ini
Normal file
56
variants/esp32s3/picomputer-s3/platformio.ini
Normal file
@@ -0,0 +1,56 @@
|
||||
[env:picomputer-s3]
|
||||
extends = esp32s3_base
|
||||
board = bpi_picow_esp32_s3
|
||||
board_check = true
|
||||
board_build.partitions = default_8MB.csv
|
||||
;OpenOCD flash method
|
||||
;upload_protocol = esp-builtin
|
||||
;Normal method
|
||||
upload_protocol = esptool
|
||||
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-DPICOMPUTER_S3
|
||||
-I variants/esp32s3/picomputer-s3
|
||||
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
lovyan03/LovyanGFX@^1.2.0
|
||||
|
||||
build_src_filter =
|
||||
${esp32s3_base.build_src_filter}
|
||||
|
||||
|
||||
[env:picomputer-s3-tft]
|
||||
extends = env:picomputer-s3
|
||||
|
||||
build_flags =
|
||||
${env:picomputer-s3.build_flags}
|
||||
-D INPUTDRIVER_MATRIX_TYPE=1
|
||||
-D USE_PIN_BUZZER=PIN_BUZZER
|
||||
-D USE_SX127x
|
||||
-D HAS_SCREEN=1
|
||||
-D HAS_TFT=1
|
||||
-D RAM_SIZE=1560
|
||||
-D LV_LVGL_H_INCLUDE_SIMPLE
|
||||
-D LV_CONF_INCLUDE_SIMPLE
|
||||
-D LV_COMP_CONF_INCLUDE_SIMPLE
|
||||
-D LV_USE_SYSMON=0
|
||||
-D LV_USE_PROFILER=0
|
||||
-D LV_USE_PERF_MONITOR=0
|
||||
-D LV_USE_MEM_MONITOR=0
|
||||
-D LV_USE_LOG=0
|
||||
-D USE_LOG_DEBUG
|
||||
-D LOG_DEBUG_INC=\"DebugConfiguration.h\"
|
||||
-D LGFX_SCREEN_WIDTH=240
|
||||
-D LGFX_SCREEN_HEIGHT=320
|
||||
-D DISPLAY_SIZE=320x240 ; landscape mode
|
||||
-D LGFX_DRIVER=LGFX_PICOMPUTER_S3
|
||||
-D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_PICOMPUTER_S3.h\"
|
||||
-D VIEW_320x240
|
||||
; -D USE_DOUBLE_BUFFER
|
||||
-D USE_PACKET_API
|
||||
|
||||
lib_deps =
|
||||
${env:picomputer-s3.lib_deps}
|
||||
${device-ui_base.lib_deps}
|
||||
65
variants/esp32s3/picomputer-s3/variant.h
Normal file
65
variants/esp32s3/picomputer-s3/variant.h
Normal file
@@ -0,0 +1,65 @@
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define PIN_BUZZER 43
|
||||
|
||||
#define HAS_WIRE 0
|
||||
|
||||
#define BATTERY_PIN ADC1_CHANNEL_1_GPIO_NUM // 2
|
||||
// A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
// ratio of voltage divider = 3.0 (R11=200k, R7=100k)
|
||||
#define ADC_MULTIPLIER 3.1 // 3.0 with correction of display undervoltage.
|
||||
#define ADC_CHANNEL ADC1_GPIO2_CHANNEL
|
||||
|
||||
#define USE_RF95 // RFM95/SX127x
|
||||
|
||||
#define LORA_SCK SCK // 21
|
||||
#define LORA_MISO MISO // 39
|
||||
#define LORA_MOSI MOSI // 38
|
||||
#define LORA_CS SS // 40
|
||||
#define LORA_RESET RADIOLIB_NC
|
||||
|
||||
// per SX1276_Receive_Interrupt/utilities.h
|
||||
#define LORA_DIO0 10
|
||||
#define LORA_DIO1 RADIOLIB_NC
|
||||
#define LORA_DIO2 RADIOLIB_NC
|
||||
|
||||
// Default SPI1 will be mapped to the display
|
||||
#define ST7789_SDA 4
|
||||
#define ST7789_SCK 3
|
||||
#define ST7789_CS 6
|
||||
#define ST7789_RS 1
|
||||
#define ST7789_BL 5
|
||||
|
||||
#define ST7789_RESET -1
|
||||
#define ST7789_MISO -1
|
||||
#define ST7789_BUSY -1
|
||||
#define ST7789_SPI_HOST SPI3_HOST
|
||||
#define TFT_BL 5
|
||||
#define SPI_FREQUENCY 40000000
|
||||
#define SPI_READ_FREQUENCY 16000000
|
||||
#define TFT_HEIGHT 320
|
||||
#define TFT_WIDTH 240
|
||||
#define TFT_OFFSET_X 0
|
||||
#define TFT_OFFSET_Y 0
|
||||
#define TFT_OFFSET_ROTATION 0
|
||||
#define SCREEN_ROTATE
|
||||
#define SCREEN_TRANSITION_FRAMERATE 5
|
||||
|
||||
// Picomputer gets a white on black display
|
||||
#define TFT_MESH_OVERRIDE COLOR565(255, 255, 255)
|
||||
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
#define INPUTBROKER_MATRIX_TYPE 1
|
||||
|
||||
#define KEYS_COLS \
|
||||
{ \
|
||||
44, 47, 17, 15, 13, 41 \
|
||||
}
|
||||
#define KEYS_ROWS \
|
||||
{ \
|
||||
12, 16, 42, 18, 14, 7 \
|
||||
}
|
||||
28
variants/esp32s3/rak3312/pins_arduino.h
Normal file
28
variants/esp32s3/rak3312/pins_arduino.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include "variant.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 = 9;
|
||||
static const uint8_t SCL = 40;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t SS = 12;
|
||||
static const uint8_t MOSI = 11;
|
||||
static const uint8_t MISO = 10;
|
||||
static const uint8_t SCK = 13;
|
||||
|
||||
#define SPI_MOSI (11)
|
||||
#define SPI_SCK (13)
|
||||
#define SPI_MISO (10)
|
||||
#define SPI_CS (12)
|
||||
|
||||
// LEDs
|
||||
#define LED_BUILTIN LED_GREEN
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
11
variants/esp32s3/rak3312/platformio.ini
Normal file
11
variants/esp32s3/rak3312/platformio.ini
Normal file
@@ -0,0 +1,11 @@
|
||||
[env:rak3312]
|
||||
extends = esp32s3_base
|
||||
board = wiscore_rak3312
|
||||
board_level = pr
|
||||
board_check = true
|
||||
upload_protocol = esptool
|
||||
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-D RAK3312
|
||||
-I variants/esp32s3/rak3312
|
||||
44
variants/esp32s3/rak3312/variant.h
Normal file
44
variants/esp32s3/rak3312/variant.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#define I2C_SDA 9
|
||||
#define I2C_SCL 40
|
||||
|
||||
#define USE_SX1262
|
||||
|
||||
#define LORA_SCK 5
|
||||
#define LORA_MISO 3
|
||||
#define LORA_MOSI 6
|
||||
#define LORA_CS 7
|
||||
#define LORA_RESET 8
|
||||
|
||||
#ifdef USE_SX1262
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 47
|
||||
#define SX126X_BUSY 48
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
#endif
|
||||
|
||||
#define SX126X_POWER_EN (4)
|
||||
|
||||
#define PIN_POWER_EN PIN_3V3_EN
|
||||
#define PIN_3V3_EN (14)
|
||||
|
||||
#define LED_GREEN 46
|
||||
#define LED_BLUE 45
|
||||
|
||||
#define PIN_LED1 LED_GREEN
|
||||
#define PIN_LED2 LED_BLUE
|
||||
|
||||
#define LED_CONN LED_BLUE
|
||||
#define LED_PIN LED_GREEN
|
||||
#define ledOff(pin) pinMode(pin, INPUT)
|
||||
|
||||
#define LED_STATE_ON 1 // State when LED is litted
|
||||
|
||||
#define HAS_GPS 1
|
||||
#define GPS_TX_PIN 43
|
||||
#define GPS_RX_PIN 44
|
||||
|
||||
#define BATTERY_PIN 1
|
||||
#define ADC_CHANNEL ADC1_GPIO1_CHANNEL
|
||||
#define ADC_MULTIPLIER 1.667
|
||||
56
variants/esp32s3/seeed-sensecap-indicator/pins_arduino.h
Normal file
56
variants/esp32s3/seeed-sensecap-indicator/pins_arduino.h
Normal file
@@ -0,0 +1,56 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// static const uint8_t LED_BUILTIN = -1;
|
||||
|
||||
// static const uint8_t TX = 43;
|
||||
// static const uint8_t RX = 44;
|
||||
|
||||
static const uint8_t SDA = 39;
|
||||
static const uint8_t SCL = 40;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t SS = -1;
|
||||
static const uint8_t MOSI = 48;
|
||||
static const uint8_t MISO = 47;
|
||||
static const uint8_t SCK = 41;
|
||||
|
||||
static const uint8_t A0 = 1;
|
||||
static const uint8_t A1 = 2;
|
||||
static const uint8_t A2 = 3;
|
||||
static const uint8_t A3 = 4;
|
||||
static const uint8_t A4 = 5;
|
||||
static const uint8_t A5 = 6;
|
||||
static const uint8_t A6 = 7;
|
||||
static const uint8_t A7 = 8;
|
||||
static const uint8_t A8 = 9;
|
||||
static const uint8_t A9 = 10;
|
||||
static const uint8_t A10 = 11;
|
||||
static const uint8_t A11 = 12;
|
||||
static const uint8_t A12 = 13;
|
||||
static const uint8_t A13 = 14;
|
||||
static const uint8_t A14 = 15;
|
||||
static const uint8_t A15 = 16;
|
||||
static const uint8_t A16 = 17;
|
||||
static const uint8_t A17 = 18;
|
||||
static const uint8_t A18 = 19;
|
||||
static const uint8_t A19 = 20;
|
||||
|
||||
static const uint8_t T1 = 1;
|
||||
static const uint8_t T2 = 2;
|
||||
static const uint8_t T3 = 3;
|
||||
static const uint8_t T4 = 4;
|
||||
static const uint8_t T5 = 5;
|
||||
static const uint8_t T6 = 6;
|
||||
static const uint8_t T7 = 7;
|
||||
static const uint8_t T8 = 8;
|
||||
static const uint8_t T9 = 9;
|
||||
static const uint8_t T10 = 10;
|
||||
static const uint8_t T11 = 11;
|
||||
static const uint8_t T12 = 12;
|
||||
static const uint8_t T13 = 13;
|
||||
static const uint8_t T14 = 14;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
130
variants/esp32s3/seeed-sensecap-indicator/platformio.ini
Normal file
130
variants/esp32s3/seeed-sensecap-indicator/platformio.ini
Normal file
@@ -0,0 +1,130 @@
|
||||
; Seeed Studio SenseCAP Indicator
|
||||
[env:seeed-sensecap-indicator]
|
||||
extends = esp32s3_base
|
||||
platform =
|
||||
;https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
|
||||
https://github.com/pioarduino/platform-espressif32.git#develop
|
||||
;symlink:///home/manuel/Documents/PlatformIO/Projects/platform-espressif32
|
||||
platform_packages =
|
||||
;platformio/framework-arduinoespressif32-libs@https://dl.espressif.com/AE/esp-arduino-libs/esp32-3.2.0-h.zip
|
||||
platformio/framework-arduinoespressif32 @ https://github.com/mverch67/arduino-esp32/archive/919e485187a77b62b93f9b7fa09f43a8eeceaa44.zip
|
||||
;platformio/framework-arduinoespressif32 @ symlink:///home/manuel/Documents/PlatformIO/Projects/arduino-esp32
|
||||
|
||||
board = seeed-sensecap-indicator
|
||||
board_check = true
|
||||
upload_protocol = esptool
|
||||
|
||||
build_unflags =
|
||||
-DCONFIG_BT_NIMBLE_ENABLED
|
||||
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=2
|
||||
-DCONFIG_BT_NIMBLE_MAX_CCCDS=20
|
||||
-DCONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=8192
|
||||
|
||||
build_flags = ${esp32_base.build_flags} -D lcd_periph_signals=lcd_periph_rgb_signals -mtext-section-literals -ffat-lto-objects
|
||||
-Ivariants/esp32s3/seeed-sensecap-indicator
|
||||
-DSENSECAP_INDICATOR
|
||||
-DCONFIG_ARDUHAL_LOG_COLORS
|
||||
-DRADIOLIB_DEBUG_SPI=0
|
||||
-DRADIOLIB_DEBUG_PROTOCOL=0
|
||||
-DRADIOLIB_DEBUG_BASIC=0
|
||||
-DRADIOLIB_VERBOSE_ASSERT=0
|
||||
-DRADIOLIB_SPI_PARANOID=0
|
||||
-DIO_EXPANDER=0x40
|
||||
-DIO_EXPANDER_IRQ=42
|
||||
;-DIO_EXPANDER_DEBUG
|
||||
-DUSE_ARDUINO_HAL_GPIO
|
||||
|
||||
lib_deps = ${esp32s3_base.lib_deps}
|
||||
https://github.com/mverch67/LovyanGFX/archive/502127dfe28ab766b7ce7ba6470175ab6c9c1288.zip
|
||||
|
||||
custom_component_remove =
|
||||
espressif/esp_hosted
|
||||
espressif/esp_wifi_remote
|
||||
espressif/esp-dsp
|
||||
espressif/esp32-camera
|
||||
espressif/libsodium
|
||||
espressif/esp-modbus
|
||||
espressif/qrcode
|
||||
espressif/esp_insights
|
||||
espressif/esp_diag_data_store
|
||||
espressif/esp_diagnostics
|
||||
espressif/esp_rainmaker
|
||||
espressif/rmaker_common
|
||||
|
||||
custom_sdkconfig =
|
||||
CONFIG_SPIRAM_MODE_OCT=y
|
||||
CONFIG_SPIRAM_SPEED_120M=y
|
||||
CONFIG_LCD_RGB_ISR_IRAM_SAFE=y
|
||||
CONFIG_GDMA_CTRL_FUNC_IN_IRAM=y
|
||||
CONFIG_I2S_ISR_IRAM_SAFE=y
|
||||
CONFIG_GDMA_ISR_IRAM_SAFE=y
|
||||
CONFIG_SPIRAM_XIP_FROM_PSRAM=y
|
||||
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
|
||||
CONFIG_SPIRAM_RODATA=y
|
||||
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y
|
||||
CONFIG_ESP32S3_DATA_CACHE_64KB=y
|
||||
CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y
|
||||
CONFIG_I2C_SKIP_LEGACY_CONFLICT_CHECK=y
|
||||
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
|
||||
CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH=y
|
||||
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y
|
||||
CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM=y
|
||||
CONFIG_ESP_WIFI_IRAM_OPT=n
|
||||
CONFIG_ESP32_WIFI_RX_IRAM_OPT=n
|
||||
CONFIG_SPIRAM_CACHE_LIBCHAR_IN_IRAM=n
|
||||
CONFIG_SPIRAM_CACHE_LIBSTR_IN_IRAM=n
|
||||
CONFIG_SPIRAM_CACHE_LIBMISC_IN_IRAM=n
|
||||
CONFIG_SPIRAM_CACHE_LIBTIME_IN_IRAM=n
|
||||
CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=0
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
CONFIG_BT_BLUEDROID_ENABLED=y
|
||||
CONFIG_BT_CONTROLLER_ENABLED=y
|
||||
CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=8192
|
||||
CONFIG_BT_NIMBLE_MAX_CCCDS=20
|
||||
CONFIG_BT_NIMBLE_CPP_LOG_LEVEL=2
|
||||
|
||||
[env:seeed-sensecap-indicator-tft]
|
||||
extends = env:seeed-sensecap-indicator
|
||||
board_level = pr
|
||||
upload_speed = 460800
|
||||
|
||||
build_flags =
|
||||
${env:seeed-sensecap-indicator.build_flags}
|
||||
-D INPUTDRIVER_BUTTON_TYPE=38
|
||||
-D MESHTASTIC_EXCLUDE_I2C=1
|
||||
-D MESHTASTIC_EXCLUDE_WEBSERVER=1
|
||||
-D MESHTASTIC_EXCLUDE_SERIAL=1
|
||||
-D MESHTASTIC_EXCLUDE_SOCKETAPI=1
|
||||
-D MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1
|
||||
-D MESHTASTIC_EXCLUDE_WIFI=1 ; workaround due to duplicated definitions of Syslog
|
||||
-D HAS_TELEMETRY=0
|
||||
-D CONFIG_DISABLE_HAL_LOCKS=1
|
||||
-D HAS_SCREEN=1
|
||||
-D HAS_TFT=1
|
||||
-D DISPLAY_SET_RESOLUTION
|
||||
-D RAM_SIZE=4096
|
||||
-D LV_LVGL_H_INCLUDE_SIMPLE
|
||||
-D LV_CONF_INCLUDE_SIMPLE
|
||||
-D LV_COMP_CONF_INCLUDE_SIMPLE
|
||||
-D LV_USE_SYSMON=0
|
||||
-D LV_USE_PROFILER=0
|
||||
-D LV_USE_PERF_MONITOR=0
|
||||
-D LV_USE_MEM_MONITOR=0
|
||||
-D LV_USE_LOG=0
|
||||
-D USE_LOG_DEBUG
|
||||
-D LOG_DEBUG_INC=\"DebugConfiguration.h\"
|
||||
-D CUSTOM_TOUCH_DRIVER
|
||||
-D LGFX_SCREEN_WIDTH=480
|
||||
-D LGFX_SCREEN_HEIGHT=480
|
||||
-D DISPLAY_SIZE=480x480
|
||||
-D LGFX_DRIVER=LGFX_INDICATOR
|
||||
-D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_INDICATOR.h\"
|
||||
-D VIEW_320x240
|
||||
-D USE_PACKET_API
|
||||
|
||||
lib_deps =
|
||||
${env:seeed-sensecap-indicator.lib_deps}
|
||||
${device-ui_base.lib_deps}
|
||||
https://github.com/mverch67/bb_captouch/archive/8626412fe650d808a267791c0eae6e5860c85a5d.zip ; alternative touch library supporting FT6x36
|
||||
80
variants/esp32s3/seeed-sensecap-indicator/variant.h
Normal file
80
variants/esp32s3/seeed-sensecap-indicator/variant.h
Normal file
@@ -0,0 +1,80 @@
|
||||
#define I2C_SDA 39
|
||||
#define I2C_SCL 40
|
||||
|
||||
// This board has a serial coprocessor for sensor readings
|
||||
#define SENSOR_RP2040_TXD 19
|
||||
#define SENSOR_RP2040_RXD 20
|
||||
#define SENSOR_PORT_NUM UART_NUM_2
|
||||
#define SENSOR_BAUD_RATE 115200
|
||||
|
||||
#define BUTTON_PIN 38
|
||||
#define BUTTON_ACTIVE_LOW true
|
||||
#define BUTTON_ACTIVE_PULLUP true
|
||||
|
||||
// #define BUTTON_NEED_PULLUP
|
||||
|
||||
// #define BATTERY_PIN 27 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
// #define ADC_CHANNEL ADC1_GPIO27_CHANNEL
|
||||
// #define ADC_MULTIPLIER 2
|
||||
|
||||
// ST7701 TFT LCD
|
||||
#define ST7701_CS (4 | IO_EXPANDER)
|
||||
#define ST7701_RS -1 // DC
|
||||
#define ST7701_SDA 48 // MOSI
|
||||
#define ST7701_SCK 41
|
||||
#define ST7701_RESET (5 | IO_EXPANDER)
|
||||
#define ST7701_MISO 47
|
||||
#define ST7701_BUSY -1
|
||||
#define ST7701_BL 45
|
||||
#define ST7701_SPI_HOST SPI2_HOST
|
||||
#define ST7701_BACKLIGHT_EN 45
|
||||
#define SPI_FREQUENCY 12000000
|
||||
#define TFT_HEIGHT 480
|
||||
#define TFT_WIDTH 480
|
||||
#define TFT_OFFSET_X 0
|
||||
#define TFT_OFFSET_Y 0
|
||||
#define TFT_OFFSET_ROTATION 0
|
||||
#define TFT_BL 45
|
||||
#define SCREEN_ROTATE
|
||||
#define SCREEN_TRANSITION_FRAMERATE 5 // fps
|
||||
|
||||
#define HAS_TOUCHSCREEN 1
|
||||
#define SCREEN_TOUCH_INT (6 | IO_EXPANDER)
|
||||
#define SCREEN_TOUCH_RST (7 | IO_EXPANDER)
|
||||
#define TOUCH_I2C_PORT 0
|
||||
#define TOUCH_SLAVE_ADDRESS 0x48
|
||||
|
||||
// in future, we may want to add a buzzer and add all sensors to the indicator via a data protocol for now only GPS is supported
|
||||
// // Buzzer
|
||||
// #define PIN_BUZZER 19
|
||||
|
||||
#define GPS_DEFAULT_NOT_PRESENT 1
|
||||
#define GPS_RX_PIN 20
|
||||
#define GPS_TX_PIN 19
|
||||
#define HAS_GPS 1
|
||||
|
||||
#define USE_SX1262
|
||||
#define USE_SX1268
|
||||
|
||||
#define LORA_SCK 41
|
||||
#define LORA_MISO 47
|
||||
#define LORA_MOSI 48
|
||||
#define LORA_CS (0 | IO_EXPANDER)
|
||||
|
||||
#define LORA_DIO0 -1 // a no connect on the SX1262 module
|
||||
#define LORA_RESET (1 | IO_EXPANDER)
|
||||
#define LORA_DIO1 (3 | IO_EXPANDER) // SX1262 IRQ
|
||||
#define LORA_DIO2 (2 | IO_EXPANDER) // SX1262 BUSY
|
||||
#define LORA_DIO3
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
|
||||
#define TCXO_OPTIONAL // handle Indicator V1 and V2
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 2.4
|
||||
|
||||
#define USE_VIRTUAL_KEYBOARD 1
|
||||
#define DISPLAY_CLOCK_FRAME 1
|
||||
21
variants/esp32s3/seeed_xiao_s3/pins_arduino.h
Normal file
21
variants/esp32s3/seeed_xiao_s3/pins_arduino.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define USB_VID 0x2886
|
||||
#define USB_PID 0x0059
|
||||
|
||||
// GPIO48 Reference: https://github.com/espressif/arduino-esp32/pull/8600
|
||||
|
||||
// The default Wire will be mapped to Screen and Sensors
|
||||
static const uint8_t SDA = 47;
|
||||
static const uint8_t SCL = 48;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t MISO = 8;
|
||||
static const uint8_t SCK = 7;
|
||||
static const uint8_t MOSI = 9;
|
||||
static const uint8_t SS = 41;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
19
variants/esp32s3/seeed_xiao_s3/platformio.ini
Normal file
19
variants/esp32s3/seeed_xiao_s3/platformio.ini
Normal file
@@ -0,0 +1,19 @@
|
||||
[env:seeed-xiao-s3]
|
||||
extends = esp32s3_base
|
||||
board = seeed-xiao-s3
|
||||
board_level = pr
|
||||
board_check = true
|
||||
board_build.partitions = default_8MB.csv
|
||||
upload_protocol = esptool
|
||||
upload_speed = 921600
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
build_unflags =
|
||||
${esp32s3_base.build_unflags}
|
||||
-DARDUINO_USB_MODE=1
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D SEEED_XIAO_S3
|
||||
-I variants/esp32s3/seeed_xiao_s3
|
||||
-DBOARD_HAS_PSRAM
|
||||
-DARDUINO_USB_MODE=0
|
||||
90
variants/esp32s3/seeed_xiao_s3/variant.h
Normal file
90
variants/esp32s3/seeed_xiao_s3/variant.h
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄
|
||||
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌
|
||||
▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌
|
||||
▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
|
||||
▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌
|
||||
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌
|
||||
▀▀▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌ ▐░▌
|
||||
▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
|
||||
▄▄▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌
|
||||
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌
|
||||
▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀
|
||||
|
||||
▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄
|
||||
▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
|
||||
▐░▌ ▐░▌ ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌ ▐░█▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀█░▌
|
||||
▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌
|
||||
▐░▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄█░▌
|
||||
▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
|
||||
▐░▌░▌ ▐░▌ ▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌ ▀▀▀▀▀▀▀▀▀█░▌ ▀▀▀▀▀▀▀▀▀█░▌
|
||||
▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌
|
||||
▐░▌ ▐░▌ ▄▄▄▄█░█▄▄▄▄ ▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌
|
||||
▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
|
||||
▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀
|
||||
*/
|
||||
|
||||
/*
|
||||
Board Information: https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html
|
||||
Expansion Board Infomation : https://www.seeedstudio.com/Seeeduino-XIAO-Expansion-board-p-4746.html
|
||||
L76K GPS Module Information : https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html
|
||||
*/
|
||||
|
||||
#define LED_PIN 48
|
||||
#define LED_STATE_ON 1 // State when LED is lit
|
||||
|
||||
#define BUTTON_PIN 21 // This is the Program Button
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
#define BATTERY_PIN -1
|
||||
#define ADC_CHANNEL ADC1_GPIO1_CHANNEL
|
||||
#define BATTERY_SENSE_RESOLUTION_BITS 12
|
||||
|
||||
/*Warning:
|
||||
https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html
|
||||
L76K Expansion Board can not directly used, L76K Reset Pin needs to override or physically remove it,
|
||||
otherwise it will conflict with the SPI pins
|
||||
*/
|
||||
#define GPS_L76K
|
||||
#ifdef GPS_L76K
|
||||
#define GPS_RX_PIN 44
|
||||
#define GPS_TX_PIN 43
|
||||
#define HAS_GPS 1
|
||||
#define GPS_BAUDRATE 9600
|
||||
#define GPS_THREAD_INTERVAL 50
|
||||
#define PIN_SERIAL1_RX PIN_GPS_TX
|
||||
#define PIN_SERIAL1_TX PIN_GPS_RX
|
||||
#define PIN_GPS_STANDBY 1
|
||||
#endif
|
||||
|
||||
// XIAO S3 Expansion board has 1.3 inch OLED Screen
|
||||
#define USCREEN_SSD1306
|
||||
|
||||
#define I2C_SDA 5
|
||||
#define I2C_SCL 6
|
||||
|
||||
// XIAO S3 LORA module
|
||||
#define USE_SX1262
|
||||
|
||||
#define LORA_MISO 8
|
||||
#define LORA_SCK 7
|
||||
#define LORA_MOSI 9
|
||||
#define LORA_CS 41
|
||||
|
||||
#define LORA_RESET 42
|
||||
#define LORA_DIO1 39
|
||||
|
||||
#define LORA_DIO2 38
|
||||
|
||||
#ifdef USE_SX1262
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY 40
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_RXEN 38
|
||||
#define SX126X_TXEN RADIOLIB_NC
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
#endif
|
||||
21
variants/esp32s3/station-g2/pins_arduino.h
Executable file
21
variants/esp32s3/station-g2/pins_arduino.h
Executable file
@@ -0,0 +1,21 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x1001
|
||||
|
||||
// GPIO48 Reference: https://github.com/espressif/arduino-esp32/pull/8600
|
||||
|
||||
// The default Wire will be mapped to Screen and Sensors
|
||||
static const uint8_t SDA = 5;
|
||||
static const uint8_t SCL = 6;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t MISO = 14;
|
||||
static const uint8_t SCK = 12;
|
||||
static const uint8_t MOSI = 13;
|
||||
static const uint8_t SS = 11;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
22
variants/esp32s3/station-g2/platformio.ini
Executable file
22
variants/esp32s3/station-g2/platformio.ini
Executable file
@@ -0,0 +1,22 @@
|
||||
[env:station-g2]
|
||||
extends = esp32s3_base
|
||||
board = station-g2
|
||||
board_level = pr
|
||||
board_check = true
|
||||
board_build.partitions = default_16MB.csv
|
||||
board_build.mcu = esp32s3
|
||||
upload_protocol = esptool
|
||||
;upload_port = /dev/ttyACM0
|
||||
upload_speed = 921600
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
build_unflags =
|
||||
${esp32s3_base.build_unflags}
|
||||
-DARDUINO_USB_MODE=1
|
||||
build_flags =
|
||||
${esp32s3_base.build_flags}
|
||||
-D STATION_G2
|
||||
-I variants/esp32s3/station-g2
|
||||
-DBOARD_HAS_PSRAM
|
||||
-DSTATION_G2
|
||||
-DARDUINO_USB_MODE=0
|
||||
54
variants/esp32s3/station-g2/variant.h
Executable file
54
variants/esp32s3/station-g2/variant.h
Executable file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
Board Information: https://wiki.uniteng.com/en/meshtastic/station-g2
|
||||
*/
|
||||
|
||||
// Station G2 may not have GPS installed, but it has a GROVE GPS Socket for Optional GPS Module
|
||||
#define GPS_RX_PIN 7
|
||||
#define GPS_TX_PIN 15
|
||||
|
||||
// Station G2 has 1.3 inch OLED Screen
|
||||
#define USE_SH1107_128_64
|
||||
|
||||
#define I2C_SDA 5 // I2C pins for this board
|
||||
#define I2C_SCL 6
|
||||
|
||||
#define BUTTON_PIN 38 // This is the Program Button
|
||||
#define BUTTON_NEED_PULLUP
|
||||
|
||||
#define USE_SX1262
|
||||
|
||||
#define LORA_MISO 14
|
||||
#define LORA_SCK 12
|
||||
#define LORA_MOSI 13
|
||||
#define LORA_CS 11
|
||||
|
||||
#define LORA_RESET 21
|
||||
#define LORA_DIO1 48
|
||||
|
||||
#ifdef USE_SX1262
|
||||
#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY 47
|
||||
#define SX126X_RESET LORA_RESET
|
||||
|
||||
// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
|
||||
// Ensure the PA does not exceed the saturation output power. More
|
||||
// Info:https://wiki.uniteng.com/en/meshtastic/station-g2#summary-for-lora-power-amplifier-conduction-test
|
||||
#define SX126X_MAX_POWER 19
|
||||
#endif
|
||||
|
||||
/*
|
||||
#define BATTERY_PIN 4 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
#define ADC_CHANNEL ADC1_GPIO4_CHANNEL
|
||||
#define ADC_MULTIPLIER 4
|
||||
#define BATTERY_SENSE_SAMPLES 15 // Set the number of samples, It has an effect of increasing sensitivity.
|
||||
#define BAT_FULLVOLT 8400
|
||||
#define BAT_EMPTYVOLT 5000
|
||||
#define BAT_CHARGINGVOLT 8400
|
||||
#define BAT_NOBATVOLT 4460
|
||||
#define CELL_TYPE_LION // same curve for liion/lipo
|
||||
#define NUM_CELLS 2
|
||||
*/
|
||||
19
variants/esp32s3/t-deck-pro/pins_arduino.h
Normal file
19
variants/esp32s3/t-deck-pro/pins_arduino.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define USB_VID 0x303a
|
||||
#define USB_PID 0x1001
|
||||
|
||||
// used for keyboard, touch controller, beam sensor, and gyroscope
|
||||
static const uint8_t SDA = 13;
|
||||
static const uint8_t SCL = 14;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t SS = 3;
|
||||
static const uint8_t MOSI = 33;
|
||||
static const uint8_t MISO = 47;
|
||||
static const uint8_t SCK = 36;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
24
variants/esp32s3/t-deck-pro/platformio.ini
Normal file
24
variants/esp32s3/t-deck-pro/platformio.ini
Normal file
@@ -0,0 +1,24 @@
|
||||
[env:t-deck-pro]
|
||||
extends = esp32s3_base
|
||||
board = t-deck-pro
|
||||
board_check = true
|
||||
upload_protocol = esptool
|
||||
|
||||
build_flags =
|
||||
${esp32_base.build_flags} -I variants/esp32s3/t-deck-pro
|
||||
-D T_DECK_PRO
|
||||
-D GPS_POWER_TOGGLE
|
||||
-D USE_EINK
|
||||
-D EINK_DISPLAY_MODEL=GxEPD2_310_GDEQ031T10
|
||||
-D EINK_WIDTH=240
|
||||
-D EINK_HEIGHT=320
|
||||
;-D USE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
||||
-D EINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted
|
||||
-D EINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated
|
||||
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
https://github.com/ZinggJM/GxEPD2/archive/refs/tags/1.6.4.zip
|
||||
https://github.com/CIRCUITSTATE/CSE_Touch/archive/b44f23b6f870b848f1fbe453c190879bc6cfaafa.zip
|
||||
https://github.com/CIRCUITSTATE/CSE_CST328/archive/refs/tags/v0.0.4.zip
|
||||
https://github.com/mverch67/BQ27220/archive/07d92be846abd8a0258a50c23198dac0858b22ed.zip
|
||||
94
variants/esp32s3/t-deck-pro/variant.h
Normal file
94
variants/esp32s3/t-deck-pro/variant.h
Normal file
@@ -0,0 +1,94 @@
|
||||
// Display (E-Ink)
|
||||
#define PIN_EINK_CS 34
|
||||
#define PIN_EINK_BUSY 37
|
||||
#define PIN_EINK_DC 35
|
||||
#define PIN_EINK_RES -1
|
||||
#define PIN_EINK_SCLK 36
|
||||
#define PIN_EINK_MOSI 47
|
||||
|
||||
#define I2C_SDA SDA
|
||||
#define I2C_SCL SCL
|
||||
|
||||
// CST328 touch screen (implementation in src/platform/extra_variants/t_deck_pro/variant.cpp)
|
||||
#define HAS_TOUCHSCREEN 1
|
||||
#define CST328_PIN_INT 12
|
||||
#define CST328_PIN_RST 45
|
||||
|
||||
#define USE_POWERSAVE
|
||||
#define SLEEP_TIME 120
|
||||
|
||||
// GNNS
|
||||
#define HAS_GPS 1
|
||||
#define GPS_BAUDRATE 38400
|
||||
#define PIN_GPS_EN 15
|
||||
#define GPS_EN_ACTIVE 1
|
||||
#define GPS_RX_PIN 44
|
||||
#define GPS_TX_PIN 43
|
||||
#define PIN_GPS_PPS 1
|
||||
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
// vibration motor
|
||||
#define PIN_VIBRATION 2
|
||||
|
||||
// Have SPI interface SD card slot
|
||||
#define HAS_SDCARD
|
||||
#define SDCARD_USE_SPI1
|
||||
#define SPI_MOSI (33)
|
||||
#define SPI_SCK (36)
|
||||
#define SPI_MISO (47)
|
||||
#define SPI_CS (48)
|
||||
#define SDCARD_CS SPI_CS
|
||||
#define SD_SPI_FREQUENCY 75000000U
|
||||
|
||||
// TCA8418 keyboard
|
||||
#define KB_BL_PIN 42
|
||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||
|
||||
// microphone PCM5102A
|
||||
#define PCM5102A_SCK 47
|
||||
#define PCM5102A_DIN 17
|
||||
#define PCM5102A_LRCK 18
|
||||
|
||||
// LTR_553ALS light sensor
|
||||
#define HAS_LTR553ALS
|
||||
|
||||
// gyroscope BHI260AP
|
||||
#define BOARD_1V8_EN 38
|
||||
#define HAS_BHI260AP
|
||||
|
||||
// battery charger BQ25896
|
||||
#define HAS_PPM 1
|
||||
#define XPOWERS_CHIP_BQ25896
|
||||
|
||||
// battery quality management BQ27220
|
||||
#define HAS_BQ27220 1
|
||||
#define BQ27220_I2C_SDA SDA
|
||||
#define BQ27220_I2C_SCL SCL
|
||||
#define BQ27220_DESIGN_CAPACITY 1400
|
||||
|
||||
// LoRa
|
||||
#define USE_SX1262
|
||||
#define USE_SX1268
|
||||
|
||||
#define LORA_EN 46 // LoRa enable pin
|
||||
#define LORA_SCK 36
|
||||
#define LORA_MISO 47
|
||||
#define LORA_MOSI 33
|
||||
#define LORA_CS 3
|
||||
|
||||
#define LORA_DIO0 -1 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 4
|
||||
#define LORA_DIO1 5 // SX1262 IRQ
|
||||
#define LORA_DIO2 6 // SX1262 BUSY
|
||||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
||||
|
||||
#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET LORA_RESET
|
||||
// Not really an E22 but TTGO seems to be trying to clone that
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 2.4
|
||||
// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface
|
||||
// code)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user