API HAL I2C: add timeout support. Update I2C API usage by drivers. (#374)

* API HAL I2C: add timeout support. Update I2C API usage by drivers.
* F4: Add missing API HAL Vibro implementation.
This commit is contained in:
あく
2021-03-10 16:23:54 +03:00
committed by GitHub
parent 468ee09785
commit 2f14f6dac5
15 changed files with 502 additions and 334 deletions

View File

@@ -8,39 +8,39 @@
typedef struct {
// Low byte, Low bit first
bool DSG:1; // The device is in DISCHARGE
bool SYSDWN:1; // System down bit indicating the system should shut down
bool TDA:1; // Terminate Discharge Alarm
bool BATTPRES:1; // Battery Present detected
bool AUTH_GD:1; // Detect inserted battery
bool OCVGD:1; // Good OCV measurement taken
bool TCA:1; // Terminate Charge Alarm
bool RSVD:1; // Reserved
bool DSG : 1; // The device is in DISCHARGE
bool SYSDWN : 1; // System down bit indicating the system should shut down
bool TDA : 1; // Terminate Discharge Alarm
bool BATTPRES : 1; // Battery Present detected
bool AUTH_GD : 1; // Detect inserted battery
bool OCVGD : 1; // Good OCV measurement taken
bool TCA : 1; // Terminate Charge Alarm
bool RSVD : 1; // Reserved
// High byte, Low bit first
bool CHGINH:1; // Charge inhibit
bool FC:1; // Full-charged is detected
bool OTD:1; // Overtemperature in discharge condition is detected
bool OTC:1; // Overtemperature in charge condition is detected
bool SLEEP:1; // Device is operating in SLEEP mode when set
bool OCVFAIL:1; // Status bit indicating that the OCV reading failed due to current
bool OCVCOMP:1; // An OCV measurement update is complete
bool FD:1; // Full-discharge is detected
bool CHGINH : 1; // Charge inhibit
bool FC : 1; // Full-charged is detected
bool OTD : 1; // Overtemperature in discharge condition is detected
bool OTC : 1; // Overtemperature in charge condition is detected
bool SLEEP : 1; // Device is operating in SLEEP mode when set
bool OCVFAIL : 1; // Status bit indicating that the OCV reading failed due to current
bool OCVCOMP : 1; // An OCV measurement update is complete
bool FD : 1; // Full-discharge is detected
} BatteryStatus;
typedef struct {
// Low byte, Low bit first
bool CALMD:1;
bool SEC0:1;
bool SEC1:1;
bool EDV2:1;
bool VDQ:1;
bool INITCOMP:1;
bool SMTH:1;
bool BTPINT:1;
bool CALMD : 1;
bool SEC0 : 1;
bool SEC1 : 1;
bool EDV2 : 1;
bool VDQ : 1;
bool INITCOMP : 1;
bool SMTH : 1;
bool BTPINT : 1;
// High byte, Low bit first
uint8_t RSVD1:2;
bool CFGUPDATE:1;
uint8_t RSVD0:5;
uint8_t RSVD1 : 2;
bool CFGUPDATE : 1;
uint8_t RSVD0 : 5;
} OperationStatus;
/* Initialize Driver */