def align32()

in pci_lib/pci_lib.py [0:0]


def align32(start, stop):
    # Mask off low bits of start to align down
    astart = start & ~0b11
    # If stop is aligned leave as is
    if stop & 0b11 == 0:
        astop = stop
    else:
        # Otherwise align-down and add 4
        astop = (stop & ~0b11) + 4
    return astart, astop