bdk: max17050: simplify calculations

And make current readings a tiny bit (±0.16%) more accurate.
This commit is contained in:
CTCaer
2025-12-31 03:44:44 +02:00
parent 520bce08cf
commit 800bec2ec2
2 changed files with 12 additions and 19 deletions

View File

@@ -25,17 +25,6 @@
#include <utils/types.h>
/* Board default values */
#define MAX17050_BOARD_CGAIN 2 /* Actual: 1.99993 */
#define MAX17050_BOARD_SNS_RESISTOR_UOHM 5000 /* 0.005 Ohm */
#define MAX17050_STATUS_BattAbsent BIT(3)
/* Consider RepCap which is less then 10 units below FullCAP full */
#define MAX17050_FULL_THRESHOLD 10
#define MAX17050_CHARACTERIZATION_DATA_SIZE 48
#define MAXIM17050_I2C_ADDR 0x36
enum MAX17050_reg {