@staticmethod
def _endpoint_address(ep_num, direction):
    """
        Returns the endpoint number that corresponds to a given directio
        and address.
        """
    if direction:
        return ep_num | 128
    else:
        return ep_num
