Skip to content

Commit

Permalink
adjustments fpr ttgo t-supreme
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberman54 committed Jan 25, 2025
1 parent 9a64195 commit 00f8107
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 6 additions & 0 deletions include/power.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ bool batt_sufficient(void);
extern int8_t batt_level;

#ifdef HAS_PMU
#ifndef PMU_SDA
#define PMU_SDA SDA
#endif
#ifndef PMU_SCL
#define PMU_SDA SCL
#endif
#include <XPowersLib.h>
extern XPowersPMU pmu;
enum pmu_power_t { pmu_power_on, pmu_power_off, pmu_power_sleep };
Expand Down
11 changes: 6 additions & 5 deletions shared/hal/ttgotsupremes3.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

// for pinouts see https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series/blob/master/schematic/LilyGo_T-BeamS3Supreme.pdf

// i2c bus addresses: 0x77 = BME280, 0x1c = ?, 0x3c = ?

#ifndef _TTGOTSUPREMES3_H
#define _TTGOTSUPREMES3_H

Expand Down Expand Up @@ -63,11 +65,10 @@
//#define BME280_ADDR 0x76 // change to 0x77 depending on your wiring

// power management settings
#define I2C_SDA1 42 // Used for PMU management and PCF8563
#define I2C_SCL1 41 // Used for PMU management and PCF8563
//
#define HAS_PMU 1 // has AXP202 chip
#define XPOWERS_CHIP_AXP202 1
#define HAS_PMU 1 // has AXP2101 chip
#define XPOWERS_CHIP_AXP2101 1
#define PMU_SDA GPIO_NUM_42 // Used for PMU management and PCF8563
#define PMU_SCL GPIO_NUM_41 // Used for PMU management and PCF8563
#define PMU_INT GPIO_NUM_40 // battery interrupt
#define PMU_CHG_CURRENT XPOWERS_AXP202_CHG_CUR_1000MA // battery charge current
// See: xpowers_AXP202_chg_curr_t
Expand Down

0 comments on commit 00f8107

Please sign in to comment.