33
33
__version__ = "0.0.0-auto.0"
34
34
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_LC709203F.git"
35
35
36
- LC709023F_I2CADDR_DEFAULT = const (0x0B )
36
+ LC709203F_I2CADDR_DEFAULT = const (0x0B )
37
37
LC709203F_CMD_ICVERSION = const (0x11 )
38
38
LC709203F_CMD_BATTPROF = const (0x12 )
39
39
LC709203F_CMD_POWERMODE = const (0x15 )
@@ -93,10 +93,10 @@ class PackSize(CV):
93
93
)
94
94
95
95
96
- class LC709023F :
97
- """Interface library for LC709023F battery monitoring and fuel gauge sensors"""
96
+ class LC709203F :
97
+ """Interface library for LC709203F battery monitoring and fuel gauge sensors"""
98
98
99
- def __init__ (self , i2c_bus , address = LC709023F_I2CADDR_DEFAULT ):
99
+ def __init__ (self , i2c_bus , address = LC709203F_I2CADDR_DEFAULT ):
100
100
self .i2c_device = i2c_device .I2CDevice (i2c_bus , address )
101
101
self ._buf = bytearray (10 )
102
102
self .power_mode = PowerMode .OPERATE # pylint: disable=no-member
@@ -171,7 +171,7 @@ def _generate_crc(self, data):
171
171
return crc & 0xFF
172
172
173
173
def _read_word (self , command ):
174
- self ._buf [0 ] = LC709023F_I2CADDR_DEFAULT * 2 # write byte
174
+ self ._buf [0 ] = LC709203F_I2CADDR_DEFAULT * 2 # write byte
175
175
self ._buf [1 ] = command # command / register
176
176
self ._buf [2 ] = self ._buf [0 ] | 0x1 # read byte
177
177
@@ -185,7 +185,7 @@ def _read_word(self, command):
185
185
return (self ._buf [4 ] << 8 ) | self ._buf [3 ]
186
186
187
187
def _write_word (self , command , data ):
188
- self ._buf [0 ] = LC709023F_I2CADDR_DEFAULT * 2 # write byte
188
+ self ._buf [0 ] = LC709203F_I2CADDR_DEFAULT * 2 # write byte
189
189
self ._buf [1 ] = command # command / register
190
190
self ._buf [2 ] = data & 0xFF
191
191
self ._buf [3 ] = (data >> 8 ) & 0xFF
0 commit comments