(hidapi, platform)
Loops over all devices in the hidapi and attempts to locate the emotiv headset.

    Since hidapi ultimately uses the path there is no reason to get the vendor id or product id.

    Although, they may be useful in locating the device.

    :returns
        path - the path to the device
        serial_number - the serial number of the device
Loops over all devices in the hidapi and attempts to locate the emotiv headset.
Loops over all devices in the hidapi and attempts to locate the emotiv headset .
def hid_enumerate(hidapi, platform):
    """
    Loops over all devices in the hidapi and attempts to locate the emotiv headset.

    Since hidapi ultimately uses the path there is no reason to get the vendor id or product id.

    Although, they may be useful in locating the device.

    :returns
        path - the path to the device
        serial_number - the serial number of the device
    """
    path = ""
    serial_number = ""
    devices = get_hid_devices[platform](hidapi)
    emotiv_devices = []
    for device in devices:
        if device_is_emotiv(device, platform):
            serial_number = device.serial_number
            path = device.path
            emotiv_devices.append(device)
    if platform != "Windows":
        return path, serial_number
    else:
        return emotiv_devices
def hid_enumerate ( hidapi , platform ) : path = "" serial_number = "" devices = get_hid_devices [ platform ] ( hidapi ) emotiv_devices = [ ] for device in devices : if device_is_emotiv ( device , platform ) : serial_number = device . serial_number path = device . path emotiv_devices . append ( device ) if platform != "Windows" : return path , serial_number else : return emotiv_devices