示例#1
0
def get_pin_number(bit_pattern):
    """Returns the lowest pin number from a given bit pattern"""
    """
    pin_number = 1 # assume pin 1
    while (bit_pattern & 1) == 0:
        bit_pattern = bit_pattern >> 1
        pin_number += 1
        if pin_number > 8:
            pin_number = 0
            break
    
    return pin_number
    """
    return pfio.get_pin_number(bit_pattern)
示例#2
0
def get_pin_number(bit_pattern):
    """Returns the lowest pin number from a given bit pattern"""
    return pfio.get_pin_number(bit_pattern)