x
This commit is contained in:
@@ -41,6 +41,8 @@ static const char *TAG = "axp2101.sensor";
|
||||
|
||||
void AXP2101Component::setup()
|
||||
{
|
||||
ESP_LOGI(TAG, "AXP2101Component::setup invoked");
|
||||
|
||||
#warning "axp2101.sensor basically disabled XXX"
|
||||
#if 0
|
||||
ESP_LOGCONFIG(TAG, "getID:0x%x", PMU.getChipID());
|
||||
@@ -305,10 +307,10 @@ void AXP2101Component::setup()
|
||||
|
||||
void AXP2101Component::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "AXP2101:");
|
||||
LOG_I2C_DEVICE(this);
|
||||
LOG_SENSOR(" ", "Battery Voltage", this->batteryvoltage_sensor_);
|
||||
LOG_SENSOR(" ", "Battery Level", this->batterylevel_sensor_);
|
||||
LOG_BINARY_SENSOR(" ", "Battery Charging", this->batterycharging_bsensor_);
|
||||
//LOG_I2C_DEVICE(this);
|
||||
//LOG_SENSOR(" ", "Battery Voltage", this->batteryvoltage_sensor_);
|
||||
//LOG_SENSOR(" ", "Battery Level", this->batterylevel_sensor_);
|
||||
//LOG_BINARY_SENSOR(" ", "Battery Charging", this->batterycharging_bsensor_);
|
||||
}
|
||||
|
||||
float AXP2101Component::get_setup_priority() const { return setup_priority::DATA; }
|
||||
@@ -350,6 +352,8 @@ void AXP2101Component::update() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
void AXP2101Component::Write1Byte( uint8_t Addr , uint8_t Data )
|
||||
{
|
||||
this->write_byte(Addr, Data);
|
||||
@@ -834,6 +838,7 @@ std::string AXP2101Component::GetStartupReason() {
|
||||
return "ESP_RST_SDIO";
|
||||
return std::string{"RESET_UNKNOWN_REASON"};
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,65 +61,65 @@ protected:
|
||||
* LD03: Vibration Motor
|
||||
*/
|
||||
|
||||
void UpdateBrightness();
|
||||
bool GetBatState();
|
||||
uint8_t GetBatData();
|
||||
|
||||
void EnableCoulombcounter(void);
|
||||
void DisableCoulombcounter(void);
|
||||
void StopCoulombcounter(void);
|
||||
void ClearCoulombcounter(void);
|
||||
uint32_t GetCoulombchargeData(void);
|
||||
uint32_t GetCoulombdischargeData(void);
|
||||
float GetCoulombData(void);
|
||||
|
||||
uint16_t GetVbatData(void) __attribute__((deprecated));
|
||||
uint16_t GetIchargeData(void) __attribute__((deprecated));
|
||||
uint16_t GetIdischargeData(void) __attribute__((deprecated));
|
||||
uint16_t GetTempData(void) __attribute__((deprecated));
|
||||
uint32_t GetPowerbatData(void) __attribute__((deprecated));
|
||||
uint16_t GetVinData(void) __attribute__((deprecated));
|
||||
uint16_t GetIinData(void) __attribute__((deprecated));
|
||||
uint16_t GetVusbinData(void) __attribute__((deprecated));
|
||||
uint16_t GetIusbinData(void) __attribute__((deprecated));
|
||||
uint16_t GetVapsData(void) __attribute__((deprecated));
|
||||
uint8_t GetBtnPress(void);
|
||||
|
||||
// -- sleep
|
||||
void SetSleep(void);
|
||||
void DeepSleep(uint64_t time_in_us = 0);
|
||||
void LightSleep(uint64_t time_in_us = 0);
|
||||
|
||||
// void SetChargeVoltage( uint8_t );
|
||||
void SetChargeCurrent( uint8_t );
|
||||
float GetBatCurrent();
|
||||
float GetVinVoltage();
|
||||
float GetVinCurrent();
|
||||
float GetVBusVoltage();
|
||||
float GetVBusCurrent();
|
||||
float GetTempInAXP2101();
|
||||
float GetBatPower();
|
||||
float GetBatChargeCurrent();
|
||||
float GetAPSVoltage();
|
||||
float GetBatCoulombInput();
|
||||
float GetBatCoulombOut();
|
||||
uint8_t GetWarningLevel(void);
|
||||
void SetCoulombClear();
|
||||
void SetLDO2( bool State );
|
||||
void SetLDO3( bool State );
|
||||
void SetAdcState(bool State);
|
||||
|
||||
void PowerOff();
|
||||
|
||||
|
||||
void Write1Byte( uint8_t Addr , uint8_t Data );
|
||||
uint8_t Read8bit( uint8_t Addr );
|
||||
uint16_t Read12Bit( uint8_t Addr);
|
||||
uint16_t Read13Bit( uint8_t Addr);
|
||||
uint16_t Read16bit( uint8_t Addr );
|
||||
uint32_t Read24bit( uint8_t Addr );
|
||||
uint32_t Read32bit( uint8_t Addr );
|
||||
void ReadBuff( uint8_t Addr , uint8_t Size , uint8_t *Buff );
|
||||
// void UpdateBrightness();
|
||||
// bool GetBatState();
|
||||
// uint8_t GetBatData();
|
||||
//
|
||||
// void EnableCoulombcounter(void);
|
||||
// void DisableCoulombcounter(void);
|
||||
// void StopCoulombcounter(void);
|
||||
// void ClearCoulombcounter(void);
|
||||
// uint32_t GetCoulombchargeData(void);
|
||||
// uint32_t GetCoulombdischargeData(void);
|
||||
// float GetCoulombData(void);
|
||||
//
|
||||
// uint16_t GetVbatData(void) __attribute__((deprecated));
|
||||
// uint16_t GetIchargeData(void) __attribute__((deprecated));
|
||||
// uint16_t GetIdischargeData(void) __attribute__((deprecated));
|
||||
// uint16_t GetTempData(void) __attribute__((deprecated));
|
||||
// uint32_t GetPowerbatData(void) __attribute__((deprecated));
|
||||
// uint16_t GetVinData(void) __attribute__((deprecated));
|
||||
// uint16_t GetIinData(void) __attribute__((deprecated));
|
||||
// uint16_t GetVusbinData(void) __attribute__((deprecated));
|
||||
// uint16_t GetIusbinData(void) __attribute__((deprecated));
|
||||
// uint16_t GetVapsData(void) __attribute__((deprecated));
|
||||
// uint8_t GetBtnPress(void);
|
||||
//
|
||||
// // -- sleep
|
||||
// void SetSleep(void);
|
||||
// void DeepSleep(uint64_t time_in_us = 0);
|
||||
// void LightSleep(uint64_t time_in_us = 0);
|
||||
//
|
||||
// // void SetChargeVoltage( uint8_t );
|
||||
// void SetChargeCurrent( uint8_t );
|
||||
// float GetBatCurrent();
|
||||
// float GetVinVoltage();
|
||||
// float GetVinCurrent();
|
||||
// float GetVBusVoltage();
|
||||
// float GetVBusCurrent();
|
||||
// float GetTempInAXP2101();
|
||||
// float GetBatPower();
|
||||
// float GetBatChargeCurrent();
|
||||
// float GetAPSVoltage();
|
||||
// float GetBatCoulombInput();
|
||||
// float GetBatCoulombOut();
|
||||
// uint8_t GetWarningLevel(void);
|
||||
// void SetCoulombClear();
|
||||
// void SetLDO2( bool State );
|
||||
// void SetLDO3( bool State );
|
||||
// void SetAdcState(bool State);
|
||||
//
|
||||
// void PowerOff();
|
||||
//
|
||||
//
|
||||
// void Write1Byte( uint8_t Addr , uint8_t Data );
|
||||
// uint8_t Read8bit( uint8_t Addr );
|
||||
// uint16_t Read12Bit( uint8_t Addr);
|
||||
// uint16_t Read13Bit( uint8_t Addr);
|
||||
// uint16_t Read16bit( uint8_t Addr );
|
||||
// uint32_t Read24bit( uint8_t Addr );
|
||||
// uint32_t Read32bit( uint8_t Addr );
|
||||
// void ReadBuff( uint8_t Addr , uint8_t Size , uint8_t *Buff );
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user