mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-06 09:57:52 +00:00
Merge branch 'master' into apollo
This commit is contained in:
@@ -10,6 +10,5 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/canaryone
|
||||
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/canaryone>
|
||||
lib_deps =
|
||||
${nrf52840_base.lib_deps}
|
||||
adafruit/Adafruit BusIO@^1.13.2
|
||||
lewisxhe/PCF8563_Library@^1.0.1
|
||||
;upload_protocol = fs
|
||||
|
||||
@@ -103,6 +103,9 @@ static const uint8_t A0 = PIN_A0;
|
||||
#define EXTERNAL_FLASH_DEVICES MX25R1635F
|
||||
#define EXTERNAL_FLASH_USE_QSPI
|
||||
|
||||
// Add a delay on startup to allow LoRa and GPS to power up
|
||||
#define PIN_PWR_DELAY_MS 100
|
||||
|
||||
/*
|
||||
* Lora radio
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define LED_PIN 18 // LED
|
||||
#define LED_INVERTED 1
|
||||
|
||||
#define HAS_SCREEN 0
|
||||
#define HAS_SCREEN 1
|
||||
#define HAS_GPS 0
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
|
||||
@@ -16,7 +16,6 @@ build_flags =
|
||||
-D EINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
https://github.com/meshtastic/GxEPD2
|
||||
adafruit/Adafruit BusIO@^1.13.2
|
||||
https://github.com/meshtastic/GxEPD2#55f618961db45a23eff0233546430f1e5a80f63a
|
||||
lewisxhe/PCF8563_Library@^1.0.1
|
||||
upload_speed = 115200
|
||||
@@ -5,7 +5,6 @@
|
||||
#define I2C_SCL SCL
|
||||
|
||||
#define USE_EINK
|
||||
#define EINK_NO_HIBERNATE
|
||||
|
||||
/*
|
||||
* eink display pins
|
||||
|
||||
@@ -16,7 +16,6 @@ build_flags =
|
||||
;-D EINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
|
||||
lib_deps =
|
||||
${esp32s3_base.lib_deps}
|
||||
https://github.com/meshtastic/GxEPD2/
|
||||
adafruit/Adafruit BusIO@^1.13.2
|
||||
https://github.com/meshtastic/GxEPD2#55f618961db45a23eff0233546430f1e5a80f63a
|
||||
lewisxhe/PCF8563_Library@^1.0.1
|
||||
upload_speed = 115200
|
||||
@@ -9,6 +9,5 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/nano-g2-ultra -D NANO_G2_U
|
||||
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nano-g2-ultra>
|
||||
lib_deps =
|
||||
${nrf52840_base.lib_deps}
|
||||
adafruit/Adafruit BusIO@^1.13.2
|
||||
lewisxhe/PCF8563_Library@^1.0.1
|
||||
;upload_protocol = fs
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
[env:native]
|
||||
extends = portduino_base
|
||||
build_flags = ${portduino_base.build_flags} -O0 -I variants/portduino
|
||||
; The pkg-config commands below optionally add link flags.
|
||||
; the || : is just a "or run the null command" to avoid returning an error code
|
||||
build_flags = ${portduino_base.build_flags} -O0 -I variants/portduino -I /usr/include
|
||||
!pkg-config --libs libulfius --silence-errors || :
|
||||
!pkg-config --libs openssl --silence-errors || :
|
||||
board = cross_platform
|
||||
lib_deps = ${portduino_base.lib_deps}
|
||||
build_src_filter = ${portduino_base.build_src_filter}
|
||||
build_src_filter = ${portduino_base.build_src_filter}
|
||||
|
||||
@@ -133,10 +133,6 @@ static const uint8_t SCK = PIN_SPI_SCK;
|
||||
#define PIN_EINK_SCLK (0 + 3)
|
||||
#define PIN_EINK_MOSI (0 + 30) // also called SDI
|
||||
|
||||
// Controls power for the eink display - Board power is enabled either by VBUS from USB or the CPU asserting PWR_ON
|
||||
// FIXME - I think this is actually just the board power enable - it enables power to the CPU also
|
||||
// #define PIN_EINK_PWR_ON (-1)
|
||||
|
||||
// #define USE_EINK
|
||||
|
||||
// RAKRGB
|
||||
|
||||
@@ -133,10 +133,6 @@ static const uint8_t SCK = PIN_SPI_SCK;
|
||||
#define PIN_EINK_SCLK (0 + 3)
|
||||
#define PIN_EINK_MOSI (0 + 30) // also called SDI
|
||||
|
||||
// Controls power for the eink display - Board power is enabled either by VBUS from USB or the CPU asserting PWR_ON
|
||||
// FIXME - I think this is actually just the board power enable - it enables power to the CPU also
|
||||
// #define PIN_EINK_PWR_ON (-1)
|
||||
|
||||
// #define USE_EINK
|
||||
|
||||
// RAKRGB
|
||||
|
||||
@@ -133,10 +133,6 @@ static const uint8_t SCK = PIN_SPI_SCK;
|
||||
#define PIN_EINK_SCLK (0 + 3)
|
||||
#define PIN_EINK_MOSI (0 + 30) // also called SDI
|
||||
|
||||
// Controls power for the eink display - Board power is enabled either by VBUS from USB or the CPU asserting PWR_ON
|
||||
// FIXME - I think this is actually just the board power enable - it enables power to the CPU also
|
||||
// #define PIN_EINK_PWR_ON (-1)
|
||||
|
||||
#define USE_EINK
|
||||
|
||||
// RAKRGB
|
||||
|
||||
@@ -119,10 +119,6 @@ static const uint8_t SCK = PIN_SPI_SCK;
|
||||
#define PIN_EINK_SCLK (0 + 14) // SCL
|
||||
#define PIN_EINK_MOSI (0 + 13) // SDA
|
||||
|
||||
// Controls power for the eink display - Board power is enabled either by VBUS from USB or the CPU asserting PWR_ON
|
||||
// FIXME - I think this is actually just the board power enable - it enables power to the CPU also
|
||||
// #define PIN_EINK_PWR_ON (-1)
|
||||
|
||||
// RAKRGB
|
||||
#define HAS_NCP5623
|
||||
|
||||
|
||||
28
variants/rpipico-slowclock/platformio.ini
Normal file
28
variants/rpipico-slowclock/platformio.ini
Normal file
@@ -0,0 +1,28 @@
|
||||
[env:pico_slowclock]
|
||||
extends = rp2040_base
|
||||
board = rpipico
|
||||
upload_protocol = jlink
|
||||
# debug settings for external openocd with RP2040 support (custom build)
|
||||
debug_tool = custom
|
||||
debug_init_cmds =
|
||||
target extended-remote localhost:3333
|
||||
$INIT_BREAK
|
||||
monitor reset halt
|
||||
$LOAD_CMDS
|
||||
monitor init
|
||||
monitor reset halt
|
||||
|
||||
# add our variants files to the include and src paths
|
||||
build_flags = ${rp2040_base.build_flags}
|
||||
-DRPI_PICO
|
||||
-Ivariants/rpipico_slowclock
|
||||
-DDEBUG_RP2040_PORT=Serial2
|
||||
-DHW_SPI1_DEVICE
|
||||
-L "${platformio.libdeps_dir}/${this.__env__}/BSEC2 Software Library/src/cortex-m0plus"
|
||||
-g
|
||||
-DNO_USB
|
||||
lib_deps =
|
||||
${rp2040_base.lib_deps}
|
||||
debug_build_flags = ${rp2040_base.build_flags}
|
||||
-g
|
||||
-DNO_USB
|
||||
87
variants/rpipico-slowclock/variant.h
Normal file
87
variants/rpipico-slowclock/variant.h
Normal file
@@ -0,0 +1,87 @@
|
||||
#define ARDUINO_ARCH_AVR
|
||||
|
||||
// Build with slow system clock enabled to reduce power consumption.
|
||||
#define RP2040_SLOW_CLOCK
|
||||
|
||||
#ifdef RP2040_SLOW_CLOCK
|
||||
// Redefine UART1 serial log output to avoid collision with UART0 for GPS.
|
||||
#define SERIAL2_TX 4
|
||||
#define SERIAL2_RX 5
|
||||
// Reroute log output in SensorLib when USB is not available
|
||||
#define log_e(...) Serial2.printf(__VA_ARGS__)
|
||||
#define log_i(...) Serial2.printf(__VA_ARGS__)
|
||||
#define log_d(...) Serial2.printf(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
// Expecting the Waveshare Pico GPS hat
|
||||
#define HAS_GPS 1
|
||||
|
||||
// Enable OLED Screen
|
||||
#define HAS_SCREEN 1
|
||||
#define USE_SH1106 1
|
||||
#define RESET_OLED 13
|
||||
|
||||
// Redefine I2C0 pins to avoid collision with UART1/Serial2.
|
||||
#define I2C_SDA 8
|
||||
#define I2C_SCL 9
|
||||
|
||||
// Redefine Waveshare UPS-A/B I2C_1 pins:
|
||||
#define I2C_SDA1 6
|
||||
#define I2C_SCL1 7
|
||||
// Waveshare UPS-A/B uses a 0.01 Ohm shunt for the INA219 sensor
|
||||
#define INA219_MULTIPLIER 10.0f
|
||||
|
||||
// Waveshare Pico GPS L76B pins:
|
||||
#define GPS_RX_PIN 1
|
||||
#define GPS_TX_PIN 0
|
||||
|
||||
// Wakeup from backup mode
|
||||
// #define PIN_GPS_FORCE_ON 14
|
||||
// No GPS reset available
|
||||
#undef PIN_GPS_RESET
|
||||
/*
|
||||
* For PPS output the resistor R20 needs to be populated with 0 Ohm
|
||||
* on the Waveshare Pico GPS board.
|
||||
*/
|
||||
#define PIN_GPS_PPS 16
|
||||
/*
|
||||
* For standby mode switching the resistor R18 needs to be populated
|
||||
* with 0 Ohm on the Waveshare Pico GPS board.
|
||||
*/
|
||||
#define PIN_GPS_STANDBY 17
|
||||
|
||||
#define BUTTON_PIN 18
|
||||
#define EXT_NOTIFY_OUT 22
|
||||
#define LED_PIN PIN_LED
|
||||
|
||||
#define BATTERY_PIN 26
|
||||
// ratio of voltage divider = 3.0 (R17=200k, R18=100k)
|
||||
#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic
|
||||
#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION
|
||||
|
||||
#define USE_SX1262
|
||||
|
||||
#undef LORA_SCK
|
||||
#undef LORA_MISO
|
||||
#undef LORA_MOSI
|
||||
#undef LORA_CS
|
||||
|
||||
#define LORA_SCK 10
|
||||
#define LORA_MISO 12
|
||||
#define LORA_MOSI 11
|
||||
#define LORA_CS 3
|
||||
|
||||
#define LORA_DIO0 RADIOLIB_NC
|
||||
#define LORA_RESET 15
|
||||
#define LORA_DIO1 20
|
||||
#define LORA_DIO2 2
|
||||
#define LORA_DIO3 RADIOLIB_NC
|
||||
|
||||
#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
|
||||
@@ -11,10 +11,15 @@ build_flags = ${nrf52840_base.build_flags} -Ivariants/t-echo
|
||||
-DEINK_DISPLAY_MODEL=GxEPD2_154_D67
|
||||
-DEINK_WIDTH=200
|
||||
-DEINK_HEIGHT=200
|
||||
-DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
||||
-DEINK_LIMIT_FASTREFRESH=20 ; How many consecutive fast-refreshes are permitted
|
||||
-DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates
|
||||
-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates
|
||||
-DEINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated
|
||||
-DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
|
||||
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/t-echo>
|
||||
lib_deps =
|
||||
${nrf52840_base.lib_deps}
|
||||
https://github.com/meshtastic/GxEPD2#afce87a97dda1ac31d8a28dc8fa7c6f55dc96a61
|
||||
adafruit/Adafruit BusIO@^1.13.2
|
||||
https://github.com/meshtastic/GxEPD2#55f618961db45a23eff0233546430f1e5a80f63a
|
||||
lewisxhe/PCF8563_Library@^1.0.1
|
||||
;upload_protocol = fs
|
||||
|
||||
@@ -156,9 +156,9 @@ External serial flash WP25R1635FZUIL0
|
||||
#define PIN_EINK_SCLK (0 + 31)
|
||||
#define PIN_EINK_MOSI (0 + 29) // also called SDI
|
||||
|
||||
// Controls power for the eink display - Board power is enabled either by VBUS from USB or the CPU asserting PWR_ON
|
||||
// FIXME - I think this is actually just the board power enable - it enables power to the CPU also
|
||||
#define PIN_EINK_PWR_ON (0 + 12)
|
||||
// Controls power for all peripherals (eink + GPS + LoRa + Sensor)
|
||||
#define PIN_POWER_EN (0 + 12)
|
||||
// #define PIN_POWER_EN1 (0 + 13)
|
||||
|
||||
#define USE_EINK
|
||||
|
||||
|
||||
Reference in New Issue
Block a user