Get the list of bits of val_int integer (default size is 16 bits)

        Return bits list, least significant bit first. Use list.reverse() if
        need.

        :param val_int: integer value
        :type val_int: int
        :param val_size: bit size of integer (word = 16, long = 32) (optional)
        :type val_size: int
        :returns: list of boolean "bits" (least significant first)
        :rtype: list

def get_bits_from_int(val_int, val_size=16):
    """Get the list of bits of val_int integer (default size is 16 bits)

        Return bits list, least significant bit first. Use list.reverse() if
        need.

        :param val_int: integer value
        :type val_int: int
        :param val_size: bit size of integer (word = 16, long = 32) (optional)
        :type val_size: int
        :returns: list of boolean "bits" (least significant first)
        :rtype: list
    """
    # allocate a bit_nb size list
    bits = [None] * val_size
    # fill bits list with bit items
    for i, item in enumerate(bits):
        bits[i] = bool((val_int >> i) & 0x01)
    # return bits list
    return bits