Merge branch 'master' into usbhost

This commit is contained in:
Thomas Göttgens
2024-09-04 14:45:21 +02:00
committed by GitHub
333 changed files with 32304 additions and 3244 deletions

View File

@@ -101,7 +101,7 @@
// Status
#define LED_PIN 1
#define LED_INVERTED 0
#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

View File

@@ -0,0 +1,15 @@
[env:ME25LS01-4Y10TD]
extends = nrf52840_base
board = me25ls01-4y10td
board_level = extra
; platform = https://github.com/maxgerhardt/platform-nordicnrf52#cac6fcf943a41accd2aeb4f3659ae297a73f422e
build_flags = ${nrf52840_base.build_flags} -Ivariants/ME25LS01-4Y10TD -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 -DME25LS01_4Y10TD ;-DRADIOLIB_GODMODE
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/ME25LS01-4Y10TD>
lib_deps =
${nrf52840_base.lib_deps}
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
upload_protocol = nrfutil
upload_port = /dev/ttyACM1

View File

@@ -0,0 +1,40 @@
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry All right reserved.
Copyright (c) 2018, Adafruit Industries (adafruit.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "variant.h"
#include "nrf.h"
#include "wiring_constants.h"
#include "wiring_digital.h"
const uint32_t g_ADigitalPinMap[] = {
// P0
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
// P1
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};
void initVariant()
{
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH);
}

View File

@@ -0,0 +1,139 @@
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry All right reserved.
Copyright (c) 2018, Adafruit Industries (adafruit.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _VARIANT_ME25LS01_4Y10TD_
#define _VARIANT_ME25LS01_4Y10TD_
#define ME25LS01
/** Master clock frequency */
#define VARIANT_MCK (64000000ul)
#define USE_LFXO // Board uses 32khz crystal for LF
/*----------------------------------------------------------------------------
* Headers
*----------------------------------------------------------------------------*/
#include "WVariant.h"
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
// Number of pins defined in PinDescription array
#define PINS_COUNT (48)
#define NUM_DIGITAL_PINS (48)
#define NUM_ANALOG_INPUTS (6)
#define NUM_ANALOG_OUTPUTS (0)
// Use the native nrf52 usb power detection
#define NRF_APM
#define PIN_3V3_EN (32 + 5) //-1
#define PIN_3V3_ACC_EN -1
#define PIN_LED1 (32 + 7) // P1.07 Blue D2
#define LED_PIN PIN_LED1
#define LED_BUILTIN -1
#define LED_BLUE -1
#define LED_STATE_ON 1 // State when LED is lit
#define BUTTON_PIN (0 + 27) // P0.27 K3
#define BUTTON_NEED_PULLUP
#define HAS_WIRE 1
#define WIRE_INTERFACES_COUNT 1
#define PIN_WIRE_SDA (0 + 15) // P0.15
#define PIN_WIRE_SCL (0 + 17) // P0.17
/*
* Serial interfaces
*/
#define PIN_SERIAL1_RX (0 + 14) // P0.14
#define PIN_SERIAL1_TX (0 + 13) // P0.13
#define PIN_SERIAL2_RX (0 + 17) // P0.17
#define PIN_SERIAL2_TX (0 + 16) // P0.16
#define SPI_INTERFACES_COUNT 1
#define PIN_SPI_MISO (0 + 29) // P0.20 // MISO
#define PIN_SPI_MOSI (0 + 2) // P0.02 // MOSI
#define PIN_SPI_SCK (32 + 15) // P1.15 // SCK
#define PIN_SPI_NSS (32 + 13) // P1.13 // NSS
#define LORA_RESET (32 + 11) // P1.11 // RST
#define LORA_DIO1 (32 + 12) // P1.12 // IRQ
#define LORA_DIO2 (32 + 10) // P1.10 // BUSY
#define LORA_SCK PIN_SPI_SCK
#define LORA_MISO PIN_SPI_MISO
#define LORA_MOSI PIN_SPI_MOSI
#define LORA_CS PIN_SPI_NSS
// supported modules list
#define USE_LR1110
#define LR1110_IRQ_PIN LORA_DIO1
#define LR1110_NRESER_PIN LORA_RESET
#define LR1110_BUSY_PIN LORA_DIO2
#define LR1110_SPI_NSS_PIN LORA_CS
#define LR1110_SPI_SCK_PIN LORA_SCK
#define LR1110_SPI_MOSI_PIN LORA_MOSI
#define LR1110_SPI_MISO_PIN LORA_MISO
#define LR11X0_DIO3_TCXO_VOLTAGE 1.6
#define LR11X0_DIO_AS_RF_SWITCH
#define LR11X0_DIO_RF_SWITCH_CONFIG 0x0f, 0x0, 0x09, 0x0B, 0x0A, 0x0, 0x4, 0x0
#define HAS_GPS 0
#define PIN_GPS_EN -1
#define GPS_EN_ACTIVE HIGH
#define PIN_GPS_RESET -1
#define GPS_VRTC_EN -1
#define GPS_SLEEP_INT -1
#define GPS_RTC_INT -1
#define GPS_RESETB_OUT -1
#define BATTERY_PIN -1
#define ADC_MULTIPLIER (2.0F)
#define ADC_RESOLUTION 14
#define BATTERY_SENSE_RESOLUTION_BITS 12
#undef AREF_VOLTAGE
#define AREF_VOLTAGE 3.0
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
// Buzzer
#define PIN_BUZZER (0 + 25)
#ifdef __cplusplus
}
#endif
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
#endif // _VARIANT_ME25LS01_4Y10TD_

View File

@@ -0,0 +1,19 @@
[env:ME25LS01-4Y10TD_e-ink]
extends = nrf52840_base
board = me25ls01-4y10td
board_level = extra
; platform = https://github.com/maxgerhardt/platform-nordicnrf52#cac6fcf943a41accd2aeb4f3659ae297a73f422e
build_flags = ${nrf52840_base.build_flags} -Ivariants/ME25LS01-4Y10TD_e-ink -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 -DME25LS01_4Y10TD ;-DRADIOLIB_GODMODE
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
-DEINK_DISPLAY_MODEL=GxEPD2_420_GDEY042T81
-DEINK_WIDTH=400
-DEINK_HEIGHT=300
board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/ME25LS01-4Y10TD_e-ink>
lib_deps =
${nrf52840_base.lib_deps}
zinggjm/GxEPD2@^1.5.8
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
upload_protocol = nrfutil
upload_port = /dev/ttyACM1

View File

@@ -0,0 +1,40 @@
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry All right reserved.
Copyright (c) 2018, Adafruit Industries (adafruit.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "variant.h"
#include "nrf.h"
#include "wiring_constants.h"
#include "wiring_digital.h"
const uint32_t g_ADigitalPinMap[] = {
// P0
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
// P1
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};
void initVariant()
{
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH);
}

View File

@@ -0,0 +1,162 @@
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry All right reserved.
Copyright (c) 2018, Adafruit Industries (adafruit.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _VARIANT_ME25LS01_4Y10TD_
#define _VARIANT_ME25LS01_4Y10TD_
#define ME25LS01
/** Master clock frequency */
#define VARIANT_MCK (64000000ul)
#define USE_LFXO // Board uses 32khz crystal for LF
/*----------------------------------------------------------------------------
* Headers
*----------------------------------------------------------------------------*/
#include "WVariant.h"
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
// Number of pins defined in PinDescription array
#define PINS_COUNT (48)
#define NUM_DIGITAL_PINS (48)
#define NUM_ANALOG_INPUTS (6)
#define NUM_ANALOG_OUTPUTS (0)
// Use the native nrf52 usb power detection
#define NRF_APM
#define PIN_3V3_EN (32 + 5) //-1
#define PIN_3V3_ACC_EN -1
#define PIN_LED1 (32 + 7) // P1.07 Blue D2
#define LED_PIN PIN_LED1
#define LED_BUILTIN -1
#define LED_BLUE -1
#define LED_STATE_ON 1 // State when LED is lit
#define BUTTON_PIN (0 + 27) // P0.27 K3
#define BUTTON_NEED_PULLUP
#define HAS_WIRE 1
#define WIRE_INTERFACES_COUNT 1
#define PIN_WIRE_SDA (0 + 15) // P0.15
#define PIN_WIRE_SCL (0 + 17) // P0.17
/*
* Serial interfaces
*/
#define PIN_SERIAL1_RX (0 + 14) // P0.14
#define PIN_SERIAL1_TX (0 + 13) // P0.13
#define PIN_SERIAL2_RX (0 + 17) // P0.17
#define PIN_SERIAL2_TX (0 + 16) // P0.16
#define SPI_INTERFACES_COUNT 2
// LoRa SPI
#define PIN_SPI_MISO (0 + 29) // P0.20 // MISO
#define PIN_SPI_MOSI (0 + 2) // P0.02 // MOSI
#define PIN_SPI_SCK (32 + 15) // P1.15 // SCK
#define PIN_SPI_NSS (32 + 13) // P1.13 // NSS
#define LORA_RESET (32 + 11) // P1.11 // RST
#define LORA_DIO1 (32 + 12) // P1.12 // IRQ
#define LORA_DIO2 (32 + 10) // P1.10 // BUSY
#define LORA_SCK PIN_SPI_SCK
#define LORA_MISO PIN_SPI_MISO
#define LORA_MOSI PIN_SPI_MOSI
#define LORA_CS PIN_SPI_NSS
static const uint8_t SS = (32 + 13); // P1.13 // NSS
static const uint8_t MOSI = PIN_SPI_MOSI;
static const uint8_t MISO = PIN_SPI_MISO;
static const uint8_t SCK = PIN_SPI_SCK;
// EPD SPI
#define PIN_SPI1_MISO (-1) // Not Used for EPD
#define PIN_SPI1_MOSI (0 + 10) // EPD_MOSI P0.10
#define PIN_SPI1_SCK (0 + 9) // EPD_SCLK P0.09
/*
* eink display pins
*/
#define USE_EINK
#define PIN_EINK_CS (32 + 0) // EPD_CS
#define PIN_EINK_BUSY (0 + 19) // EPD_BUSY
#define PIN_EINK_DC (0 + 24) // EPD_D/C
#define PIN_EINK_RES (0 + 23) // EPD_RESET
#define PIN_EINK_SCLK PIN_SPI1_SCK
#define PIN_EINK_MOSI PIN_SPI1_MOSI
// supported modules list
#define USE_LR1110
#define LR1110_IRQ_PIN LORA_DIO1
#define LR1110_NRESER_PIN LORA_RESET
#define LR1110_BUSY_PIN LORA_DIO2
#define LR1110_SPI_NSS_PIN LORA_CS
#define LR1110_SPI_SCK_PIN LORA_SCK
#define LR1110_SPI_MOSI_PIN LORA_MOSI
#define LR1110_SPI_MISO_PIN LORA_MISO
#define LR11X0_DIO3_TCXO_VOLTAGE 1.6
#define LR11X0_DIO_AS_RF_SWITCH
#define LR11X0_DIO_RF_SWITCH_CONFIG 0x0f, 0x0, 0x09, 0x0B, 0x0A, 0x0, 0x4, 0x0
#define HAS_GPS 0
#define PIN_GPS_EN -1
#define GPS_EN_ACTIVE HIGH
#define PIN_GPS_RESET -1
#define GPS_VRTC_EN -1
#define GPS_SLEEP_INT -1
#define GPS_RTC_INT -1
#define GPS_RESETB_OUT -1
#define BATTERY_PIN -1
#define ADC_MULTIPLIER (2.0F)
#define ADC_RESOLUTION 14
#define BATTERY_SENSE_RESOLUTION_BITS 12
#undef AREF_VOLTAGE
#define AREF_VOLTAGE 3.0
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
// Buzzer
#define PIN_BUZZER (0 + 25)
#ifdef __cplusplus
}
#endif
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
#endif // _VARIANT_ME25LS01_4Y10TD__

View File

@@ -0,0 +1,15 @@
[env:ms24sf1]
extends = nrf52840_base
board = ms24sf1
board_level = extra
; platform = https://github.com/maxgerhardt/platform-nordicnrf52#cac6fcf943a41accd2aeb4f3659ae297a73f422e
build_flags = ${nrf52840_base.build_flags} -Ivariants/MS24SF1 -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/MS24SF1>
lib_deps =
${nrf52840_base.lib_deps}
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
upload_protocol = nrfutil
upload_port = /dev/ttyACM1

View File

@@ -0,0 +1,30 @@
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry All right reserved.
Copyright (c) 2018, Adafruit Industries (adafruit.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "variant.h"
#include "nrf.h"
#include "wiring_constants.h"
#include "wiring_digital.h"
const uint32_t g_ADigitalPinMap[] = {
// P0
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
// P1
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};
void initVariant() {}

139
variants/MS24SF1/variant.h Normal file
View File

@@ -0,0 +1,139 @@
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry All right reserved.
Copyright (c) 2018, Adafruit Industries (adafruit.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _VARIANT_MINEWSEMI_MS24SF1_
#define _VARIANT_MINEWSEMI_MS24SF1_
#define ME25LS01
/** Master clock frequency */
#define VARIANT_MCK (64000000ul)
#define USE_LFXO // Board uses 32khz crystal for LF
/*----------------------------------------------------------------------------
* Headers
*----------------------------------------------------------------------------*/
#include "WVariant.h"
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
// Number of pins defined in PinDescription array
#define PINS_COUNT (48)
#define NUM_DIGITAL_PINS (48)
#define NUM_ANALOG_INPUTS (6)
#define NUM_ANALOG_OUTPUTS (0)
// Use the native nrf52 usb power detection
#define NRF_APM
#define PIN_3V3_EN (32 + 5) //-1
#define PIN_3V3_ACC_EN -1
#define PIN_LED1 (-1)
#define LED_PIN PIN_LED1
#define LED_BUILTIN -1
#define LED_BLUE -1
#define LED_STATE_ON 1 // State when LED is lit
#define BUTTON_PIN (-1)
#define BUTTON_NEED_PULLUP
#define HAS_WIRE 1
#define WIRE_INTERFACES_COUNT 1
#define PIN_WIRE_SDA (0 + 29) // P0.15
#define PIN_WIRE_SCL (0 + 30) // P0.17
/*
* Serial interfaces
*/
#define PIN_SERIAL1_RX (-1) // P0.14
#define PIN_SERIAL1_TX (-1) // P0.13
#define PIN_SERIAL2_RX (-1) // P0.17
#define PIN_SERIAL2_TX (-1) // P0.16
/*
* SPI Interfaces
*/
#define SPI_INTERFACES_COUNT 1 // 2
#define PIN_SPI_MISO (0 + 17) // MISO P0.17
#define PIN_SPI_MOSI (0 + 20) // MOSI P0.20
#define PIN_SPI_SCK (0 + 21) // SCK P0.21
// #define PIN_SPI1_MISO (-1) //
// #define PIN_SPI1_MOSI (10) // EPD_MOSI P0.10
// #define PIN_SPI1_SCK (9) // EPD_SCLK P0.09
static const uint8_t SS = (0 + 22); // LORA_CS P0.22
static const uint8_t MOSI = PIN_SPI_MOSI;
static const uint8_t MISO = PIN_SPI_MISO;
static const uint8_t SCK = PIN_SPI_SCK;
// MINEWSEMI nRF52840+SX1262 MS24SF1 (NRF82540 with integrated SX1262)
#define USE_SX1262
#define SX126X_CS (0 + 22) // LORA_CS P0.22
#define SX126X_DIO1 (0 + 16) // DIO1 P0.16
#define SX126X_BUSY (0 + 19) // LORA_BUSY P0.19
#define SX126X_RESET (0 + 12) // LORA_RESET P0.12
#define SX126X_TXEN (32 + 4) // TXEN P1.04
#define SX126X_RXEN (32 + 2) // RXEN P1.02
// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3
#define SX126X_DIO2_AS_RF_SWITCH
#define HAS_GPS 0
#define PIN_GPS_EN -1
#define GPS_EN_ACTIVE HIGH
#define PIN_GPS_RESET -1
#define GPS_VRTC_EN -1
#define GPS_SLEEP_INT -1
#define GPS_RTC_INT -1
#define GPS_RESETB_OUT -1
#define BATTERY_PIN -1
#define ADC_MULTIPLIER (2.0F)
#define ADC_RESOLUTION 14
#define BATTERY_SENSE_RESOLUTION_BITS 12
#undef AREF_VOLTAGE
#define AREF_VOLTAGE 3.0
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
// Buzzer
// #define PIN_BUZZER (0 + 25)
#ifdef __cplusplus
}
#endif
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
#endif // _VARIANT_MINEWSEMI_MS24SF1_

View File

@@ -56,7 +56,6 @@ extern "C" {
#define LED_CONN PIN_LED3
#define LED_STATE_ON 0 // State when LED is lit
#define LED_INVERTED 1
/*
* Buttons

View File

@@ -34,7 +34,7 @@
// Buzzer
#define PIN_BUZZER 19
// Buttons
#define BUTTON_PIN 36 // Use the WAKE button as the user button
// #define BUTTON_PIN 36 // Use the WAKE button as the user button
// I2C
// #define I2C_SCL 27
// #define I2C_SDA 26
@@ -54,7 +54,7 @@
#define ST7735_RESET 15
#define ST7735_MISO -1
#define ST7735_BUSY -1
#define ST7735_BL 32
#define TFT_BL 32
#define ST7735_SPI_HOST HSPI_HOST // SPI2_HOST for S3, auto may work too
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
@@ -91,6 +91,13 @@
#define GPS_TX_PIN 13
#define GPS_RX_PIN 2
// keyboard
#define INPUTBROKER_SERIAL_TYPE 1
#define KB_LOAD 21 // load values from the switch and store in shift register
#define KB_CLK 22 // clock pin for serial data out
#define KB_DATA 23 // data pin
#define CANNED_MESSAGE_MODULE_ENABLE 1
/////////////////////////////////////////////////////////////////////////////////
// //
// You should have no need to modify the code below, nor in pins_arduino.h //

View File

@@ -115,6 +115,8 @@ NRF52 PRO MICRO PIN ASSIGNMENT
// LORA MODULES
#define USE_LLCC68
#define USE_SX1262
// #define USE_RF95
#define USE_SX1268
// LORA CONFIG
#define SX126X_CS (32 + 13) // P1.13 FIXME - we really should define LORA_CS instead
@@ -126,22 +128,30 @@ NRF52 PRO MICRO PIN ASSIGNMENT
#define SX126X_RXEN (0 + 17) // P0.17
#define SX126X_TXEN RADIOLIB_NC // Assuming that DIO2 is connected to TXEN pin. If not, TXEN must be connected.
// #define SX126X_MAX_POWER 8 set this if using a high-power board!
/*
On the SX1262, DIO3 sets the voltage for an external TCXO, if one is present. If one is not present, then this should not be used.
On the SX1262, DIO3 sets the voltage for an external TCXO, if one is present. If one is not present, use TCXO_OPTIONAL to try both
settings.
Ebyte
e22-900mm22s has no TCXO
e22-900m22s has TCXO
e220-900mm22s has no TCXO, works with/without this definition, looks like DIO3 not connected at all
AI-thinker
RA-01SH does not have TCXO
Waveshare
Core1262 has TCXO
| Mfr | Module | TCXO | RF Switch | Notes |
| ---------- | ---------------- | ---- | --------- | -------------------------------------------- |
| Ebyte | E22-900M22S | Yes | Ext | |
| Ebyte | E22-900MM22S | No | Ext | |
| Ebyte | E22-900M30S | Yes | Ext | |
| Ebyte | E22-900M33S | Yes | Ext | MAX_POWER must be set to 8 for this |
| Ebyte | E220-900M22S | No | Ext | LLCC68, looks like DIO3 not connected at all |
| AI-Thinker | RA-01SH | No | Int | |
| Heltec | HT-RA62 | Yes | Int | |
| NiceRF | Lora1262 | yes | Int | |
| Waveshare | Core1262-HF | yes | Ext | |
| Waveshare | LoRa Node Module | yes | Int | |
*/
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define TCXO_OPTIONAL // make it so that the firmware can try both TCXO and XTAL
extern float tcxoVoltage; // make this available everywhere
#ifdef __cplusplus
}
@@ -151,4 +161,4 @@ Core1262 has TCXO
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
#endif
#endif

View File

@@ -114,6 +114,8 @@ NRF52 PRO MICRO PIN ASSIGNMENT
// LORA MODULES
#define USE_LLCC68
#define USE_SX1262
// #define USE_RF95
#define USE_SX1268
// LORA CONFIG
#define SX126X_CS (32 + 13) // P1.13 FIXME - we really should define LORA_CS instead

View File

@@ -11,7 +11,7 @@ board_upload.require_upload_port = yes
;upload_port = /dev/ttyACM0
build_flags = ${esp32_base.build_flags}
build_flags = ${esp32s3_base.build_flags}
-DESP32_S3_PICO
;-DPRIVATE_HW
-Ivariants/esp32-s3-pico
@@ -22,4 +22,4 @@ build_flags = ${esp32_base.build_flags}
lib_deps = ${esp32s3_base.lib_deps}
zinggjm/GxEPD2@^1.5.3
adafruit/Adafruit NeoPixel @ ^1.12.0
adafruit/Adafruit NeoPixel @ ^1.12.0

View File

@@ -0,0 +1,16 @@
[env:feather_rp2040_rfm95]
extends = rp2040_base
board = adafruit_feather
upload_protocol = picotool
# add our variants files to the include and src paths
build_flags = ${rp2040_base.build_flags}
-DRP2040_FEATHER_RFM95
-Ivariants/feather_rp2040_rfm95
-DDEBUG_RP2040_PORT=Serial
-DHW_SPI1_DEVICE
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m0plus"
lib_deps =
${rp2040_base.lib_deps}
debug_build_flags = ${rp2040_base.build_flags}
debug_tool = cmsis-dap ; for e.g. Picotool

View File

@@ -0,0 +1,61 @@
// #define RADIOLIB_CUSTOM_ARDUINO 1
// #define RADIOLIB_TONE_UNSUPPORTED 1
// #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 1
#define ARDUINO_ARCH_AVR
// #define USE_SSD1306
// #define USE_SH1106 1
// default I2C pins:
// SDA = 4
// SCL = 5
// Recommended pins for SerialModule:
// txd = 8
// rxd = 9
#define EXT_NOTIFY_OUT 22
#define BUTTON_PIN 7
// #define BUTTON_NEED_PULLUP
#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 USE_RF95 // RFM95/SX127x
#undef LORA_SCK
#undef LORA_MISO
#undef LORA_MOSI
#undef LORA_CS
// https://www.adafruit.com/product/5714
// https://learn.adafruit.com/feather-rp2040-rfm95
// https://learn.adafruit.com/assets/120283
// https://learn.adafruit.com/assets/120813
#define LORA_SCK 14 // 10 12P
#define LORA_MISO 8 // 12 10P
#define LORA_MOSI 15 // 11 11P
#define LORA_CS 16 // 3 13P
#define LORA_RESET 17 // 15 14P
#define LORA_DIO0 21 // ?? 6P
#define LORA_DIO1 22 // 20 7P
#define LORA_DIO2 23 // 2 8P
#define LORA_DIO3 19 // ?? 3P
#define LORA_DIO4 20 // ?? 4P
#define LORA_DIO5 18 // ?? 15P
#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

View File

@@ -40,3 +40,14 @@
#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

View File

@@ -3,8 +3,8 @@
// LED pin on HT-DEV-ESP_V2 and HT-DEV-ESP_V3
// https://resource.heltec.cn/download/HT-CT62/HT-CT62_Reference_Design.pdf
// https://resource.heltec.cn/download/HT-DEV-ESP/HT-DEV-ESP_V3_Sch.pdf
#define LED_PIN 2 // LED
#define LED_INVERTED 0
#define LED_PIN 2 // LED
#define LED_STATE_ON 1 // State when LED is lit
#define HAS_SCREEN 0
#define HAS_GPS 0
@@ -26,4 +26,4 @@
#define SX126X_BUSY LORA_BUSY
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define SX126X_DIO3_TCXO_VOLTAGE 1.8

View File

@@ -7,9 +7,10 @@ debug_tool = jlink
# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.
build_flags = ${nrf52840_base.build_flags} -Ivariants/heltec_mesh_node_t114
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
-DGPS_POWER_TOGGLE
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/heltec_mesh_node_t114>
lib_deps =
${nrf52840_base.lib_deps}
lewisxhe/PCF8563_Library@^1.0.1
https://github.com/Bei-Ji-Quan/st7789#b8e7e076714b670764139289d3829b0beff67edb
https://github.com/meshtastic/st7789#7181320e7ed05c7fb5fd2d32f14723bce6088b7b

View File

@@ -49,7 +49,7 @@ extern "C" {
// #define ST7789_BL (32+6)
#define TFT_BACKLIGHT_ON LOW
#define ST7789_SPI_HOST SPI1_HOST
// #define ST7789_BACKLIGHT_EN (32+6)
// #define TFT_BL (32+6)
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
#define TFT_HEIGHT 135
@@ -80,7 +80,6 @@ extern "C" {
#define LED_CONN PIN_GREEN
#define LED_STATE_ON 0 // State when LED is lit
#define LED_INVERTED 1
/*
* Buttons
@@ -126,8 +125,8 @@ No longer populated on PCB
#define LORA_CS (0 + 24)
#define SX126X_DIO1 (0 + 20)
// 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
// #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 (0 + 17)
@@ -147,7 +146,7 @@ No longer populated on PCB
#define GPS_L76K
#define PIN_GPS_RESET (32 + 6) // An output to reset L76K GPS. As per datasheet, low for > 100ms will reset the L76K
// #define PIN_GPS_RESET (32 + 6) // An output to reset L76K GPS. As per datasheet, low for > 100ms will reset the L76K
#define GPS_RESET_MODE LOW
#define PIN_GPS_EN (21)
#define GPS_EN_ACTIVE HIGH

View File

@@ -1,5 +1,7 @@
#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

View File

@@ -3,8 +3,8 @@
#include <stdint.h>
static const uint8_t LED_BUILTIN = -1; // Board has no built-in LED, despite what schematic shows
#define BUILTIN_LED LED_BUILTIN // backward compatibility
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;

View File

@@ -1,4 +1,7 @@
#define LED_PIN 45 // LED is not populated on earliest board variant
#define BUTTON_PIN 0
#define BUTTON_PIN_SECONDARY 21 // Second built-in button
#define BUTTON_SECONDARY_CANNEDMESSAGES // By default, use the secondary button as canned message input
// I2C
#define I2C_SDA SDA
@@ -15,9 +18,9 @@
// SPI
#define SPI_INTERFACES_COUNT 2
#define PIN_SPI_MISO 10 // MISO
#define PIN_SPI_MOSI 11 // MOSI
#define PIN_SPI_SCK 9 // SCK
#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
@@ -29,11 +32,12 @@
#define ADC_CHANNEL ADC1_GPIO7_CHANNEL
#define ADC_MULTIPLIER 4.9 * 1.03
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5
#define HAS_32768HZ
// LoRa
#define USE_SX1262
#define LORA_DIO0 -1 // a No connect on the SX1262 module
#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

View File

@@ -3,15 +3,15 @@
#include <stdint.h>
static const uint8_t LED_BUILTIN = 35;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
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 = 41;
static const uint8_t SCL = 42;
static const uint8_t SDA = 39;
static const uint8_t SCL = 38;
static const uint8_t SS = 8;
static const uint8_t MOSI = 10;
@@ -56,6 +56,6 @@ 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;
static const uint8_t DIO1 = 14;
#endif /* Pins_Arduino_h */

View File

@@ -1,25 +1,25 @@
[env:heltec-vision-master-e290]
board_level = extra
extends = esp32s3_base
board = heltec_wifi_lora_32_V3
board = heltec_vision_master_e290
build_flags =
${esp32s3_base.build_flags}
-Ivariants/heltec_vision_master_e290
-DHELTEC_VISION_MASTER_E290
-DEINK_DISPLAY_MODEL=GxEPD2_290_BS
-DEINK_WIDTH=296
-DEINK_HEIGHT=128
; -D USE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
; -D EINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted
; -D EINK_LIMIT_RATE_BACKGROUND_SEC=1 ; Minimum interval between BACKGROUND updates
; -D EINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates
; -D EINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated
; -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"
; -D EINK_HASQUIRK_WEAKFASTREFRESH ; Pixels set with fast-refresh are easy to clear, disrupted by sunlight
-I variants/heltec_vision_master_e290
-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_DYNAMICDISPLAY ; Enable Dynamic EInk
-D EINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted
-D EINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates
-D EINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates
-D EINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting"
-D EINK_HASQUIRK_WEAKFASTREFRESH ; Pixels set with fast-refresh are easy to clear, disrupted by sunlight
; -D EINK_LIMIT_GHOSTING_PX=2000 ; How much image ghosting is tolerated
; -D EINK_BACKGROUND_USES_FAST ; (If enabled) don't redraw RESPONSIVE frames at next BACKGROUND update
lib_deps =
${esp32s3_base.lib_deps}
https://github.com/meshtastic/GxEPD2#b202ebfec6a4821e098cf7a625ba0f6f2400292d
https://github.com/meshtastic/GxEPD2#448c8538129fde3d02a7cb5e6fc81971ad92547f
lewisxhe/PCF8563_Library@^1.0.1
upload_speed = 115200

View File

@@ -1,48 +1,45 @@
// #define LED_PIN 18
#define LED_PIN 45 // LED is not populated on earliest board variant
#define BUTTON_PIN 0
#define BUTTON_PIN_SECONDARY 21 // Second built-in button
#define BUTTON_SECONDARY_CANNEDMESSAGES // By default, use the secondary button as canned message input
// Enable bus for external periherals
// I2C
#define I2C_SDA SDA
#define I2C_SCL SCL
// Display (E-Ink)
#define USE_EINK
/*
* eink display pins
*/
#define PIN_EINK_CS 3
#define PIN_EINK_BUSY 5
#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 interfaces
*/
// SPI
#define SPI_INTERFACES_COUNT 2
#define PIN_SPI_MISO 11
#define PIN_SPI_MOSI 10
#define PIN_SPI_SCK 9
#define PIN_SPI_MISO 10 // MISO
#define PIN_SPI_MOSI 11 // MOSI
#define PIN_SPI_SCK 9 // SCK
#define VEXT_ENABLE 18 // powers the e-ink display
#define VEXT_ON_VALUE 1
#define BUTTON_PIN 0
// 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 // Voltage divider output is quite high
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5
#define HAS_32768HZ
// LoRa
#define USE_SX1262
#define LORA_DIO0 -1 // a No connect on the SX1262 module
#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

View File

@@ -10,8 +10,8 @@ static const uint8_t LED_BUILTIN = 35;
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 SDA = 2;
static const uint8_t SCL = 1;
static const uint8_t SS = 8;
static const uint8_t MOSI = 10;

View File

@@ -1,6 +1,6 @@
[env:heltec-vision-master-t190]
extends = esp32s3_base
board = heltec_wifi_lora_32_V3
board = heltec_vision_master_t190
build_flags =
${esp32s3_base.build_flags}
-Ivariants/heltec_vision_master_t190
@@ -9,5 +9,5 @@ build_flags =
lib_deps =
${esp32s3_base.lib_deps}
lewisxhe/PCF8563_Library@^1.0.1
https://github.com/Bei-Ji-Quan/st7789#b8e7e076714b670764139289d3829b0beff67edb
https://github.com/meshtastic/st7789#7181320e7ed05c7fb5fd2d32f14723bce6088b7b
upload_speed = 921600

View File

@@ -1,12 +1,14 @@
// #define LED_PIN 18
#define BUTTON_PIN 0
#define BUTTON_PIN_SECONDARY 21 // Second built-in button
#define BUTTON_SECONDARY_CANNEDMESSAGES // By default, use the secondary button as canned message input
// Enable bus for external periherals
#define I2C_SDA 1
#define I2C_SCL 2
// I2C
#define I2C_SDA SDA
#define I2C_SCL SCL
// Display (TFT)
#define USE_ST7789
#define ST7789_NSS 39
// #define ST7789_CS 39
#define ST7789_RS 47 // DC
#define ST7789_SDA 48 // MOSI
#define ST7789_SCK 38
@@ -14,14 +16,9 @@
#define ST7789_MISO 4
#define ST7789_BUSY -1
#define VTFT_CTRL 7
// #define TFT_BL 3
#define VTFT_LEDA 17
#define TFT_BACKLIGHT_ON HIGH
// #define TFT_BL 17
// #define TFT_BACKLIGHT_ON HIGH
// #define ST7789_BL 3
#define ST7789_SPI_HOST SPI2_HOST
// #define ST7789_BACKLIGHT_EN 17
#define SPI_FREQUENCY 10000000
#define SPI_READ_FREQUENCY 10000000
#define TFT_HEIGHT 170
@@ -35,28 +32,27 @@
// #define SLEEP_TIME 120
/*
* SPI interfaces
*/
// SPI
#define SPI_INTERFACES_COUNT 2
#define PIN_SPI_MISO 11
#define PIN_SPI_MOSI 10
#define PIN_SPI_SCK 9
#define PIN_SPI_MISO 10 // MISO P0.17
#define PIN_SPI_MOSI 11 // MOSI P0.15
#define PIN_SPI_SCK 9 // SCK P0.13
// #define VEXT_ENABLE 7 // active low, powers the oled display and the lora antenna boost
#define BUTTON_PIN 0
// 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
#define HAS_32768HZ
// LoRa
#define USE_SX1262
#define LORA_DIO0 -1 // a No connect on the SX1262 module
#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

View File

@@ -16,23 +16,26 @@
// SPI
#define SPI_INTERFACES_COUNT 2
#define PIN_SPI_MISO 10 // MISO
#define PIN_SPI_MOSI 11 // MOSI
#define PIN_SPI_SCK 9 // SCK
#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 HAS_32768HZ
#define ADC_CTRL_ENABLED LOW
// LoRa
#define USE_SX1262
#define LORA_DIO0 -1 // a No connect on the SX1262 module
#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
@@ -48,4 +51,4 @@
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define SX126X_DIO3_TCXO_VOLTAGE 1.8

View File

@@ -16,23 +16,26 @@
// SPI
#define SPI_INTERFACES_COUNT 2
#define PIN_SPI_MISO 10 // MISO
#define PIN_SPI_MOSI 11 // MOSI
#define PIN_SPI_SCK 9 // SCK
#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 HAS_32768HZ
#define ADC_CTRL_ENABLED LOW
// LoRa
#define USE_SX1262
#define LORA_DIO0 -1 // a No connect on the SX1262 module
#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
@@ -48,4 +51,4 @@
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define SX126X_DIO3_TCXO_VOLTAGE 1.8

View File

@@ -1,5 +1,6 @@
#define LED_PIN 18
#define _VARIANT_HELTEC_WIRELESS_TRACKER
#define HELTEC_TRACKER_V1_X
// I2C
@@ -15,7 +16,7 @@
#define ST7735_RESET 39
#define ST7735_MISO -1
#define ST7735_BUSY -1
#define ST7735_BL_V05 21 /* V1.1 PCB marking */
#define TFT_BL 21 /* V1.1 PCB marking */
#define ST7735_SPI_HOST SPI3_HOST
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
@@ -31,15 +32,17 @@
// 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_V05 3 // active HIGH - powers the GPS, GPS LNA and OLED VDD/anode
#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_CTRL_ENABLED HIGH
#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
@@ -72,4 +75,4 @@
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define SX126X_DIO3_TCXO_VOLTAGE 1.8

View File

@@ -15,7 +15,7 @@
#define ST7735_RESET 39
#define ST7735_MISO -1
#define ST7735_BUSY -1
#define ST7735_BL_V03 45
#define TFT_BL 45
#define ST7735_SPI_HOST SPI3_HOST
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
@@ -24,11 +24,12 @@
#define TFT_WIDTH DISPLAY_HEIGHT
#define TFT_OFFSET_X 26
#define TFT_OFFSET_Y -1
#define VTFT_CTRL_V03 46 // Heltec Tracker needs this pulled low for TFT
#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_V03 Vext // active low, powers the oled display and the lora antenna boost
#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
@@ -43,8 +44,7 @@
#define PIN_GPS_RESET 35
#define PIN_GPS_PPS 36
#define VGNSS_CTRL_V03 37 // Heltec Tracker needs this pulled low for GPS
#define PIN_GPS_EN VGNSS_CTRL_V03
#define PIN_GPS_EN 37 // Heltec Tracker needs this pulled low for GPS
#define GPS_EN_ACTIVE LOW
#define GPS_RESET_MODE LOW
@@ -69,4 +69,4 @@
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define SX126X_DIO3_TCXO_VOLTAGE 1.8

View File

@@ -4,6 +4,7 @@
#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
@@ -32,4 +33,4 @@
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define SX126X_DIO3_TCXO_VOLTAGE 1.8

View File

@@ -144,7 +144,7 @@ static const uint8_t SCK = PIN_SPI_SCK;
#define ST7735_RESET (11) // Output
#define ST7735_CS (12)
#define ST7735_BACKLIGHT_EN (13)
#define TFT_BL (13)
#define ST7735_RS (9)
// #define LORA_DISABLE_SENDING // The board can brownout during lora TX if you don't have a battery connected. Disable sending
@@ -158,4 +158,4 @@ static const uint8_t SCK = PIN_SPI_SCK;
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
#endif
#endif

View File

@@ -166,7 +166,7 @@ static const uint8_t SCK = PIN_SPI_SCK;
// ST7565 SPI
#define ST7735_RESET (11) // Output
#define ST7735_CS (12)
#define ST7735_BACKLIGHT_EN (13)
#define TFT_BL (13)
#define ST7735_RS (9)
#define ST7735_SDA (39) // actually spi MOSI
#define ST7735_SCK (37) // actually spi clk
@@ -185,4 +185,4 @@ static const uint8_t SCK = PIN_SPI_SCK;
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
#endif
#endif

View File

@@ -10,7 +10,7 @@
// #define GPS_TX_PIN 32 (now used by SX1262 BUSY as GPS works with just RX)
// Green LED
#define LED_INVERTED 0
#define LED_STATE_ON 1 // State when LED is lit
#define LED_PIN 10
#include "pcf8563.h"
@@ -106,4 +106,4 @@
// GND
// https://github.com/m5stack/M5Core-Ink/blob/master/examples/Basics/FactoryTest/FactoryTest.ino#L58
#define ADC_MULTIPLIER 5
// https://embeddedexplorer.com/esp32-adc-esp-idf-tutorial/
// https://embeddedexplorer.com/esp32-adc-esp-idf-tutorial/

View File

@@ -54,7 +54,6 @@ extern "C" {
#define LED_CONN PIN_GREEN
#define LED_STATE_ON 0 // State when LED is lit
// #define LED_INVERTED 1
/*
* Buttons

View File

@@ -37,7 +37,7 @@
#define ST7789_MISO -1
#define ST7789_BUSY -1
#define ST7789_SPI_HOST SPI3_HOST
#define ST7789_BACKLIGHT_EN 5
#define TFT_BL 5
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
#define TFT_HEIGHT 320

View File

@@ -1,5 +1,6 @@
#define HAS_SCREEN 1
#define CANNED_MESSAGE_MODULE_ENABLE 1
#define HAS_GPS 1
#define MAX_RX_TOPHONE settingsMap[maxtophone]
#define MAX_NUM_NODES settingsMap[maxnodes]
#define RADIOLIB_GODMODE 1

View File

@@ -0,0 +1,14 @@
[env:radiomaster_900_bandit]
extends = esp32_base
board = esp32doit-devkit-v1
build_flags =
${esp32_base.build_flags}
-DRADIOMASTER_900_BANDIT
-DVTABLES_IN_FLASH=1
-DCONFIG_DISABLE_HAL_LOCKS=1
-O2
-Ivariants/radiomaster_900_bandit
board_build.f_cpu = 240000000L
upload_protocol = esptool
lib_deps =
${esp32_base.lib_deps}

View File

@@ -0,0 +1,121 @@
/*
Initial settings and work by https://github.com/gjelsoe
Unit provided by Radio Master RC
https://radiomasterrc.com/products/bandit-expresslrs-rf-module with 1.29" OLED display CH1115 driver
*/
/*
On this model then screen is NOT upside down, don't flip it for the user.
*/
#undef DISPLAY_FLIP_SCREEN
/*
I2C SDA and SCL.
0x18 - STK8XXX Accelerometer, Not supported yet.
0x3C - SH1115 Display Driver
*/
#define I2C_SDA 14
#define I2C_SCL 12
/*
No GPS - but free pins are available.
*/
#define HAS_GPS 0
#undef GPS_RX_PIN
#undef GPS_TX_PIN
/*
Pin connections from ESP32-D0WDQ6 to SX1276.
*/
#define LORA_DIO0 22
#define LORA_DIO1 21
#define LORA_SCK 18
#define LORA_MISO 19
#define LORA_MOSI 23
#define LORA_CS 4
#define LORA_RESET 5
#define LORA_TXEN 33
/*
This unit has a FAN built-in.
FAN is active at 250mW on it's ExpressLRS Firmware.
This FAN has TACHO signal on Pin 27 for use with PWM.
*/
#define RF95_FAN_EN 2
/*
LED PIN setup and it has a NeoPixel LED.
It's possible to setup colors for Button 1 and 2,
look at BUTTON1_COLOR, BUTTON1_COLOR_INDEX, BUTTON2_COLOR and BUTTON2_COLOR_INDEX
this is done here for now.
*/
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 6 // How many neopixels are connected
#define NEOPIXEL_DATA 15 // GPIO pin used to send data to the neopixels
#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // Type of neopixels in use
#define ENABLE_AMBIENTLIGHTING // Turn on Ambient Lighting
// #define BUTTON1_COLOR 0xFF0000 // Background light for Button 1 in HEX RGB Color (RadioMaster Bandit only).
// #define BUTTON1_COLOR_INDEX 0 // NeoPixel Index ID for Button 1
// #define BUTTON2_COLOR 0x0000FF // Background light for Button 2 in HEX RGB Color (RadioMaster Bandit only).
// #define BUTTON2_COLOR_INDEX 1 // NeoPixel Index ID for Button 2
/*
It has 1 x five-way and 2 x normal buttons.
Button GPIO RGB Index
---------------------------
Five-way 39 -
Button 1 34 0
Button 2 35 1
Five way button when using ADC.
2.632V, 2.177V, 1.598V, 1.055V, 0V
ADC Values:
{ UP, DOWN, LEFT, RIGHT, ENTER, IDLE }
3227, 0 ,1961, 2668, 1290, 4095
Five way button when using ADC.
https://github.com/ExpressLRS/targets/blob/f3215b5ec891108db1a13523e4163950cfcadaac/TX/Radiomaster%20Bandit.json#L41
*/
#define INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE
#define PIN_JOYSTICK 39
#define JOYSTICK_ADC_VALS /*UP*/ 3227, /*DOWN*/ 0, /*LEFT*/ 1961, /*RIGHT*/ 2668, /*OK*/ 1290, /*IDLE*/ 4095
/*
Normal Button Pin setup.
*/
#define BUTTON_PIN 34
#define BUTTON_NEED_PULLUP
/*
No External notification.
*/
#undef EXT_NOTIFY_OUT
/*
Remapping PIN Names.
Note, that this unit uses RFO
*/
#define USE_RF95
#define USE_RF95_RFO
#define RF95_CS LORA_CS
#define RF95_DIO1 LORA_DIO1
#define RF95_TXEN LORA_TXEN
#define RF95_RESET LORA_RESET
#define RF95_MAX_POWER 10
/*
This module has Skyworks SKY66122 controlled by dacWrite
power ranging from 100mW to 1000mW.
Mapping of PA_LEVEL to Power output: GPIO26/dacWrite
168 -> 100mW
155 -> 250mW
142 -> 500mW
110 -> 1000mW
*/
#define RF95_PA_EN 26
#define RF95_PA_DAC_EN
#define RF95_PA_LEVEL 110

View File

@@ -41,16 +41,13 @@
/*
Five way button when using ADC.
2.632V, 2.177V, 1.598V, 1.055V, 0V
Possible ADC Values:
{ UP, DOWN, LEFT, RIGHT, ENTER, IDLE }
3227, 0 ,1961, 2668, 1290, 4095
https://github.com/ExpressLRS/targets/blob/f3215b5ec891108db1a13523e4163950cfcadaac/TX/Radiomaster%20Bandit.json#L41
*/
#define BUTTON_PIN 39
#define BUTTON_NEED_PULLUP
#define INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE
#define PIN_JOYSTICK 39
#define JOYSTICK_ADC_VALS /*UP*/ 3227, /*DOWN*/ 0, /*LEFT*/ 1961, /*RIGHT*/ 2668, /*OK*/ 1290, /*IDLE*/ 4095
#define SCREEN_ROTATE
#define DISPLAY_FLIP_SCREEN
/*
No External notification.
@@ -81,4 +78,4 @@
*/
#define RF95_PA_EN 26
#define RF95_PA_DAC_EN
#define RF95_PA_LEVEL 90
#define RF95_PA_LEVEL 90

View File

@@ -6,6 +6,7 @@ board_check = true
build_flags = ${nrf52840_base.build_flags} -Ivariants/rak2560 -D RAK_4631
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
-DMESHTASTIC_EXCLUDE_GPS=1
-DHAS_RAKPROT=1 ; Define if RAk OneWireSerial is used (disables GPS)
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak2560> +<mesh/eth/> +<mesh/api/> +<mqtt/>
lib_deps =

View File

@@ -227,7 +227,7 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
// #define GPS_TX_PIN PIN_SERIAL2_TX
// #define PIN_GPS_EN PIN_3V3_EN
// Disable GPS
#define MESHTASTIC_EXCLUDE_GPS 1
// #define MESHTASTIC_EXCLUDE_GPS 1
// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press
// RAK12002 RTC Module

View File

@@ -0,0 +1,31 @@
[env:rak3172]
extends = stm32_base
board = wiscore_rak3172
build_flags =
${stm32_base.build_flags}
-Ivariants/rak3172
-DSERIAL_UART_INSTANCE=1
-DPIN_SERIAL_RX=PB7
-DPIN_SERIAL_TX=PB6
-DHAL_DAC_MODULE_ONLY
-DHAL_ADC_MODULE_DISABLED
-DHAL_COMP_MODULE_DISABLED
-DHAL_CRC_MODULE_DISABLED
-DHAL_CRYP_MODULE_DISABLED
-DHAL_GTZC_MODULE_DISABLED
-DHAL_HSEM_MODULE_DISABLED
-DHAL_I2C_MODULE_DISABLED
-DHAL_I2S_MODULE_DISABLED
-DHAL_IPCC_MODULE_DISABLED
-DHAL_IRDA_MODULE_DISABLED
-DHAL_IWDG_MODULE_DISABLED
-DHAL_LPTIM_MODULE_DISABLED
-DHAL_PKA_MODULE_DISABLED
-DHAL_RNG_MODULE_DISABLED
-DHAL_RTC_MODULE_DISABLED
-DHAL_SMARTCARD_MODULE_DISABLED
-DHAL_SMBUS_MODULE_DISABLED
-DHAL_TIM_MODULE_DISABLED
-DHAL_WWDG_MODULE_DISABLED
-DHAL_EXTI_MODULE_DISABLED
upload_port = stlink

View File

@@ -0,0 +1,12 @@
/*
This variant is a work in progress.
Do not expect a working Meshtastic device with this target.
*/
#ifndef _VARIANT_RAK3172_
#define _VARIANT_RAK3172_
#define USE_STM32WLx
#define MAX_NUM_NODES 10
#endif

View File

@@ -17,9 +17,6 @@ lib_deps =
https://github.com/RAKWireless/RAK13800-W5100S.git#1.0.2
rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2
https://github.com/meshtastic/RAK12034-BMX160.git#4821355fb10390ba8557dc43ca29a023bcfbb9d9
debug_tool = jlink
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
; Note: as of 6/2013 the serial/bootloader based programming takes approximately 30 seconds
@@ -52,69 +49,4 @@ lib_deps =
upload_protocol = stlink
; eventually use platformio/tool-pyocd@^2.3600.0 instad
;upload_protocol = custom
;upload_command = pyocd flash -t nrf52840 $UPLOADERFLAGS $SOURCE
; We want the initial breakpoint at setup() instead of main(). Also we want to enable semihosting at that point so instead of
; debug_init_break = tbreak setup
; we just turn off the platformio tbreak and do it in .gdbinit (where we have more flexibility for scripting)
; also we use a permanent breakpoint so it gets reused each time we restart the debugging session?
debug_init_break = tbreak setup
; Note: add "monitor arm semihosting_redirect tcp 4444 all" if you want the stdout from the device to go to that port number instead
; (for use by meshtastic command line)
; monitor arm semihosting disable
; monitor debug_level 3
;
; IMPORTANT: fileio must be disabled before using port 5555 - openocd ver 0.12 has a bug where if enabled it never properly parses the special :tt name
; for stdio access.
; monitor arm semihosting_redirect tcp 5555 stdio
; Also note: it is _impossible_ to do non blocking reads on the semihost console port (an oversight when ARM specified the semihost API).
; So we'll neve be able to general purpose bi-directional communication with the device over semihosting.
debug_extra_cmds =
echo Running .gdbinit script
monitor arm semihosting enable
monitor arm semihosting_fileio enable
monitor arm semihosting_redirect disable
commands 1
echo Breakpoint at setup() has semihosting console, connect to it with "telnet localhost 5555"
set wantSemihost = true
set useSoftDevice = false
end
; Only reprogram the board if the code has changed
debug_load_mode = modified
;debug_load_mode = manual
debug_tool = stlink
;debug_tool = custom
; debug_server =
; openocd
; -f
; /usr/local/share/openocd/scripts/interface/stlink.cfg
; -f
; /usr/local/share/openocd/scripts/target/nrf52.cfg
; $PLATFORMIO_CORE_DIR/packages/tool-openocd/openocd/scripts/interface/cmsis-dap.cfg
; Allows programming and debug via the RAK NanoDAP as the default debugger tool for the RAK4631 (it is only $10!)
; programming time is about the same as the bootloader version.
; For information on this see the meshtastic developers documentation for "Development on the NRF52"
; We manually pass in the elf file so that pyocd can reverse engineer FreeRTOS data (running threads, etc...)
;debug_server =
; pyocd
; gdbserver
; -j
; ${platformio.workspace_dir}/..
; -t
; nrf52840
; --semihosting
; --elf
; ${platformio.build_dir}/${this.__env__}/firmware.elf
; If you want to debug the semihosting support you can turn on extra logging in pyocd with
; -L
; pyocd.debug.semihost.trace=debug
; The following is not needed because it automatically tries do this
;debug_server_ready_pattern = -.*GDB server started on port \d+.*
;debug_port = localhost:3333
;upload_command = pyocd flash -t nrf52840 $UPLOADERFLAGS $SOURCE

View File

@@ -15,7 +15,7 @@
// rxd = 9
#define EXT_NOTIFY_OUT 22
#define BUTTON_PIN 17
#undef BUTTON_PIN // Pin 17 used for antenna switching via DIO4
#define LED_PIN PIN_LED
@@ -32,23 +32,28 @@
// https://www.waveshare.com/rp2040-lora.htm
// https://www.waveshare.com/img/devkit/RP2040-LoRa-HF/RP2040-LoRa-HF-details-11.jpg
#define LORA_SCK 14 // 10
#define LORA_MISO 24 // 12
#define LORA_MOSI 15 // 11
#define LORA_CS 13 // 3
#define LORA_SCK 14 // GPIO14
#define LORA_MISO 24 // GPIO24
#define LORA_MOSI 15 // GPIO15
#define LORA_CS 13 // GPIO13
#define LORA_DIO0 RADIOLIB_NC
#define LORA_RESET 23 // 15
#define LORA_DIO1 16 // 20
#define LORA_DIO2 18 // 2
#define LORA_DIO3 RADIOLIB_NC
#define LORA_DIO4 17
#define LORA_DIO0 RADIOLIB_NC // No GPIO connection
#define LORA_RESET 23 // GPIO23
#define LORA_BUSY 18 // GPIO18
#define LORA_DIO1 16 // GPIO16
#define LORA_DIO2 RADIOLIB_NC // Antenna switching, no GPIO connection
#define LORA_DIO3 RADIOLIB_NC // No GPIO connection
#define LORA_DIO4 17 // GPIO17
// On rp2040-lora board the antenna switch is wired and works with complementary-pin control logic.
// See PE4259 datasheet page 4
#ifdef USE_SX1262
#define SX126X_CS LORA_CS
#define SX126X_DIO1 LORA_DIO1
#define SX126X_BUSY LORA_DIO2
#define SX126X_BUSY LORA_BUSY
#define SX126X_RESET LORA_RESET
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO2_AS_RF_SWITCH // Antenna switch CTRL
#define SX126X_RXEN LORA_DIO4 // Antenna switch !CTRL via GPIO17
// #define SX126X_DIO3_TCXO_VOLTAGE 1.8
#endif

View File

@@ -8,7 +8,7 @@
#define ST7789_BUSY -1
#define ST7789_BL 42
#define ST7789_SPI_HOST SPI2_HOST
#define ST7789_BACKLIGHT_EN 42
#define TFT_BL 42
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
#define TFT_HEIGHT 320

View File

@@ -56,7 +56,6 @@ extern "C" {
#define LED_CONN PIN_GREEN
#define LED_STATE_ON 0 // State when LED is lit
#define LED_INVERTED 1
/*
* Buttons

View File

@@ -8,7 +8,7 @@
#define ST7789_BUSY -1
#define ST7789_BL 45
#define ST7789_SPI_HOST SPI3_HOST
#define ST7789_BACKLIGHT_EN 45
#define TFT_BL 45
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
#define TFT_HEIGHT 240
@@ -30,8 +30,6 @@
#define I2C_SDA1 39 // Used for capacitive touch
#define I2C_SCL1 40 // Used for capacitive touch
#define TFT_BL ST7789_BACKLIGHT_EN
#define HAS_I2S
#define DAC_I2S_BCK 48
#define DAC_I2S_WS 15

View File

@@ -6,13 +6,13 @@
#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)
// Now declared in .platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h
// #define NUM_ANALOG_INPUTS 20
// #define EXTERNAL_NUM_INTERRUPTS 46
// #define NUM_DIGITAL_PINS 48
// #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;
@@ -39,4 +39,4 @@ static const uint8_t SCK = 12;
// #define PMU_IRQ (40)
#define RTC_INT (14)
#endif /* Pins_Arduino_h */
#endif /* Pins_Arduino_h */

View File

@@ -11,7 +11,7 @@
// anywhere.
// #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
#define LED_INVERTED 1
#define LED_STATE_ON 0 // State when LED is lit
// 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
@@ -66,4 +66,4 @@
// has 32768 Hz crystal
#define HAS_32768HZ
#define USE_SH1106
#define USE_SH1106

View File

@@ -8,8 +8,8 @@
// anywhere.
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
#define LED_INVERTED 1
#define LED_PIN 4 // Newer tbeams (1.1) have an extra led on GPIO4
#define LED_STATE_ON 0 // State when LED is lit
#define LED_PIN 4 // Newer tbeams (1.1) have an extra led on GPIO4
// 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

View 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 = 12; // t3s3 e-Paper has no pin 17 as t3s3 v1, so use another free pin next to it
// Default SPI will be mapped to Radio
static const uint8_t SS = 7;
static const uint8_t MOSI = 6;
static const uint8_t MISO = 3;
static const uint8_t SCK = 5;
#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,23 @@
[env:tlora-t3s3-epaper]
extends = esp32s3_base
board = tlora-t3s3-v1
board_check = true
upload_protocol = esptool
build_flags =
${esp32_base.build_flags} -D TLORA_T3S3_EPAPER -I variants/tlora_t3s3_epaper
-DGPS_POWER_TOGGLE
-DEINK_DISPLAY_MODEL=GxEPD2_213_BN
-DEINK_WIDTH=250
-DEINK_HEIGHT=122
-DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
-DEINK_LIMIT_FASTREFRESH=10 ; 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_HASQUIRK_VICIOUSFASTREFRESH ; Identify that pixels drawn by fast-refresh are harder to clear
;-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.
lib_deps =
${esp32s3_base.lib_deps}
https://github.com/meshtastic/GxEPD2#b202ebfec6a4821e098cf7a625ba0f6f2400292d

View File

@@ -0,0 +1,69 @@
#define HAS_SDCARD
#define SDCARD_USE_SPI1
// Display (E-Ink)
#define USE_EINK
#define PIN_EINK_CS 15
#define PIN_EINK_BUSY 48
#define PIN_EINK_DC 16
#define PIN_EINK_RES 47
#define PIN_EINK_SCLK 14
#define PIN_EINK_MOSI 11
#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
#define I2C_SCL SCL
// external qwiic connector
#define GPS_RX_PIN 44
#define GPS_TX_PIN 43
#define LED_PIN 37
#define BUTTON_PIN 0
#define BUTTON_NEED_PULLUP
// 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 5
#define LORA_MISO 3
#define LORA_MOSI 6
#define LORA_CS 7
#define LORA_RESET 8
// per SX1276_Receive_Interrupt/utilities.h
#define LORA_DIO0 9
#define LORA_DIO1 33 // TCXO_EN ?
#define LORA_DIO2 34
#define LORA_RXEN 21
#define LORA_TXEN 10
// per SX1262_Receive_Interrupt/utilities.h
#ifdef USE_SX1262
#define SX126X_CS LORA_CS
#define SX126X_DIO1 33
#define SX126X_BUSY 34
#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 9
#define SX128X_DIO2 33
#define SX128X_DIO3 34
#define SX128X_BUSY 36
#define SX128X_RESET LORA_RESET
#define SX128X_RXEN 21
#define SX128X_TXEN 10
#define SX128X_MAX_POWER 3
#endif

View File

@@ -4,8 +4,9 @@
#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
#define LED_PIN 2 // If defined we will blink this LED
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
#define VEXT_ON_VALUE LOW
#define LED_PIN 2 // 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 EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.

View File

@@ -0,0 +1,16 @@
; tracker-t1000-e v0.9.1
[env:tracker-t1000-e]
extends = nrf52840_base
board = tracker-t1000-e
; board_level = extra
; platform = https://github.com/maxgerhardt/platform-nordicnrf52#cac6fcf943a41accd2aeb4f3659ae297a73f422e
build_flags = ${nrf52840_base.build_flags} -Ivariants/tracker-t1000-e -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 -DTRACKER_T1000_E
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/tracker-t1000-e>
lib_deps =
${nrf52840_base.lib_deps}
debug_tool = jlink
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
upload_protocol = nrfutil

View File

@@ -0,0 +1,64 @@
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry All right reserved.
Copyright (c) 2018, Adafruit Industries (adafruit.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "variant.h"
#include "nrf.h"
#include "wiring_constants.h"
#include "wiring_digital.h"
const uint32_t g_ADigitalPinMap[] = {
// P0
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
// P1
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};
void initVariant()
{
// LED1 & LED2
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH);
pinMode(PIN_3V3_ACC_EN, OUTPUT);
digitalWrite(PIN_3V3_ACC_EN, LOW);
pinMode(BUZZER_EN_PIN, OUTPUT);
digitalWrite(BUZZER_EN_PIN, HIGH);
pinMode(PIN_GPS_EN, OUTPUT);
digitalWrite(PIN_GPS_EN, LOW);
pinMode(GPS_VRTC_EN, OUTPUT);
digitalWrite(GPS_VRTC_EN, HIGH);
pinMode(PIN_GPS_RESET, OUTPUT);
digitalWrite(PIN_GPS_RESET, LOW);
pinMode(GPS_SLEEP_INT, OUTPUT);
digitalWrite(GPS_SLEEP_INT, HIGH);
pinMode(GPS_RTC_INT, OUTPUT);
digitalWrite(GPS_RTC_INT, LOW);
pinMode(GPS_RESETB_OUT, INPUT);
}

View File

@@ -0,0 +1,152 @@
/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry All right reserved.
Copyright (c) 2018, Adafruit Industries (adafruit.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _VARIANT_TRACKER_T1000_E_
#define _VARIANT_TRACKER_T1000_E_
/** Master clock frequency */
#define VARIANT_MCK (64000000ul)
#define USE_LFXO // Board uses 32khz crystal for LF
/*----------------------------------------------------------------------------
* Headers
*----------------------------------------------------------------------------*/
#include "WVariant.h"
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
// Number of pins defined in PinDescription array
#define PINS_COUNT (48)
#define NUM_DIGITAL_PINS (48)
#define NUM_ANALOG_INPUTS (6)
#define NUM_ANALOG_OUTPUTS (0)
// Use the native nrf52 usb power detection
#define NRF_APM
#define PIN_3V3_EN (32 + 6) // P1.6, Power to Sensors
#define PIN_3V3_ACC_EN (32 + 7) // P1.7, Power to Acc
#define PIN_LED1 (0 + 24) // P0.24
#define LED_PIN PIN_LED1
#define LED_BUILTIN -1
#define LED_BLUE -1 // Actually green
#define LED_STATE_ON 1 // State when LED is lit
#define BUTTON_PIN (0 + 6) // P0.6
#define BUTTON_ACTIVE_LOW false
#define BUTTON_ACTIVE_PULLUP false
#define BUTTON_SENSE_TYPE 0x6
#define HAS_WIRE 1
#define WIRE_INTERFACES_COUNT 1
// unused pins
#define PIN_WIRE_SDA (0 + 9) // P0.26
#define PIN_WIRE_SCL (0 + 10) // P0.27
/*
* Serial interfaces
*/
#define PIN_SERIAL1_RX (0 + 14) // P0.14
#define PIN_SERIAL1_TX (0 + 13) // P0.13
#define PIN_SERIAL2_RX (0 + 17) // P0.17
#define PIN_SERIAL2_TX (0 + 16) // P0.16
#define SPI_INTERFACES_COUNT 1
#define PIN_SPI_MISO (32 + 8) // P1.08
#define PIN_SPI_MOSI (32 + 9) // P1.09
#define PIN_SPI_SCK (0 + 11) // P0.11
#define PIN_SPI_NSS (0 + 12) // P0.12
#define LORA_RESET (32 + 10) // P1.10 // RST
#define LORA_DIO1 (32 + 1) // P1.01 // IRQ
#define LORA_DIO2 (0 + 7) // P0.07 // BUSY
#define LORA_SCK PIN_SPI_SCK
#define LORA_MISO PIN_SPI_MISO
#define LORA_MOSI PIN_SPI_MOSI
#define LORA_CS PIN_SPI_NSS
// supported modules list
#define USE_LR1110
#define LR1110_IRQ_PIN LORA_DIO1
#define LR1110_NRESER_PIN LORA_RESET
#define LR1110_BUSY_PIN LORA_DIO2
#define LR1110_SPI_NSS_PIN LORA_CS
#define LR1110_SPI_SCK_PIN LORA_SCK
#define LR1110_SPI_MOSI_PIN LORA_MOSI
#define LR1110_SPI_MISO_PIN LORA_MISO
#define LR11X0_DIO3_TCXO_VOLTAGE 1.6
#define LR11X0_DIO_AS_RF_SWITCH
#define HAS_GPS 1
#define GNSS_AIROHA
#define GPS_RX_PIN PIN_SERIAL1_RX
#define GPS_TX_PIN PIN_SERIAL1_TX
#define GPS_BAUDRATE 115200
#define PIN_GPS_EN (32 + 11) // P1.11
#define GPS_EN_ACTIVE HIGH
#define PIN_GPS_RESET (32 + 15) // P1.15
#define GPS_RESET_MODE HIGH
#define GPS_VRTC_EN (0 + 8) // P0.8, awlays high
#define GPS_SLEEP_INT (32 + 12) // P1.12, awlays high
#define GPS_RTC_INT (0 + 15) // P0.15, normal is LOW, wake by HIGH
#define GPS_RESETB_OUT (32 + 14) // P1.14, awlays input pull_up
#define GPS_FIX_HOLD_TIME 15000 // ms
#define BATTERY_PIN 2
#define ADC_MULTIPLIER (2.0F)
#define ADC_RESOLUTION 14
#define BATTERY_SENSE_RESOLUTION_BITS 12
#undef AREF_VOLTAGE
#define AREF_VOLTAGE 3.0
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
// Buzzer
#define BUZZER_EN_PIN (32 + 5) // P1.05, awlays high
#define PIN_BUZZER (0 + 25) // P0.25, pwm output
#define T1000X_SENSOR_EN
#define T1000X_VCC_PIN (0 + 4) // P0.4
#define T1000X_NTC_PIN (0 + 31) // P0.31
#define T1000X_LUX_PIN (0 + 29) // P0.29
#ifdef __cplusplus
}
#endif
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
#endif // _VARIANT_TRACKER_T1000_E_

View File

@@ -4,10 +4,10 @@ extends = esp32_base
platform = espressif32
board = pico32
board_build.f_flash = 80000000L
board_level = extra
build_flags =
${esp32_base.build_flags} -D PRIVATE_HW -I variants/trackerd -D BSFILE=\"boards/dragino_lbt2.h\"
;board_build.partitions = no_ota.csv
;platform_packages =
; platformio/framework-arduinoespressif32@3
;platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.1-RC1
;platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.1-RC1

View File

@@ -17,7 +17,7 @@
#define ST7735_RESET 39
#define ST7735_MISO -1
#define ST7735_BUSY -1
#define ST7735_BL_V05 21 /* V1.1 PCB marking */
#define TFT_BL 21 /* V1.1 PCB marking */
#define ST7735_SPI_HOST SPI3_HOST
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
@@ -29,7 +29,8 @@
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
#define DISPLAY_FORCE_SMALL_FONTS
#define VEXT_ENABLE_V05 3 // active HIGH, powers the lora antenna boost
#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost
#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
@@ -88,4 +89,4 @@
{ \
26, 37, 17, 16, 15, 7 \
}
// #end keyboard
// #end keyboard

View File

@@ -16,13 +16,13 @@
#define ST7789_CS 38
#define ST7789_RS 40
#define ST7789_BL 21
// P#define ST7735_BL_V05 21 /* V1.1 PCB marking */
// P#define TFT_BL 21 /* V1.1 PCB marking */
#define ST7789_RESET -1
#define ST7789_MISO -1
#define ST7789_BUSY -1
#define ST7789_SPI_HOST SPI3_HOST
#define ST7789_BACKLIGHT_EN 21
#define TFT_BL 21
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
#define TFT_HEIGHT 320
@@ -41,7 +41,7 @@
// #define ST7735_RESET 39
// #define ST7735_MISO -1
// #define ST7735_BUSY -1
#define ST7735_BL_V05 21 /* V1.1 PCB marking */
#define TFT_BL 21 /* V1.1 PCB marking */
// #define ST7735_SPI_HOST SPI3_HOST
// #define SPI_FREQUENCY 40000000
// #define SPI_READ_FREQUENCY 16000000
@@ -53,7 +53,8 @@
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
// #define DISPLAY_FORCE_SMALL_FONTS
#define VEXT_ENABLE_V05 3 // active HIGH, powers the lora antenna boost
#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost
#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
@@ -112,4 +113,4 @@
{ \
26, 37, 17, 16, 15, 7 \
}
// #end keyboard
// #end keyboard

View File

@@ -19,7 +19,7 @@
// #define ST7735_RESET 39
// #define ST7735_MISO -1
// #define ST7735_BUSY -1
#define ST7735_BL_V05 21 /* V1.1 PCB marking */
#define TFT_BL 21 /* V1.1 PCB marking */
// #define ST7735_SPI_HOST SPI3_HOST
// #define SPI_FREQUENCY 40000000
// #define SPI_READ_FREQUENCY 16000000
@@ -31,7 +31,8 @@
#define SCREEN_TRANSITION_FRAMERATE 3 // fps
// #define DISPLAY_FORCE_SMALL_FONTS
#define VEXT_ENABLE_V05 3 // active HIGH, powers the lora antenna boost
#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost
#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
@@ -90,4 +91,4 @@
{ \
26, 37, 17, 16, 15, 7 \
}
// #end keyboard
// #end keyboard

View File

@@ -51,8 +51,8 @@
// #define HAS_SDCARD 1 // causes hang if defined
#define SDCARD_CS 43
#define LED_PIN 13 // the red part of the RGB LED
#define LED_INVERTED 1
#define LED_PIN 13 // the red part of the RGB LED
#define LED_STATE_ON 0 // State when LED is lit
#define BUTTON_PIN 21 // Button 3 - square - top button in landscape mode
#define BUTTON_NEED_PULLUP // we do need a helping hand up

View File

@@ -1,11 +1,33 @@
[env:wio-e5]
extends = stm32wl5e_base
board_level = extra
extends = stm32_base
board = lora_e5_dev_board
build_flags =
${stm32wl5e_base.build_flags}
${stm32_base.build_flags}
-Ivariants/wio-e5
-DHAL_DAC_MODULE_ONLY
-DSERIAL_UART_INSTANCE=1
-DPIN_SERIAL_RX=PB7
-DPIN_SERIAL_TX=PB6
-DHAL_DAC_MODULE_ONLY
-DHAL_ADC_MODULE_DISABLED
-DHAL_COMP_MODULE_DISABLED
-DHAL_CRC_MODULE_DISABLED
-DHAL_CRYP_MODULE_DISABLED
-DHAL_GTZC_MODULE_DISABLED
-DHAL_HSEM_MODULE_DISABLED
-DHAL_I2C_MODULE_DISABLED
-DHAL_I2S_MODULE_DISABLED
-DHAL_IPCC_MODULE_DISABLED
-DHAL_IRDA_MODULE_DISABLED
-DHAL_IWDG_MODULE_DISABLED
-DHAL_LPTIM_MODULE_DISABLED
-DHAL_PKA_MODULE_DISABLED
-DHAL_RNG_MODULE_DISABLED
-DHAL_RTC_MODULE_DISABLED
-DHAL_SMARTCARD_MODULE_DISABLED
-DHAL_SMBUS_MODULE_DISABLED
-DHAL_TIM_MODULE_DISABLED
-DHAL_WWDG_MODULE_DISABLED
-DHAL_EXTI_MODULE_DISABLED
; -D PIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF
upload_port = stlink

View File

@@ -13,5 +13,9 @@ Do not expect a working Meshtastic device with this target.
#define _VARIANT_WIOE5_
#define USE_STM32WLx
#define MAX_NUM_NODES 10
#endif
#define LED_PIN PB5
#define LED_STATE_ON 1
#endif

View File

@@ -3,29 +3,23 @@
extends = nrf52840_base
board = wio-sdk-wm1110
extra_scripts =
bin/platformio-custom.py
extra_scripts/disable_adafruit_usb.py
# Remove adafruit USB serial from the build (it is incompatible with using the ch340 serial chip on this board)
build_unflags = ${nrf52840_base:build_unflags} -DUSBCON -DUSE_TINYUSB
build_flags = ${nrf52840_base.build_flags} -Ivariants/wio-sdk-wm1110 -Isrc/platform/nrf52/softdevice -Isrc/platform/nrf52/softdevice/nrf52 -DWIO_WM1110
-L "${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard"
-DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.
-DCFG_TUD_CDC=0
board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/wio-sdk-wm1110>
lib_deps =
${nrf52840_base.lib_deps}
debug_tool = jlink
;debug_tool = stlink
;debug_speed = 4000
; No need to reflash if the binary hasn't changed
debug_load_mode = modified
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
upload_protocol = nrfutil
;upload_protocol = stlink
; we prefer to stop in setup() because we are an 'ardiuno' app
debug_init_break = tbreak setup
; we need to turn off BLE/soft device if we are debugging otherwise it will watchdog reset us.
debug_extra_cmds =
echo Running .gdbinit script
commands 1
set useSoftDevice = false
end
;debug_tool = jlink
debug_tool = stlink
; No need to reflash if the binary hasn't changed
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
;upload_protocol = nrfutil
;upload_protocol = stlink

View File

@@ -106,7 +106,7 @@ extern "C" {
#define LR11X0_DIO_RF_SWITCH_CONFIG 0x0f, 0x0, 0x09, 0x0B, 0x0A, 0x0, 0x4, 0x0
#define HAS_GPS 1
#define GNSS_Airoha
#define GNSS_AIROHA
#define GPS_RX_PIN PIN_SERIAL1_RX
#define GPS_TX_PIN PIN_SERIAL1_TX

View File

@@ -9,6 +9,5 @@ board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/wio-tracker-wm1110>
lib_deps =
${nrf52840_base.lib_deps}
debug_tool = jlink
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
;upload_protocol = jlink
;upload_protocol = jlink

View File

@@ -43,6 +43,9 @@ extern "C" {
#define WIRE_INTERFACES_COUNT 1
// We rely on the nrf52840 USB controller to tell us if we are hooked to a power supply
#define NRF_APM
#define PIN_3V3_EN (32 + 1) // P1.01, Power to Sensors
#define PIN_WIRE_SDA (0 + 5) // P0.05
@@ -76,9 +79,9 @@ extern "C" {
#define PIN_SPI_SCK (32 + 13) // P1.13 45
#define PIN_SPI_NSS (32 + 12) // P1.12 44
#define LORA_RESET (0 + 18) // P0.18 18 // RST
#define LORA_DIO1 (0 + 2) // P0.02 2 // IRQ
#define LORA_DIO2 (32 + 11) // P1.11 43 // BUSY
#define LORA_RESET (32 + 10) // P1.10 10 // RST
#define LORA_DIO1 (0 + 2) // P0.02 2 // IRQ
#define LORA_DIO2 (32 + 11) // P1.11 43 // BUSY
#define LORA_SCK PIN_SPI_SCK
#define LORA_MISO PIN_SPI_MISO
#define LORA_MOSI PIN_SPI_MOSI
@@ -108,4 +111,4 @@ extern "C" {
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
#endif // _VARIANT_WIO_TRACKER_WM1110_
#endif // _VARIANT_WIO_TRACKER_WM1110_

View File

@@ -34,13 +34,17 @@
#define ST7789_SCK 18
#define ST7789_CS 5
#define ST7789_RS 26
#define ST7789_BL -1 // EXTENDER_PIN(9)
// I don't have a 'wiphone' but this I think should not be defined this way (don't set TFT_BL if we don't have a hw way to control
// it)
// #define ST7789_BL -1 // EXTENDER_PIN(9)
#define ST7789_RESET -1
#define ST7789_MISO 19
#define ST7789_BUSY -1
#define ST7789_SPI_HOST SPI3_HOST
#define ST7789_BACKLIGHT_EN -1 // EXTENDER_PIN(9)
// I don't have a 'wiphone' but this I think should not be defined this way (don't set TFT_BL if we don't have a hw way to control
// it)
// #define TFT_BL -1 // EXTENDER_PIN(9)
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
#define TFT_HEIGHT 240