mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-01 07:30:33 +00:00
T1000-E Peripherals (#5141)
* T1000-E Peripherals - enable intelligent charge controller signals - enable Accelerometer - enable internal I2C bus - provide Power to Accelerometer * POC Accelerometer Code (wakeScreen is moot for that device, just test if the driver works) * fix building without the sensor
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
; 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.
|
||||
-DGPS_POWER_TOGGLE
|
||||
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}
|
||||
https://github.com/meshtastic/QMA6100P_Arduino_Library.git#14c900b8b2e4feaac5007a7e41e0c1b7f0841136
|
||||
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
|
||||
|
||||
@@ -40,7 +40,7 @@ void initVariant()
|
||||
digitalWrite(PIN_3V3_EN, HIGH);
|
||||
|
||||
pinMode(PIN_3V3_ACC_EN, OUTPUT);
|
||||
digitalWrite(PIN_3V3_ACC_EN, LOW);
|
||||
digitalWrite(PIN_3V3_ACC_EN, HIGH);
|
||||
|
||||
pinMode(BUZZER_EN_PIN, OUTPUT);
|
||||
digitalWrite(BUZZER_EN_PIN, HIGH);
|
||||
|
||||
@@ -52,7 +52,7 @@ extern "C" {
|
||||
#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_PIN (0 + 6) // P0.06
|
||||
#define BUTTON_ACTIVE_LOW false
|
||||
#define BUTTON_ACTIVE_PULLUP false
|
||||
#define BUTTON_SENSE_TYPE 0x6
|
||||
@@ -61,9 +61,11 @@ extern "C" {
|
||||
|
||||
#define WIRE_INTERFACES_COUNT 1
|
||||
|
||||
// unused pins
|
||||
#define PIN_WIRE_SDA (0 + 9) // P0.26
|
||||
#define PIN_WIRE_SCL (0 + 10) // P0.27
|
||||
#define PIN_WIRE_SDA (0 + 26) // P0.26
|
||||
#define PIN_WIRE_SCL (0 + 27) // P0.27
|
||||
#define I2C_NO_RESCAN // I2C is a bit finicky, don't scan too much
|
||||
#define HAS_QMA6100P // very rare beast, only on this board.
|
||||
#define QMA_6100P_INT_PIN (32 + 2) // P1.02
|
||||
|
||||
/*
|
||||
* Serial interfaces
|
||||
@@ -116,14 +118,22 @@ extern "C" {
|
||||
#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_VRTC_EN (0 + 8) // P0.8, always high
|
||||
#define GPS_SLEEP_INT (32 + 12) // P1.12, always 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_RESETB_OUT (32 + 14) // P1.14, always input pull_up
|
||||
|
||||
#define GPS_FIX_HOLD_TIME 15000 // ms
|
||||
#define BATTERY_PIN 2
|
||||
#define BATTERY_PIN 2 // P0.02/AIN0, BAT_ADC
|
||||
#define BATTERY_IMMUTABLE
|
||||
#define ADC_MULTIPLIER (2.0F)
|
||||
// P0.04/AIN2 is VCC_ADC, P0.05/AIN3 is CHARGER_DET, P1.03 is CHARGE_STA, P1.04 is CHARGE_DONE
|
||||
|
||||
#define EXT_CHRG_DETECT (32 + 3) // P1.03
|
||||
#define EXT_CHRG_DETECT_VALUE LOW
|
||||
// #define EXT_IS_CHRGD (32 + 4) // P1.04
|
||||
// #define EXT_IS_CHRGD_VALUE LOW
|
||||
#define EXT_PWR_DETECT (0 + 5) // P0.05
|
||||
|
||||
#define ADC_RESOLUTION 14
|
||||
#define BATTERY_SENSE_RESOLUTION_BITS 12
|
||||
@@ -133,13 +143,13 @@ extern "C" {
|
||||
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
|
||||
|
||||
// Buzzer
|
||||
#define BUZZER_EN_PIN (32 + 5) // P1.05, awlays high
|
||||
#define BUZZER_EN_PIN (32 + 5) // P1.05, always 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
|
||||
#define T1000X_NTC_PIN (0 + 31) // P0.31/AIN7
|
||||
#define T1000X_LUX_PIN (0 + 29) // P0.29/AIN5
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user