Merge branch 'flipperdevices:dev' into dev

This commit is contained in:
Eng1n33r
2022-04-19 10:34:58 +03:00
committed by GitHub
10 changed files with 89 additions and 32 deletions
+14 -9
View File
@@ -28,22 +28,25 @@ typedef struct {
bool FD : 1; // Full-discharge is detected
} BatteryStatus;
_Static_assert(sizeof(BatteryStatus) == 2, "Incorrect structure size");
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; /**< Calibration mode enabled */
uint8_t SEC : 2; /**< Current security access */
bool EDV2 : 1; /**< EDV2 threshold exceeded */
bool VDQ : 1; /**< Indicates if Current discharge cycle is NOT qualified or qualified for an FCC updated */
bool INITCOMP : 1; /**< gauge initialization is complete */
bool SMTH : 1; /**< RemainingCapacity is scaled by smooth engine */
bool BTPINT : 1; /**< BTP threshold has been crossed */
// High byte, Low bit first
uint8_t RSVD1 : 2;
bool CFGUPDATE : 1;
bool CFGUPDATE : 1; /**< Gauge is in CONFIG UPDATE mode */
uint8_t RSVD0 : 5;
} OperationStatus;
_Static_assert(sizeof(OperationStatus) == 2, "Incorrect structure size");
typedef struct {
// Low byte, Low bit first
bool CCT : 1;
@@ -62,6 +65,8 @@ typedef struct {
uint8_t RSVD3 : 3;
} GaugingConfig;
_Static_assert(sizeof(GaugingConfig) == 2, "Incorrect structure size");
typedef struct {
union {
GaugingConfig gauge_conf;