require '_h2ph_pre.ph';

unless(defined(&_USBHID_H_)) {
    eval 'sub _USBHID_H_ () {1;}' unless defined(&_USBHID_H_);
    eval 'sub UR_GET_HID_DESCRIPTOR () {0x06;}' unless defined(&UR_GET_HID_DESCRIPTOR);
    eval 'sub UDESC_HID () {0x21;}' unless defined(&UDESC_HID);
    eval 'sub UDESC_REPORT () {0x22;}' unless defined(&UDESC_REPORT);
    eval 'sub UDESC_PHYSICAL () {0x23;}' unless defined(&UDESC_PHYSICAL);
    eval 'sub UR_SET_HID_DESCRIPTOR () {0x07;}' unless defined(&UR_SET_HID_DESCRIPTOR);
    eval 'sub UR_GET_REPORT () {0x01;}' unless defined(&UR_GET_REPORT);
    eval 'sub UR_SET_REPORT () {0x09;}' unless defined(&UR_SET_REPORT);
    eval 'sub UR_GET_IDLE () {0x02;}' unless defined(&UR_GET_IDLE);
    eval 'sub UR_SET_IDLE () {0x0a;}' unless defined(&UR_SET_IDLE);
    eval 'sub UR_GET_PROTOCOL () {0x03;}' unless defined(&UR_GET_PROTOCOL);
    eval 'sub UR_SET_PROTOCOL () {0x0b;}' unless defined(&UR_SET_PROTOCOL);
    eval 'sub USB_HID_DESCRIPTOR_SIZE {
        local($n) = @_;
	    eval q((9+($n)*3));
    }' unless defined(&USB_HID_DESCRIPTOR_SIZE);
    eval 'sub HUP_GENERIC_DESKTOP () {0x0001;}' unless defined(&HUP_GENERIC_DESKTOP);
    eval 'sub HUP_SIMULATION () {0x0002;}' unless defined(&HUP_SIMULATION);
    eval 'sub HUP_LEDS () {0x0008;}' unless defined(&HUP_LEDS);
    eval 'sub HUP_BUTTON () {0x0009;}' unless defined(&HUP_BUTTON);
    eval 'sub HUP_DIGITIZERS () {0x000d;}' unless defined(&HUP_DIGITIZERS);
    eval 'sub HUG_POINTER () {0x0001;}' unless defined(&HUG_POINTER);
    eval 'sub HUG_MOUSE () {0x0002;}' unless defined(&HUG_MOUSE);
    eval 'sub HUG_JOYSTICK () {0x0004;}' unless defined(&HUG_JOYSTICK);
    eval 'sub HUG_GAME_PAD () {0x0005;}' unless defined(&HUG_GAME_PAD);
    eval 'sub HUG_KEYBOARD () {0x0006;}' unless defined(&HUG_KEYBOARD);
    eval 'sub HUG_KEYPAD () {0x0007;}' unless defined(&HUG_KEYPAD);
    eval 'sub HUG_X () {0x0030;}' unless defined(&HUG_X);
    eval 'sub HUG_Y () {0x0031;}' unless defined(&HUG_Y);
    eval 'sub HUG_Z () {0x0032;}' unless defined(&HUG_Z);
    eval 'sub HUG_RX () {0x0033;}' unless defined(&HUG_RX);
    eval 'sub HUG_RY () {0x0034;}' unless defined(&HUG_RY);
    eval 'sub HUG_RZ () {0x0035;}' unless defined(&HUG_RZ);
    eval 'sub HUG_SLIDER () {0x0036;}' unless defined(&HUG_SLIDER);
    eval 'sub HUG_DIAL () {0x0037;}' unless defined(&HUG_DIAL);
    eval 'sub HUG_WHEEL () {0x0038;}' unless defined(&HUG_WHEEL);
    eval 'sub HUG_HAT_SWITCH () {0x0039;}' unless defined(&HUG_HAT_SWITCH);
    eval 'sub HUG_COUNTED_BUFFER () {0x003a;}' unless defined(&HUG_COUNTED_BUFFER);
    eval 'sub HUG_BYTE_COUNT () {0x003b;}' unless defined(&HUG_BYTE_COUNT);
    eval 'sub HUG_MOTION_WAKEUP () {0x003c;}' unless defined(&HUG_MOTION_WAKEUP);
    eval 'sub HUG_VX () {0x0040;}' unless defined(&HUG_VX);
    eval 'sub HUG_VY () {0x0041;}' unless defined(&HUG_VY);
    eval 'sub HUG_VZ () {0x0042;}' unless defined(&HUG_VZ);
    eval 'sub HUG_VBRX () {0x0043;}' unless defined(&HUG_VBRX);
    eval 'sub HUG_VBRY () {0x0044;}' unless defined(&HUG_VBRY);
    eval 'sub HUG_VBRZ () {0x0045;}' unless defined(&HUG_VBRZ);
    eval 'sub HUG_VNO () {0x0046;}' unless defined(&HUG_VNO);
    eval 'sub HUG_SYSTEM_CONTROL () {0x0080;}' unless defined(&HUG_SYSTEM_CONTROL);
    eval 'sub HUG_SYSTEM_POWER_DOWN () {0x0081;}' unless defined(&HUG_SYSTEM_POWER_DOWN);
    eval 'sub HUG_SYSTEM_SLEEP () {0x0082;}' unless defined(&HUG_SYSTEM_SLEEP);
    eval 'sub HUG_SYSTEM_WAKEUP () {0x0083;}' unless defined(&HUG_SYSTEM_WAKEUP);
    eval 'sub HUG_SYSTEM_CONTEXT_MENU () {0x0084;}' unless defined(&HUG_SYSTEM_CONTEXT_MENU);
    eval 'sub HUG_SYSTEM_MAIN_MENU () {0x0085;}' unless defined(&HUG_SYSTEM_MAIN_MENU);
    eval 'sub HUG_SYSTEM_APP_MENU () {0x0086;}' unless defined(&HUG_SYSTEM_APP_MENU);
    eval 'sub HUG_SYSTEM_MENU_HELP () {0x0087;}' unless defined(&HUG_SYSTEM_MENU_HELP);
    eval 'sub HUG_SYSTEM_MENU_EXIT () {0x0088;}' unless defined(&HUG_SYSTEM_MENU_EXIT);
    eval 'sub HUG_SYSTEM_MENU_SELECT () {0x0089;}' unless defined(&HUG_SYSTEM_MENU_SELECT);
    eval 'sub HUG_SYSTEM_MENU_RIGHT () {0x008a;}' unless defined(&HUG_SYSTEM_MENU_RIGHT);
    eval 'sub HUG_SYSTEM_MENU_LEFT () {0x008b;}' unless defined(&HUG_SYSTEM_MENU_LEFT);
    eval 'sub HUG_SYSTEM_MENU_UP () {0x008c;}' unless defined(&HUG_SYSTEM_MENU_UP);
    eval 'sub HUG_SYSTEM_MENU_DOWN () {0x008d;}' unless defined(&HUG_SYSTEM_MENU_DOWN);
    eval 'sub HUD_TIP_PRESSURE () {0x0030;}' unless defined(&HUD_TIP_PRESSURE);
    eval 'sub HUD_BARREL_PRESSURE () {0x0031;}' unless defined(&HUD_BARREL_PRESSURE);
    eval 'sub HUD_IN_RANGE () {0x0032;}' unless defined(&HUD_IN_RANGE);
    eval 'sub HUD_TOUCH () {0x0033;}' unless defined(&HUD_TOUCH);
    eval 'sub HUD_UNTOUCH () {0x0034;}' unless defined(&HUD_UNTOUCH);
    eval 'sub HUD_TAP () {0x0035;}' unless defined(&HUD_TAP);
    eval 'sub HUD_QUALITY () {0x0036;}' unless defined(&HUD_QUALITY);
    eval 'sub HUD_INVERT () {0x003c;}' unless defined(&HUD_INVERT);
    eval 'sub HUD_X_TILT () {0x003d;}' unless defined(&HUD_X_TILT);
    eval 'sub HUD_Y_TILT () {0x003e;}' unless defined(&HUD_Y_TILT);
    eval 'sub HUD_AZIMUTH () {0x003f;}' unless defined(&HUD_AZIMUTH);
    eval 'sub HUD_ALTITUDE () {0x0040;}' unless defined(&HUD_ALTITUDE);
    eval 'sub HUD_TWIST () {0x0041;}' unless defined(&HUD_TWIST);
    eval 'sub HUD_TIP_SWITCH () {0x0042;}' unless defined(&HUD_TIP_SWITCH);
    eval 'sub HUD_SEC_TIP_SWITCH () {0x0043;}' unless defined(&HUD_SEC_TIP_SWITCH);
    eval 'sub HUD_BARREL_SWITCH () {0x0044;}' unless defined(&HUD_BARREL_SWITCH);
    eval 'sub HUD_ERASER () {0x0045;}' unless defined(&HUD_ERASER);
    eval 'sub HUD_TABLET_PICK () {0x0046;}' unless defined(&HUD_TABLET_PICK);
    eval 'sub HID_USAGE2 {
        local($p,$u) = @_;
	    eval q(((($p) << 16) | $u));
    }' unless defined(&HID_USAGE2);
    eval 'sub UHID_INPUT_REPORT () {0x01;}' unless defined(&UHID_INPUT_REPORT);
    eval 'sub UHID_OUTPUT_REPORT () {0x02;}' unless defined(&UHID_OUTPUT_REPORT);
    eval 'sub UHID_FEATURE_REPORT () {0x03;}' unless defined(&UHID_FEATURE_REPORT);
    eval 'sub HIO_CONST () {0x001;}' unless defined(&HIO_CONST);
    eval 'sub HIO_VARIABLE () {0x002;}' unless defined(&HIO_VARIABLE);
    eval 'sub HIO_RELATIVE () {0x004;}' unless defined(&HIO_RELATIVE);
    eval 'sub HIO_WRAP () {0x008;}' unless defined(&HIO_WRAP);
    eval 'sub HIO_NONLINEAR () {0x010;}' unless defined(&HIO_NONLINEAR);
    eval 'sub HIO_NOPREF () {0x020;}' unless defined(&HIO_NOPREF);
    eval 'sub HIO_NULLSTATE () {0x040;}' unless defined(&HIO_NULLSTATE);
    eval 'sub HIO_VOLATILE () {0x080;}' unless defined(&HIO_VOLATILE);
    eval 'sub HIO_BUFBYTES () {0x100;}' unless defined(&HIO_BUFBYTES);
}
1;
