Add variant an plumbing for #2468

This commit is contained in:
Thomas Göttgens
2023-05-15 17:17:14 +02:00
parent ffa85ebccd
commit 62259583e6
7 changed files with 96 additions and 8 deletions

View File

@@ -0,0 +1,37 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#define USB_VID 0x303a
#define USB_PID 0x1001
#define EXTERNAL_NUM_INTERRUPTS 46
#define NUM_DIGITAL_PINS 48
#define NUM_ANALOG_INPUTS 20
#define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1)
#define digitalPinToInterrupt(p) (((p) < 48) ? (p) : -1)
#define digitalPinHasPWM(p) (p < 46)
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 */

View File

@@ -0,0 +1,27 @@
[env:picomputer_s3]
extends = esp32s3_base
board = bpi_picow_esp32_s3
board_level = extra
;OpenOCD flash method
;upload_protocol = esp-builtin
;Normal method
upload_protocol = esptool
build_flags =
${esp32_base.build_flags}
-D PRIVATE_HW
-I variants/picomputer-s3
-DST7789_DRIVER
-DUSER_SETUP_LOADED
-DTFT_SDA_READ
-DTFT_MOSI=19
-DTFT_MISO=-1
-DTFT_SCLK=18
-DTFT_CS=21
-DTFT_DC=16
-DTFT_BL=20
-DDISABLE_ALL_LIBRARY_WARNINGS
lib_deps =
${esp32_base.lib_deps}
bodmer/TFT_eSPI@^2.4.76

View File

@@ -0,0 +1,24 @@
#define HAS_GPS 0
#undef GPS_RX_PIN
#undef GPS_TX_PIN
#define USE_ST7789
#define LED_PIN 48 // 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 // RFM95/SX127x
#define RF95_SCK 10
#define RF95_MISO 12
#define RF95_MOSI 11
#define RF95_NSS 13
#define LORA_RESET RADIOLIB_NC
// per SX1276_Receive_Interrupt/utilities.h
#define LORA_DIO0 28
#define LORA_DIO1 RADIOLIB_NC
#define LORA_DIO2 RADIOLIB_NC