src/is31fl32xx/is31fl32xx.py
def enable_leds(self, ena_list):
        """enable_leds()
        enables/disables all leds. ena_list needs to contain exactly 18 items
        """
        if len(ena_list) != len(self._reg_map["pwm"]):
            raise ValueError("ena_list needs to have {0} items".format(
                len(self._reg_map["pwm"])))
        # each register only uses the 6 LSB to represent 6 LED pwm channels
        ena_bytes = [0, 0, 0]
        for idx in range(0, 6):
            if ena_list[idx]:
                ena_bytes[0] |= 1 << idx
            if ena_list[6 + idx]:
                ena_bytes[1] |= 1 << idx
            if ena_list[12 + idx]:
                ena_bytes[2] |= 1 << idx
        # send the actual enable bitmap
        self.write_registers(self._reg_map["ctrl"][0], ena_bytes)
enable_leds()
        enables/disables all leds. ena_list needs to contain exactly 18 items
        
enable_leds()
enables/disables all leds. ena_list needs to contain exactly 18 items
enable_leds () enables / disables all leds . ena_list needs to contain exactly 18 items
def enable_leds(self, ena_list):
        if len(ena_list) != len(self._reg_map["pwm"]):
            raise ValueError("ena_list needs to have {0} items".format(
                len(self._reg_map["pwm"])))
        ena_bytes = [0, 0, 0]
        for idx in range(0, 6):
            if ena_list[idx]:
                ena_bytes[0] |= 1 << idx
            if ena_list[6 + idx]:
                ena_bytes[1] |= 1 << idx
            if ena_list[12 + idx]:
                ena_bytes[2] |= 1 << idx
        self.write_registers(self._reg_map["ctrl"][0], ena_bytes)
def enable_leds ( self , ena_list ) : if len ( ena_list ) != len ( self . _reg_map [ "pwm" ] ) : raise ValueError ( "ena_list needs to have {0} items" . format ( len ( self . _reg_map [ "pwm" ] ) ) ) ena_bytes = [ 0 , 0 , 0 ] for idx in range ( 0 , 6 ) : if ena_list [ idx ] : ena_bytes [ 0 ] |= 1 << idx if ena_list [ 6 + idx ] : ena_bytes [ 1 ] |= 1 << idx if ena_list [ 12 + idx ] : ena_bytes [ 2 ] |= 1 << idx self . write_registers ( self . _reg_map [ "ctrl" ] [ 0 ] , ena_bytes )
enable_leds()
enables/disables all leds.
enable_leds () enables / disables all leds .
"""enable_leds()
        enables/disables all leds. ena_list needs to contain exactly 18 items
        """ # each register only uses the 6 LSB to represent 6 LED pwm channels # send the actual enable bitmap
self
ena_list