From dfdf24ccad6522875ce25462d77cb43e267a62b1 Mon Sep 17 00:00:00 2001 From: Linar Yusupov Date: Sat, 1 Jun 2024 11:09:48 +0300 Subject: [PATCH] an update of XPowers Library [skip ci] --- .../SoftRF/src/platform/iomap/LilyGO_T3S3_EPD.h | 12 ++++++------ .../libraries/XPowersLib/src/XPowersAXP2101.tpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/software/firmware/source/SoftRF/src/platform/iomap/LilyGO_T3S3_EPD.h b/software/firmware/source/SoftRF/src/platform/iomap/LilyGO_T3S3_EPD.h index a2c680785..abcd30808 100644 --- a/software/firmware/source/SoftRF/src/platform/iomap/LilyGO_T3S3_EPD.h +++ b/software/firmware/source/SoftRF/src/platform/iomap/LilyGO_T3S3_EPD.h @@ -4,15 +4,15 @@ #define SOC_GPIO_PIN_T3S3_CONS_TX 43 // GNSS module (ext.) -#define SOC_GPIO_PIN_T3S3_GNSS_RX 4 -#define SOC_GPIO_PIN_T3S3_GNSS_TX 5 -#define SOC_GPIO_PIN_T3S3_GNSS_PPS 19 +#define SOC_GPIO_PIN_T3S3_GNSS_RX 35 /* TBD */ +#define SOC_GPIO_PIN_T3S3_GNSS_TX 38 /* TBD */ +#define SOC_GPIO_PIN_T3S3_GNSS_PPS 36 /* TBD */ // USB CDC/JTAG #define SOC_GPIO_PIN_T3S3_USB_DP 20 #define SOC_GPIO_PIN_T3S3_USB_DN 19 -// SPI +// RADIO SPI #define SOC_GPIO_PIN_T3S3_MOSI 6 #define SOC_GPIO_PIN_T3S3_MISO 3 #define SOC_GPIO_PIN_T3S3_SCK 5 @@ -27,8 +27,8 @@ #define SOC_GPIO_PIN_T3S3_ANT_TX 10 // I2C (ext.) -#define SOC_GPIO_PIN_T3S3_SDA 17 -#define SOC_GPIO_PIN_T3S3_SCL 18 +#define SOC_GPIO_PIN_T3S3_SDA 45 /* TBD */ +#define SOC_GPIO_PIN_T3S3_SCL 46 /* TBD */ // status LED #define SOC_GPIO_PIN_T3S3_LED 37 diff --git a/software/firmware/source/libraries/XPowersLib/src/XPowersAXP2101.tpp b/software/firmware/source/libraries/XPowersLib/src/XPowersAXP2101.tpp index 603e5b0e8..3199ead11 100644 --- a/software/firmware/source/libraries/XPowersLib/src/XPowersAXP2101.tpp +++ b/software/firmware/source/libraries/XPowersLib/src/XPowersAXP2101.tpp @@ -2387,7 +2387,7 @@ public: if (opt >= XPOWERS_AXP2101_CHG_VOL_MAX)return false; int val = readRegister(XPOWERS_AXP2101_CV_CHG_VOL_SET); if (val == -1)return false; - val &= 0xFC; + val &= 0xF8; return 0 == writeRegister(XPOWERS_AXP2101_CV_CHG_VOL_SET, val | opt); } @@ -2397,7 +2397,7 @@ public: */ uint8_t getChargeTargetVoltage(void) { - return (readRegister(XPOWERS_AXP2101_CV_CHG_VOL_SET) & 0x03); + return (readRegister(XPOWERS_AXP2101_CV_CHG_VOL_SET) & 0x07); }