Merge upstream/dev (8 commits) [upstream-sync]
This commit is contained in:
commit
388d9064e8
4 files changed
+24
No files matched your search
@@ -28,6 +28,7 @@ build_flags = ${nrf52_base.build_flags}
|
||||
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
|
||||
-D SX126X_CURRENT_LIMIT=140
|
||||
-D SX126X_RX_BOOSTED_GAIN=1
|
||||
-D SX126X_REGISTER_PATCH=1 ; Patch register 0x8B5 for improved RX
|
||||
-D PIN_VEXT_EN=26 ; Vext is connected to VDD which is also connected to TFT & GPS
|
||||
-D PIN_VEXT_EN_ACTIVE=HIGH
|
||||
-D PIN_GPS_RX=25
|
||||
|
||||
@@ -130,6 +130,7 @@ build_flags =
|
||||
-D PIN_BUZZER=6
|
||||
-D AUTO_SHUTDOWN_MILLIVOLTS=3300
|
||||
-D ENABLE_USB_INTERFACE
|
||||
-D ENV_INCLUDE_GPS=1
|
||||
build_src_filter = ${ThinkNode_M1.build_src_filter}
|
||||
+<helpers/ui/GxEPDDisplay.cpp>
|
||||
+<helpers/ui/buzzer.cpp>
|
||||
|
||||
@@ -5,9 +5,28 @@
|
||||
|
||||
#include <Wire.h>
|
||||
|
||||
// A reset in the middle of an RTC read can leave the RTC holding SDA low,
|
||||
// and the RTC probe at boot then hangs forever. Up to nine clock pulses let
|
||||
// it finish its byte and release the bus.
|
||||
static void recoverI2cBus() {
|
||||
pinMode(PIN_WIRE_SDA, INPUT_PULLUP);
|
||||
pinMode(PIN_WIRE_SCL, INPUT_PULLUP);
|
||||
MESH_DEBUG_PRINTLN("I2C at boot: SDA=%d SCL=%d", digitalRead(PIN_WIRE_SDA), digitalRead(PIN_WIRE_SCL));
|
||||
pinMode(PIN_WIRE_SCL, OUTPUT);
|
||||
digitalWrite(PIN_WIRE_SCL, HIGH);
|
||||
for (int i = 0; i < 9 && digitalRead(PIN_WIRE_SDA) == LOW; i++) {
|
||||
digitalWrite(PIN_WIRE_SCL, LOW);
|
||||
delayMicroseconds(5);
|
||||
digitalWrite(PIN_WIRE_SCL, HIGH);
|
||||
delayMicroseconds(5);
|
||||
}
|
||||
pinMode(PIN_WIRE_SCL, INPUT_PULLUP);
|
||||
}
|
||||
|
||||
void ThinkNodeM6Board::begin() {
|
||||
NRF52Board::begin();
|
||||
|
||||
recoverI2cBus();
|
||||
Wire.begin();
|
||||
|
||||
#ifdef P_LORA_TX_LED
|
||||
|
||||
Reference in new issue
Block a user