Merge branch 'master' into raspi-portduino

This commit is contained in:
Thomas Göttgens
2023-08-09 11:19:23 +02:00
committed by GitHub
60 changed files with 1120 additions and 350 deletions

View File

@@ -4,6 +4,10 @@
#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

View File

@@ -1,5 +1,9 @@
#define LED_PIN 18
// Enable bus for external periherals
#define I2C_SDA SDA
#define I2C_SCL SCL
#define USE_EINK
/*
* eink display pins

View File

@@ -8,4 +8,4 @@ build_flags =
lib_deps =
${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.7
lovyan03/LovyanGFX@^1.1.8

View File

@@ -1,5 +1,5 @@
#define I2C_SCL 47
#define I2C_SDA 48
#define I2C_SCL SCL
#define I2C_SDA SDA
#define LED_PIN LED

View File

@@ -2,8 +2,6 @@
extends = esp32_base
board = m5stack-core-esp32
board_level = extra
upload_port = COM8
monitor_port = COM8
monitor_filters = esp32_exception_decoder
build_src_filter =
${esp32_base.build_src_filter}
@@ -28,4 +26,4 @@ lib_ignore =
m5stack-core
lib_deps =
${esp32_base.lib_deps}
bodmer/TFT_eSPI@^2.4.76
lovyan03/LovyanGFX@^1.1.8

View File

@@ -34,8 +34,13 @@
#define GPS_RX_PIN 16
#define GPS_TX_PIN 17
// Define if screen should be mirrored left to right
#define SCREEN_ROTATE
#define TFT_HEIGHT 240
#define TFT_WIDTH 320
#define TFT_OFFSET_X 0
#define TFT_OFFSET_Y 0
#define TFT_BUSY -1
// LCD screens are slow, so slowdown the wipe so it looks better
#define SCREEN_TRANSITION_FRAMERATE 1 // fps
#define ILI9341_SPI_HOST VSPI_HOST // VSPI_HOST or HSPI_HOST

View File

@@ -39,7 +39,9 @@
#undef RF95_MOSI
#undef RF95_NSS
#define USE_RF95
//#define USE_SX1280
#ifdef USE_RF95
#define RF95_SCK 18
#define RF95_MISO 34
#define RF95_MOSI 23
@@ -48,6 +50,22 @@
#define LORA_RESET 26
#define LORA_DIO1 RADIOLIB_NC
#define LORA_DIO2 RADIOLIB_NC
#endif
#ifdef USE_SX1280
#define RF95_SCK 18
#define RF95_MISO 34
#define RF95_MOSI 23
#define RF95_NSS 14
#define LORA_RESET 26
#define LORA_DIO1 25
#define LORA_DIO2 13
#define SX128X_CS RF95_NSS
#define SX128X_DIO1 LORA_DIO1
#define SX128X_BUSY LORA_DIO2
#define SX128X_RESET LORA_RESET
#define SX128X_MAX_POWER 13 // 10
#endif
#define USE_EINK
// https://docs.m5stack.com/en/core/coreink
@@ -59,3 +77,18 @@
#define PIN_EINK_RES -1 // Connected but not needed
#define PIN_EINK_SCLK 18 // EPD_SCLK
#define PIN_EINK_MOSI 23 // EPD_MOSI
#define BATTERY_PIN 35
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
// https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/m5paper/M5_PAPER_SCH.pdf
// https://github.com/m5stack/M5Core-Ink/blob/master/examples/Basics/FactoryTest/FactoryTest.ino#L58
// VBAT
// |
// R83 (3K)
// +
// R86 (11K)
// |
// GND
// https://github.com/m5stack/M5Core-Ink/blob/master/examples/Basics/FactoryTest/FactoryTest.ino#L58
#define ADC_MULTIPLIER 5 // Just a guess for now... more detailed getBatVoltage above
// https://embeddedexplorer.com/esp32-adc-esp-idf-tutorial/

View File

@@ -4,10 +4,6 @@ extends = nrf52840_base
board = nano-g2-ultra
debug_tool = jlink
# add our variants files to the include and src paths
# define build flags for the TFT_eSPI library - NOTE: WE NOT LONGER USE TFT_eSPI, it was for an earlier version of the TTGO eink screens
# -DBUSY_PIN=3 -DRST_PIN=2 -DDC_PIN=28 -DCS_PIN=30
# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.
build_flags = ${nrf52840_base.build_flags} -Ivariants/nano-g2-ultra -D NANO_G2_ULTRA
-L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard"
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nano-g2-ultra>

View File

@@ -114,9 +114,8 @@ External serial flash W25Q16JV_IQ
#define SX126X_CS (32 + 13) // FIXME - we really should define LORA_CS instead
#define SX126X_DIO1 (32 + 10)
// Note DIO2 is attached internally to the module to an analog switch for TX/RX switching
//#define SX1262_DIO3 \
(0 + 21) // This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the main
// CPU?
//#define SX1262_DIO3 (0 + 21)
// This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the main CPU?
#define SX126X_BUSY (32 + 11)
#define SX126X_RESET (32 + 15)
#define SX126X_E22 // DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3

View File

@@ -0,0 +1,30 @@
#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 = 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 */

View File

@@ -0,0 +1,17 @@
[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 =
${esp32s3_base.build_flags}
-DPICOMPUTER_S3
-I variants/picomputer-s3
lib_deps =
${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.8

View File

@@ -0,0 +1,55 @@
#undef GPS_RX_PIN
#undef GPS_TX_PIN
#define BUTTON_PIN 0
#define PIN_BUZZER 43
#define HAS_GPS 0
#define HAS_WIRE 0
#define USE_RF95 // RFM95/SX127x
#define RF95_SCK SCK // 21
#define RF95_MISO MISO // 39
#define RF95_MOSI MOSI // 38
#define RF95_NSS 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 ST7789_BACKLIGHT_EN 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
#define INPUTBROKER_MATRIX_TYPE 1
#define KEYS_COLS \
{ \
44, 47, 17, 15, 13, 41 \
}
#define KEYS_ROWS \
{ \
12, 16, 42, 18, 14, 7 \
}

View File

@@ -11,4 +11,4 @@ build_flags = ${esp32_base.build_flags}
-Ivariants/t-deck
lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.7
lovyan03/LovyanGFX@^1.1.8

View File

@@ -15,6 +15,7 @@
#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

View File

@@ -4,9 +4,6 @@ extends = nrf52840_base
board = t-echo
debug_tool = jlink
# add our variants files to the include and src paths
# define build flags for the TFT_eSPI library - NOTE: WE NOT LONGER USE TFT_eSPI, it was for an earlier version of the TTGO eink screens
# -DBUSY_PIN=3 -DRST_PIN=2 -DDC_PIN=28 -DCS_PIN=30
# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.
build_flags = ${nrf52840_base.build_flags} -Ivariants/t-echo
-L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m4/fpv4-sp-d16-hard"

View File

@@ -12,6 +12,6 @@ build_flags = ${esp32_base.build_flags}
-DPCF8563_RTC=0x51
lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.7
lovyan03/LovyanGFX@^1.1.8
lewisxhe/PCF8563_Library@1.0.1
adafruit/Adafruit DRV2605 Library@^1.2.2

View File

@@ -15,6 +15,7 @@
#define TFT_WIDTH 240
#define TFT_OFFSET_X 0
#define TFT_OFFSET_Y 0
#define TFT_OFFSET_ROTATION 2
#define SCREEN_ROTATE
#define SCREEN_TRANSITION_FRAMERATE 5 // fps