RTC: PCF85063 support, port to SensorLib 0.3.1 (#8061)

* RTC: PCF85063 support, port to SensorLib 0.3.1

* Tidy up defines

* Remove RTC/PCF8563 mentions from unrelated variants

* Bump SensorLib 0.3.2

* Use SensorRtcHelper

* Consistent warning message

* Fix oversight

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Manuel <71137295+mverch67@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
WillyJL
2025-12-21 02:10:21 +01:00
committed by GitHub
parent db64a5b51e
commit 8fdba1f1e2
38 changed files with 68 additions and 140 deletions

View File

@@ -29,8 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#if __has_include("Melopero_RV3028.h") #if __has_include("Melopero_RV3028.h")
#include "Melopero_RV3028.h" #include "Melopero_RV3028.h"
#endif #endif
#if __has_include("pcf8563.h") #if __has_include("SensorRtcHelper.hpp")
#include "pcf8563.h" #include "SensorRtcHelper.hpp"
#endif #endif
/* Offer chance for variant-specific defines */ /* Offer chance for variant-specific defines */

View File

@@ -25,8 +25,8 @@ ScanI2C::FoundDevice ScanI2C::firstScreen() const
ScanI2C::FoundDevice ScanI2C::firstRTC() const ScanI2C::FoundDevice ScanI2C::firstRTC() const
{ {
ScanI2C::DeviceType types[] = {RTC_RV3028, RTC_PCF8563, RTC_RX8130CE}; ScanI2C::DeviceType types[] = {RTC_RV3028, RTC_PCF8563, RTC_PCF85063, RTC_RX8130CE};
return firstOfOrNONE(3, types); return firstOfOrNONE(4, types);
} }
ScanI2C::FoundDevice ScanI2C::firstKeyboard() const ScanI2C::FoundDevice ScanI2C::firstKeyboard() const

View File

@@ -14,6 +14,7 @@ class ScanI2C
SCREEN_ST7567, SCREEN_ST7567,
RTC_RV3028, RTC_RV3028,
RTC_PCF8563, RTC_PCF8563,
RTC_PCF85063,
RTC_RX8130CE, RTC_RX8130CE,
CARDKB, CARDKB,
TDECKKB, TDECKKB,

View File

@@ -202,6 +202,10 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
SCAN_SIMPLE_CASE(RX8130CE_RTC, RTC_RX8130CE, "RX8130CE", (uint8_t)addr.address) SCAN_SIMPLE_CASE(RX8130CE_RTC, RTC_RX8130CE, "RX8130CE", (uint8_t)addr.address)
#endif #endif
#ifdef PCF85063_RTC
SCAN_SIMPLE_CASE(PCF85063_RTC, RTC_PCF85063, "PCF85063", (uint8_t)addr.address)
#endif
case CARDKB_ADDR: case CARDKB_ADDR:
// Do we have the RAK14006 instead? // Do we have the RAK14006 instead?
registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x04), 1); registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x04), 1);

View File

@@ -66,26 +66,26 @@ RTCSetResult readFromRTC()
currentQuality = RTCQualityDevice; currentQuality = RTCQualityDevice;
} }
return RTCSetResultSuccess; return RTCSetResultSuccess;
} else {
LOG_WARN("RTC not found (found address 0x%02X)", rtc_found.address);
} }
#elif defined(PCF8563_RTC) #elif defined(PCF8563_RTC) || defined(PCF85063_RTC)
#if defined(PCF8563_RTC)
if (rtc_found.address == PCF8563_RTC) { if (rtc_found.address == PCF8563_RTC) {
#elif defined(PCF85063_RTC)
if (rtc_found.address == PCF85063_RTC) {
#endif
uint32_t now = millis(); uint32_t now = millis();
PCF8563_Class rtc; SensorRtcHelper rtc;
#if WIRE_INTERFACES_COUNT == 2 #if WIRE_INTERFACES_COUNT == 2
rtc.begin(rtc_found.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire); rtc.begin(rtc_found.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire);
#else #else
rtc.begin(); rtc.begin(Wire);
#endif #endif
auto tc = rtc.getDateTime(); RTC_DateTime datetime = rtc.getDateTime();
tm t; tm t = datetime.toUnixTime();
t.tm_year = tc.year - 1900;
t.tm_mon = tc.month - 1;
t.tm_mday = tc.day;
t.tm_hour = tc.hour;
t.tm_min = tc.minute;
t.tm_sec = tc.second;
tv.tv_sec = gm_mktime(&t); tv.tv_sec = gm_mktime(&t);
tv.tv_usec = 0; tv.tv_usec = 0;
uint32_t printableEpoch = tv.tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms uint32_t printableEpoch = tv.tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms
@@ -100,14 +100,16 @@ RTCSetResult readFromRTC()
} }
#endif #endif
LOG_DEBUG("Read RTC time from PCF8563 getDateTime as %02d-%02d-%02d %02d:%02d:%02d (%ld)", t.tm_year + 1900, t.tm_mon + 1, LOG_DEBUG("Read RTC time from %s getDateTime as %02d-%02d-%02d %02d:%02d:%02d (%ld)", rtc.getChipName(), t.tm_year + 1900,
t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, printableEpoch); t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, printableEpoch);
if (currentQuality == RTCQualityNone) { if (currentQuality == RTCQualityNone) {
timeStartMsec = now; timeStartMsec = now;
zeroOffsetSecs = tv.tv_sec; zeroOffsetSecs = tv.tv_sec;
currentQuality = RTCQualityDevice; currentQuality = RTCQualityDevice;
} }
return RTCSetResultSuccess; return RTCSetResultSuccess;
} else {
LOG_WARN("RTC not found (found address 0x%02X)", rtc_found.address);
} }
#elif defined(RX8130CE_RTC) #elif defined(RX8130CE_RTC)
if (rtc_found.address == RX8130CE_RTC) { if (rtc_found.address == RX8130CE_RTC) {
@@ -232,20 +234,28 @@ RTCSetResult perhapsSetRTC(RTCQuality q, const struct timeval *tv, bool forceUpd
rtc.setTime(t->tm_year + 1900, t->tm_mon + 1, t->tm_wday, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); rtc.setTime(t->tm_year + 1900, t->tm_mon + 1, t->tm_wday, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);
LOG_DEBUG("RV3028_RTC setTime %02d-%02d-%02d %02d:%02d:%02d (%ld)", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, LOG_DEBUG("RV3028_RTC setTime %02d-%02d-%02d %02d:%02d:%02d (%ld)", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec, printableEpoch); t->tm_hour, t->tm_min, t->tm_sec, printableEpoch);
} else {
LOG_WARN("RTC not found (found address 0x%02X)", rtc_found.address);
} }
#elif defined(PCF8563_RTC) #elif defined(PCF8563_RTC) || defined(PCF85063_RTC)
#if defined(PCF8563_RTC)
if (rtc_found.address == PCF8563_RTC) { if (rtc_found.address == PCF8563_RTC) {
PCF8563_Class rtc; #elif defined(PCF85063_RTC)
if (rtc_found.address == PCF85063_RTC) {
#endif
SensorRtcHelper rtc;
#if WIRE_INTERFACES_COUNT == 2 #if WIRE_INTERFACES_COUNT == 2
rtc.begin(rtc_found.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire); rtc.begin(rtc_found.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire);
#else #else
rtc.begin(); rtc.begin(Wire);
#endif #endif
tm *t = gmtime(&tv->tv_sec); tm *t = gmtime(&tv->tv_sec);
rtc.setDateTime(t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); rtc.setDateTime(*t);
LOG_DEBUG("PCF8563_RTC setDateTime %02d-%02d-%02d %02d:%02d:%02d (%ld)", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, LOG_DEBUG("%s setDateTime %02d-%02d-%02d %02d:%02d:%02d (%ld)", rtc.getChipName(), t->tm_year + 1900, t->tm_mon + 1,
t->tm_hour, t->tm_min, t->tm_sec, printableEpoch); t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, printableEpoch);
} else {
LOG_WARN("RTC not found (found address 0x%02X)", rtc_found.address);
} }
#elif defined(RX8130CE_RTC) #elif defined(RX8130CE_RTC)
if (rtc_found.address == RX8130CE_RTC) { if (rtc_found.address == RX8130CE_RTC) {

View File

@@ -2,16 +2,14 @@
#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && defined(HAS_BMA423) && __has_include(<SensorBMA423.hpp>) #if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && defined(HAS_BMA423) && __has_include(<SensorBMA423.hpp>)
using namespace MotionSensorI2C;
BMA423Sensor::BMA423Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {} BMA423Sensor::BMA423Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {}
bool BMA423Sensor::init() bool BMA423Sensor::init()
{ {
if (sensor.begin(deviceAddress(), &MotionSensorI2C::readRegister, &MotionSensorI2C::writeRegister)) { if (sensor.begin(Wire, deviceAddress())) {
sensor.configAccelerometer(sensor.RANGE_2G, sensor.ODR_100HZ, sensor.BW_NORMAL_AVG4, sensor.PERF_CONTINUOUS_MODE); sensor.configAccelerometer(sensor.RANGE_2G, sensor.ODR_100HZ, sensor.BW_NORMAL_AVG4, sensor.PERF_CONTINUOUS_MODE);
sensor.enableAccelerometer(); sensor.enableAccelerometer();
sensor.configInterrupt(BMA4_LEVEL_TRIGGER, BMA4_ACTIVE_HIGH, BMA4_PUSH_PULL, BMA4_OUTPUT_ENABLE, BMA4_INPUT_DISABLE); sensor.configInterrupt();
#ifdef BMA423_INT #ifdef BMA423_INT
pinMode(BMA4XX_INT, INPUT); pinMode(BMA4XX_INT, INPUT);
@@ -26,9 +24,9 @@ bool BMA423Sensor::init()
#ifdef T_WATCH_S3 #ifdef T_WATCH_S3
// Need to raise the wrist function, need to set the correct axis // Need to raise the wrist function, need to set the correct axis
sensor.setReampAxes(sensor.REMAP_TOP_LAYER_RIGHT_CORNER); sensor.setRemapAxes(sensor.REMAP_TOP_LAYER_RIGHT_CORNER);
#else #else
sensor.setReampAxes(sensor.REMAP_BOTTOM_LAYER_BOTTOM_LEFT_CORNER); sensor.setRemapAxes(sensor.REMAP_BOTTOM_LAYER_BOTTOM_LEFT_CORNER);
#endif #endif
// sensor.enableFeature(sensor.FEATURE_STEP_CNTR, true); // sensor.enableFeature(sensor.FEATURE_STEP_CNTR, true);
sensor.enableFeature(sensor.FEATURE_TILT, true); sensor.enableFeature(sensor.FEATURE_TILT, true);
@@ -50,7 +48,7 @@ bool BMA423Sensor::init()
int32_t BMA423Sensor::runOnce() int32_t BMA423Sensor::runOnce()
{ {
if (sensor.readIrqStatus() != DEV_WIRE_NONE) { if (sensor.readIrqStatus()) {
if (sensor.isTilt() || sensor.isDoubleTap()) { if (sensor.isTilt() || sensor.isDoubleTap()) {
wakeScreen(); wakeScreen();
return 500; return 500;

View File

@@ -61,32 +61,6 @@ class MotionSensor
uint32_t endCalibrationAt = 0; uint32_t endCalibrationAt = 0;
}; };
namespace MotionSensorI2C
{
static inline int readRegister(uint8_t address, uint8_t reg, uint8_t *data, uint8_t len)
{
Wire.beginTransmission(address);
Wire.write(reg);
Wire.endTransmission();
Wire.requestFrom((uint8_t)address, (uint8_t)len);
uint8_t i = 0;
while (Wire.available()) {
data[i++] = Wire.read();
}
return 0; // Pass
}
static inline int writeRegister(uint8_t address, uint8_t reg, uint8_t *data, uint8_t len)
{
Wire.beginTransmission(address);
Wire.write(reg);
Wire.write(data, len);
return (0 != Wire.endTransmission());
}
} // namespace MotionSensorI2C
#endif #endif
#endif #endif

View File

@@ -20,8 +20,8 @@ lib_deps =
${esp32_base.lib_deps} ${esp32_base.lib_deps}
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2 # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
zinggjm/GxEPD2@1.6.5 zinggjm/GxEPD2@1.6.5
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
lewisxhe/PCF8563_Library@1.0.1 lewisxhe/SensorLib@0.3.2
lib_ignore = lib_ignore =
m5stack-coreink m5stack-coreink
monitor_filters = esp32_exception_decoder monitor_filters = esp32_exception_decoder

View File

@@ -13,7 +13,6 @@
#define LED_STATE_ON 1 // State when LED is lit #define LED_STATE_ON 1 // State when LED is lit
#define LED_PIN 10 #define LED_PIN 10
#include "pcf8563.h"
// PCF8563 RTC Module // PCF8563 RTC Module
#define PCF8563_RTC 0x51 #define PCF8563_RTC 0x51
#define HAS_RTC 1 #define HAS_RTC 1

View File

@@ -56,10 +56,6 @@
#define HAS_SCREEN 1 #define HAS_SCREEN 1
#define USE_SH1106 1 #define USE_SH1106 1
// PCF8563 RTC Module
// #define PCF8563_RTC 0x51
// #define PIN_RTC_INT 48 // Interrupt from the PCF8563 RTC
#define HAS_RTC 0
#define HAS_GPS 0 #define HAS_GPS 0
#define BUTTON_PIN PIN_BUTTON1 #define BUTTON_PIN PIN_BUTTON1

View File

@@ -18,7 +18,5 @@ build_flags =
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
# renovate: datasource=custom.pio depName=PCA9557-arduino packageName=maxpromer/library/PCA9557-arduino # renovate: datasource=custom.pio depName=PCA9557-arduino packageName=maxpromer/library/PCA9557-arduino
maxpromer/PCA9557-arduino@1.0.0 maxpromer/PCA9557-arduino@1.0.0

View File

@@ -44,9 +44,6 @@
#define PIN_SERIAL1_RX GPS_TX_PIN #define PIN_SERIAL1_RX GPS_TX_PIN
#define PIN_SERIAL1_TX GPS_RX_PIN #define PIN_SERIAL1_TX GPS_RX_PIN
// PCF8563 RTC Module
#define PCF8563_RTC 0x51
#define SX126X_CS 17 #define SX126X_CS 17
#define LORA_SCK 16 #define LORA_SCK 16
#define LORA_MOSI 15 #define LORA_MOSI 15

View File

@@ -19,8 +19,6 @@ lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
upload_speed = 115200 upload_speed = 115200
[env:heltec-vision-master-e213-inkhud] [env:heltec-vision-master-e213-inkhud]

View File

@@ -22,8 +22,6 @@ lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/448c8538129fde3d02a7cb5e6fc81971ad92547f.zip https://github.com/meshtastic/GxEPD2/archive/448c8538129fde3d02a7cb5e6fc81971ad92547f.zip
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
upload_speed = 115200 upload_speed = 115200
[env:heltec-vision-master-e290-inkhud] [env:heltec-vision-master-e290-inkhud]

View File

@@ -8,8 +8,6 @@ build_flags =
-D HELTEC_VISION_MASTER_T190 -D HELTEC_VISION_MASTER_T190
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
# renovate: datasource=git-refs depName=meshtastic-st7789 packageName=https://github.com/meshtastic/st7789 gitBranch=main # renovate: datasource=git-refs depName=meshtastic-st7789 packageName=https://github.com/meshtastic/st7789 gitBranch=main
https://github.com/meshtastic/st7789/archive/bd33ea58ddfe4a5e4a66d53300ccbd38d66ac21f.zip https://github.com/meshtastic/st7789/archive/bd33ea58ddfe4a5e4a66d53300ccbd38d66ac21f.zip
upload_speed = 921600 upload_speed = 921600

View File

@@ -20,8 +20,6 @@ lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
upload_speed = 115200 upload_speed = 115200
[env:heltec-wireless-paper-inkhud] [env:heltec-wireless-paper-inkhud]

View File

@@ -17,6 +17,4 @@ lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/55f618961db45a23eff0233546430f1e5a80f63a.zip https://github.com/meshtastic/GxEPD2/archive/55f618961db45a23eff0233546430f1e5a80f63a.zip
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
upload_speed = 115200 upload_speed = 115200

View File

@@ -9,14 +9,12 @@ upload_protocol = esptool
build_flags = ${esp32s3_base.build_flags} build_flags = ${esp32s3_base.build_flags}
-DT_WATCH_S3 -DT_WATCH_S3
-Ivariants/esp32s3/t-watch-s3 -Ivariants/esp32s3/t-watch-s3
-DPCF8563_RTC=0x51
-DHAS_BMA423=1
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
# renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.7 lovyan03/LovyanGFX@1.2.7
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
lewisxhe/PCF8563_Library@1.0.1 lewisxhe/SensorLib@0.3.2
# renovate: datasource=custom.pio depName=Adafruit DRV2605 packageName=adafruit/library/Adafruit DRV2605 Library # renovate: datasource=custom.pio depName=Adafruit DRV2605 packageName=adafruit/library/Adafruit DRV2605 Library
adafruit/Adafruit DRV2605 Library@1.2.4 adafruit/Adafruit DRV2605 Library@1.2.4
# renovate: datasource=custom.pio depName=ESP8266Audio packageName=earlephilhower/library/ESP8266Audio # renovate: datasource=custom.pio depName=ESP8266Audio packageName=earlephilhower/library/ESP8266Audio

View File

@@ -41,11 +41,14 @@
#define HAS_AXP2101 #define HAS_AXP2101
// PCF8563 RTC Module
#define PCF8563_RTC 0x51
#define HAS_RTC 1 #define HAS_RTC 1
#define I2C_SDA 10 // For QMC6310 sensors and screens #define I2C_SDA 10 // For QMC6310 sensors and screens
#define I2C_SCL 11 // For QMC6310 sensors and screens #define I2C_SCL 11 // For QMC6310 sensors and screens
#define HAS_BMA423 1
#define BMA4XX_INT 14 // Interrupt for BMA_423 axis sensor #define BMA4XX_INT 14 // Interrupt for BMA_423 axis sensor
#define HAS_GPS 0 #define HAS_GPS 0

View File

@@ -7,10 +7,9 @@ board_check = true
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
lewisxhe/PCF8563_Library@1.0.1 lewisxhe/SensorLib@0.3.2
build_flags = build_flags =
${esp32s3_base.build_flags} ${esp32s3_base.build_flags}
-I variants/esp32s3/tbeam-s3-core -I variants/esp32s3/tbeam-s3-core
-D PCF8563_RTC=0x51 ;Putting definitions in variant.h does not compile correctly

View File

@@ -53,6 +53,8 @@
// #define PMU_IRQ 40 // #define PMU_IRQ 40
#define HAS_AXP2101 #define HAS_AXP2101
// PCF8563 RTC Module
#define PCF8563_RTC 0x51
#define HAS_RTC 1 #define HAS_RTC 1
// Specify the PMU as Wire1. In the t-beam-s3 core, PCF8563 and PMU share the bus // Specify the PMU as Wire1. In the t-beam-s3 core, PCF8563 and PMU share the bus
@@ -72,9 +74,6 @@
#define HAS_SDCARD // Have SPI interface SD card slot #define HAS_SDCARD // Have SPI interface SD card slot
#define SDCARD_USE_SPI1 #define SDCARD_USE_SPI1
// PCF8563 RTC Module
// #define PCF8563_RTC 0x51 //Putting definitions in variant. h does not compile correctly
// has 32768 Hz crystal // has 32768 Hz crystal
#define HAS_32768HZ 1 #define HAS_32768HZ 1

View File

@@ -27,8 +27,8 @@ lib_deps = ${esp32s3_base.lib_deps}
adafruit/Adafruit DRV2605 Library@1.2.4 adafruit/Adafruit DRV2605 Library@1.2.4
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library # renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1 lewisxhe/PCF8563_Library@1.0.1
# renovate: datasource=custom.pio depName=lewisxhe-SensorLib packageName=lewisxhe/library/SensorLib # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
lewisxhe/SensorLib@0.3.1 lewisxhe/SensorLib@0.3.2
# renovate: datasource=github-tags depName=pschatzmann_arduino-audio-driver packageName=pschatzmann/arduino-audio-driver # renovate: datasource=github-tags depName=pschatzmann_arduino-audio-driver packageName=pschatzmann/arduino-audio-driver
https://github.com/pschatzmann/arduino-audio-driver/archive/v0.1.3.zip https://github.com/pschatzmann/arduino-audio-driver/archive/v0.1.3.zip
# TODO renovate # TODO renovate

View File

@@ -35,11 +35,8 @@
#define GPS_TX_PIN 12 #define GPS_TX_PIN 12
#define PIN_GPS_PPS 13 #define PIN_GPS_PPS 13
// PCF8563 RTC Module // PCF85063 RTC Module
#if __has_include("pcf8563.h") #define PCF85063_RTC 0x51
#include "pcf8563.h"
#endif
#define PCF8563_RTC 0x51
#define HAS_RTC 1 #define HAS_RTC 1
// Rotary // Rotary

View File

@@ -25,8 +25,6 @@ lib_deps =
${nrf52840_base.lib_deps} ${nrf52840_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
# renovate: datasource=custom.pio depName=nRF52_PWM packageName=khoih-prog/library/nRF52_PWM # renovate: datasource=custom.pio depName=nRF52_PWM packageName=khoih-prog/library/nRF52_PWM
khoih-prog/nRF52_PWM@1.0.1 khoih-prog/nRF52_PWM@1.0.1
;upload_protocol = fs ;upload_protocol = fs
@@ -48,5 +46,3 @@ build_src_filter =
lib_deps = lib_deps =
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
${nrf52840_base.lib_deps} ${nrf52840_base.lib_deps}
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1

View File

@@ -93,8 +93,6 @@ static const uint8_t A0 = PIN_A0;
#define TP_SER_IO (0 + 11) #define TP_SER_IO (0 + 11)
#define PIN_RTC_INT (0 + 16) // Interrupt from the PCF8563 RTC
/* /*
External serial flash WP25R1635FZUIL0 External serial flash WP25R1635FZUIL0
*/ */
@@ -161,9 +159,6 @@ External serial flash WP25R1635FZUIL0
#define PIN_SERIAL1_TX GPS_TX_PIN #define PIN_SERIAL1_TX GPS_TX_PIN
#define PIN_SERIAL1_RX GPS_RX_PIN #define PIN_SERIAL1_RX GPS_RX_PIN
// PCF8563 RTC Module
#define PCF8563_RTC 0x51
/* /*
* SPI Interfaces * SPI Interfaces
*/ */
@@ -190,7 +185,6 @@ External serial flash WP25R1635FZUIL0
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0
#define ADC_MULTIPLIER (2.02F) #define ADC_MULTIPLIER (2.02F)
// #define HAS_RTC 0
// #define HAS_SCREEN 0 // #define HAS_SCREEN 0
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -11,6 +11,4 @@ build_flags =
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/canaryone> build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/canaryone>
lib_deps = lib_deps =
${nrf52840_base.lib_deps} ${nrf52840_base.lib_deps}
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
;upload_protocol = fs ;upload_protocol = fs

View File

@@ -14,8 +14,6 @@ build_src_filter =
lib_deps = lib_deps =
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
${nrf52840_base.lib_deps} ${nrf52840_base.lib_deps}
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
extra_scripts = extra_scripts =
${env.extra_scripts} ${env.extra_scripts}
variants/nrf52840/diy/nrf52_promicro_diy_tcxo/custom_build_tasks.py ; Add to PIO's Project Tasks pane: preset builds for common displays variants/nrf52840/diy/nrf52_promicro_diy_tcxo/custom_build_tasks.py ; Add to PIO's Project Tasks pane: preset builds for common displays

View File

@@ -124,9 +124,6 @@ No longer populated on PCB
#define PIN_SERIAL1_RX GPS_RX_PIN #define PIN_SERIAL1_RX GPS_RX_PIN
#define PIN_SERIAL1_TX GPS_TX_PIN #define PIN_SERIAL1_TX GPS_TX_PIN
// PCF8563 RTC Module
#define PCF8563_RTC 0x51
/* /*
* SPI Interfaces * SPI Interfaces
*/ */
@@ -163,7 +160,6 @@ No longer populated on PCB
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0
#define ADC_MULTIPLIER (4.90F) #define ADC_MULTIPLIER (4.90F)
#define HAS_RTC 0
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@@ -13,7 +13,5 @@ build_flags = ${nrf52840_base.build_flags}
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/heltec_mesh_node_t114> build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/heltec_mesh_node_t114>
lib_deps = lib_deps =
${nrf52840_base.lib_deps} ${nrf52840_base.lib_deps}
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
# renovate: datasource=git-refs depName=meshtastic-st7789 packageName=https://github.com/meshtastic/st7789 gitBranch=main # renovate: datasource=git-refs depName=meshtastic-st7789 packageName=https://github.com/meshtastic/st7789 gitBranch=main
https://github.com/meshtastic/st7789/archive/bd33ea58ddfe4a5e4a66d53300ccbd38d66ac21f.zip https://github.com/meshtastic/st7789/archive/bd33ea58ddfe4a5e4a66d53300ccbd38d66ac21f.zip

View File

@@ -175,9 +175,6 @@ No longer populated on PCB
#define PIN_SERIAL1_RX GPS_RX_PIN #define PIN_SERIAL1_RX GPS_RX_PIN
#define PIN_SERIAL1_TX GPS_TX_PIN #define PIN_SERIAL1_TX GPS_TX_PIN
// PCF8563 RTC Module
#define PCF8563_RTC 0x51
/* /*
* SPI Interfaces * SPI Interfaces
*/ */

View File

@@ -25,8 +25,6 @@ build_flags = ${nrf52840_base.build_flags}
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/heltec_mesh_pocket> build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/heltec_mesh_pocket>
lib_deps = lib_deps =
${nrf52840_base.lib_deps} ${nrf52840_base.lib_deps}
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/b202ebfec6a4821e098cf7a625ba0f6f2400292d.zip https://github.com/meshtastic/GxEPD2/archive/b202ebfec6a4821e098cf7a625ba0f6f2400292d.zip
@@ -72,8 +70,6 @@ build_flags = ${nrf52840_base.build_flags}
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/heltec_mesh_pocket> build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/heltec_mesh_pocket>
lib_deps = lib_deps =
${nrf52840_base.lib_deps} ${nrf52840_base.lib_deps}
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/b202ebfec6a4821e098cf7a625ba0f6f2400292d.zip https://github.com/meshtastic/GxEPD2/archive/b202ebfec6a4821e098cf7a625ba0f6f2400292d.zip

View File

@@ -130,7 +130,6 @@ No longer populated on PCB
#undef HAS_GPS #undef HAS_GPS
#define HAS_GPS 0 #define HAS_GPS 0
#define HAS_RTC 0
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@@ -15,8 +15,6 @@ lib_deps =
${nrf52840_base.lib_deps} ${nrf52840_base.lib_deps}
# renovate: datasource=git-refs depName=NMIoT-meshsolar packageName=https://github.com/NMIoT/meshsolar gitBranch=main # renovate: datasource=git-refs depName=NMIoT-meshsolar packageName=https://github.com/NMIoT/meshsolar gitBranch=main
https://github.com/NMIoT/meshsolar/archive/dfc5330dad443982e6cdd37a61d33fc7252f468b.zip https://github.com/NMIoT/meshsolar/archive/dfc5330dad443982e6cdd37a61d33fc7252f468b.zip
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
# renovate: datasource=custom.pio depName=ArduinoJson packageName=bblanchon/library/ArduinoJson # renovate: datasource=custom.pio depName=ArduinoJson packageName=bblanchon/library/ArduinoJson
bblanchon/ArduinoJson@6.21.4 bblanchon/ArduinoJson@6.21.4

View File

@@ -142,7 +142,6 @@ No longer populated on PCB
#define BQ4050_SCL_PIN (32 + 0) // I2C clock line pin #define BQ4050_SCL_PIN (32 + 0) // I2C clock line pin
#define BQ4050_EMERGENCY_SHUTDOWN_PIN (32 + 3) // Emergency shutdown pin #define BQ4050_EMERGENCY_SHUTDOWN_PIN (32 + 3) // Emergency shutdown pin
#define HAS_RTC 0
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@@ -10,6 +10,6 @@ build_flags = ${nrf52840_base.build_flags}
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/nano-g2-ultra> build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/nano-g2-ultra>
lib_deps = lib_deps =
${nrf52840_base.lib_deps} ${nrf52840_base.lib_deps}
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
lewisxhe/PCF8563_Library@1.0.1 lewisxhe/SensorLib@0.3.2
;upload_protocol = fs ;upload_protocol = fs

View File

@@ -87,8 +87,6 @@ static const uint8_t A4 = PIN_A4;
#define PIN_WIRE_SDA (0 + 17) #define PIN_WIRE_SDA (0 + 17)
#define PIN_WIRE_SCL (0 + 15) #define PIN_WIRE_SCL (0 + 15)
#define PIN_RTC_INT (0 + 14) // Interrupt from the PCF8563 RTC
/* /*
External serial flash W25Q16JV_IQ External serial flash W25Q16JV_IQ
*/ */
@@ -141,7 +139,9 @@ External serial flash W25Q16JV_IQ
#define PIN_SERIAL1_RX PIN_GPS_RX #define PIN_SERIAL1_RX PIN_GPS_RX
// PCF8563 RTC Module // PCF8563 RTC Module
#define PIN_RTC_INT (0 + 14) // Interrupt from the PCF8563 RTC
#define PCF8563_RTC 0x51 #define PCF8563_RTC 0x51
#define HAS_RTC 1
/* /*
* SPI Interfaces * SPI Interfaces
@@ -169,8 +169,6 @@ External serial flash W25Q16JV_IQ
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0 #define VBAT_AR_INTERNAL AR_INTERNAL_3_0
#define ADC_MULTIPLIER (2.0F) #define ADC_MULTIPLIER (2.0F)
#define HAS_RTC 1
/** /**
OLED Screen Model OLED Screen Model
*/ */

View File

@@ -22,8 +22,8 @@ lib_deps =
${nrf52840_base.lib_deps} ${nrf52840_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/55f618961db45a23eff0233546430f1e5a80f63a.zip https://github.com/meshtastic/GxEPD2/archive/55f618961db45a23eff0233546430f1e5a80f63a.zip
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
lewisxhe/PCF8563_Library@1.0.1 lewisxhe/SensorLib@0.3.2
;upload_protocol = fs ;upload_protocol = fs
[env:t-echo-inkhud] [env:t-echo-inkhud]
@@ -43,5 +43,5 @@ build_src_filter =
lib_deps = lib_deps =
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
${nrf52840_base.lib_deps} ${nrf52840_base.lib_deps}
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
lewisxhe/PCF8563_Library@1.0.1 lewisxhe/SensorLib@0.3.2

View File

@@ -108,8 +108,6 @@ No longer populated on PCB
#define TP_SER_IO (0 + 11) #define TP_SER_IO (0 + 11)
#define PIN_RTC_INT (0 + 16) // Interrupt from the PCF8563 RTC
/* /*
External serial flash WP25R1635FZUIL0 External serial flash WP25R1635FZUIL0
*/ */
@@ -191,7 +189,9 @@ External serial flash WP25R1635FZUIL0
#define PIN_SERIAL1_TX GPS_TX_PIN #define PIN_SERIAL1_TX GPS_TX_PIN
// PCF8563 RTC Module // PCF8563 RTC Module
#define PIN_RTC_INT (0 + 16) // Interrupt from the PCF8563 RTC
#define PCF8563_RTC 0x51 #define PCF8563_RTC 0x51
#define HAS_RTC 1
/* /*
* SPI Interfaces * SPI Interfaces
@@ -219,8 +219,6 @@ External serial flash WP25R1635FZUIL0
// #define NO_EXT_GPIO 1 // #define NO_EXT_GPIO 1
#define HAS_RTC 1
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif