@@ -286,7 +286,7 @@ def __init__(
286286 i2c (I2C): The I2C bus to which the INA3221 is connected.
287287 address (int, optional): The I2C address of the INA3221. Defaults to DEFAULT_ADDRESS.
288288 enable(List[int], optional): channels to initialize at start (default: all)
289- probe (bool, optiona ): Probe for the device upon object creation, default is true
289+ probe (bool, optional ): Probe for the device upon object creation, default is true
290290 """
291291 self .i2c_dev = I2CDevice (i2c , address , probe = probe )
292292 self .reset ()
@@ -417,7 +417,7 @@ def flags(self) -> int:
417417 int: The current flag indicators from the Mask/Enable register,
418418 masked for relevant flag bits.
419419 """
420- return self ._read_register_bits (MASK_ENABLE , 0 , 10 )
420+ return self ._get_register_bits (MASK_ENABLE , 0 , 10 )
421421
422422 @property
423423 def power_valid_limits (self ) -> tuple :
@@ -427,9 +427,9 @@ def power_valid_limits(self) -> tuple:
427427 tuple: A tuple containing the lower and upper voltage limits
428428 in volts as (lower_limit, upper_limit).
429429 """
430- raw_value = self ._device . _get_register_bits (POWERVALID_LOWERLIMIT , 0 , 16 )
430+ raw_value = self ._get_register_bits (POWERVALID_LOWERLIMIT , 0 , 16 )
431431 lower_limit = _to_signed (raw_value , 3 , 16 ) * 8e-3
432- raw_value = self ._device . _get_register_bits (POWERVALID_UPPERLIMIT , 0 , 16 )
432+ raw_value = self ._get_register_bits (POWERVALID_UPPERLIMIT , 0 , 16 )
433433 upper_limit = _to_signed (raw_value , 3 , 16 ) * 8e-3
434434 return lower_limit , upper_limit
435435
@@ -440,8 +440,8 @@ def power_valid_limits(self, limits: tuple) -> None:
440440 # convert to mV and twos-complement
441441 lower_limit = _to_2comp (int (limits [0 ] * 1000 ), 3 , 16 )
442442 upper_limit = _to_2comp (int (limits [1 ] * 1000 ), 3 , 16 )
443- self ._device . _set_register_bits (POWERVALID_LOWERLIMIT , 0 , 16 , lower_limit )
444- self ._device . _set_register_bits (POWERVALID_UPPERLIMIT , 0 , 16 , upper_limit )
443+ self ._set_register_bits (POWERVALID_LOWERLIMIT , 0 , 16 , lower_limit )
444+ self ._set_register_bits (POWERVALID_UPPERLIMIT , 0 , 16 , upper_limit )
445445
446446 def _get_register_bits (self , reg , offset , len ):
447447 """return given bits from register"""
0 commit comments