USB_Host_Shield_2.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros
hid.h File Reference
#include <inttypes.h>
#include <avr/pgmspace.h>
#include "avrpins.h"
#include "max3421e.h"
#include "usbhost.h"
#include "usb_ch9.h"
#include "Usb.h"
#include <WProgram.h>
#include "printhex.h"
#include "hexdump.h"
#include "message.h"
#include "confdescparser.h"
#include "hidusagestr.h"
Include dependency graph for hid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  HidItemPrefix
 
struct  MainItemIOFeature
 
class  HIDReportParser
 
class  HID
 

Macros

#define DATA_SIZE_MASK   0x03
 
#define TYPE_MASK   0x0C
 
#define TAG_MASK   0xF0
 
#define DATA_SIZE_0   0x00
 
#define DATA_SIZE_1   0x01
 
#define DATA_SIZE_2   0x02
 
#define DATA_SIZE_4   0x03
 
#define TYPE_MAIN   0x00
 
#define TYPE_GLOBAL   0x04
 
#define TYPE_LOCAL   0x08
 
#define TAG_MAIN_INPUT   0x80
 
#define TAG_MAIN_OUTPUT   0x90
 
#define TAG_MAIN_COLLECTION   0xA0
 
#define TAG_MAIN_FEATURE   0xB0
 
#define TAG_MAIN_ENDCOLLECTION   0xC0
 
#define TAG_GLOBAL_USAGEPAGE   0x00
 
#define TAG_GLOBAL_LOGICALMIN   0x10
 
#define TAG_GLOBAL_LOGICALMAX   0x20
 
#define TAG_GLOBAL_PHYSMIN   0x30
 
#define TAG_GLOBAL_PHYSMAX   0x40
 
#define TAG_GLOBAL_UNITEXP   0x50
 
#define TAG_GLOBAL_UNIT   0x60
 
#define TAG_GLOBAL_REPORTSIZE   0x70
 
#define TAG_GLOBAL_REPORTID   0x80
 
#define TAG_GLOBAL_REPORTCOUNT   0x90
 
#define TAG_GLOBAL_PUSH   0xA0
 
#define TAG_GLOBAL_POP   0xB0
 
#define TAG_LOCAL_USAGE   0x00
 
#define TAG_LOCAL_USAGEMIN   0x10
 
#define TAG_LOCAL_USAGEMAX   0x20
 
#define bmREQ_HIDOUT   USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
 
#define bmREQ_HIDIN   USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
 
#define bmREQ_HIDREPORT   USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_STANDARD|USB_SETUP_RECIPIENT_INTERFACE
 
#define HID_REQUEST_GET_REPORT   0x01
 
#define HID_REQUEST_GET_IDLE   0x02
 
#define HID_REQUEST_GET_PROTOCOL   0x03
 
#define HID_REQUEST_SET_REPORT   0x09
 
#define HID_REQUEST_SET_IDLE   0x0A
 
#define HID_REQUEST_SET_PROTOCOL   0x0B
 
#define HID_DESCRIPTOR_HID   0x21
 
#define HID_DESCRIPTOR_REPORT   0x22
 
#define HID_DESRIPTOR_PHY   0x23
 
#define HID_BOOT_PROTOCOL   0x00
 
#define HID_RPT_PROTOCOL   0x01
 
#define HID_INTF   0x03
 
#define HID_BOOT_INTF_SUBCLASS   0x01
 
#define HID_PROTOCOL_NONE   0x00
 
#define HID_PROTOCOL_KEYBOARD   0x01
 
#define HID_PROTOCOL_MOUSE   0x02
 
#define HID_ITEM_TYPE_MAIN   0
 
#define HID_ITEM_TYPE_GLOBAL   1
 
#define HID_ITEM_TYPE_LOCAL   2
 
#define HID_ITEM_TYPE_RESERVED   3
 
#define HID_LONG_ITEM_PREFIX   0xfe
 
#define bmHID_MAIN_ITEM_TAG   0xfc
 
#define bmHID_MAIN_ITEM_INPUT   0x80
 
#define bmHID_MAIN_ITEM_OUTPUT   0x90
 
#define bmHID_MAIN_ITEM_FEATURE   0xb0
 
#define bmHID_MAIN_ITEM_COLLECTION   0xa0
 
#define bmHID_MAIN_ITEM_END_COLLECTION   0xce
 
#define HID_MAIN_ITEM_COLLECTION_PHYSICAL   0
 
#define HID_MAIN_ITEM_COLLECTION_APPLICATION   1
 
#define HID_MAIN_ITEM_COLLECTION_LOGICAL   2
 
#define HID_MAIN_ITEM_COLLECTION_REPORT   3
 
#define HID_MAIN_ITEM_COLLECTION_NAMED_ARRAY   4
 
#define HID_MAIN_ITEM_COLLECTION_USAGE_SWITCH   5
 
#define HID_MAIN_ITEM_COLLECTION_USAGE_MODIFIER   6
 
#define MAX_REPORT_PARSERS   2
 
#define HID_MAX_HID_CLASS_DESCRIPTORS   5
 

Macro Definition Documentation

#define bmHID_MAIN_ITEM_COLLECTION   0xa0
#define bmHID_MAIN_ITEM_END_COLLECTION   0xce
#define bmHID_MAIN_ITEM_FEATURE   0xb0
#define bmHID_MAIN_ITEM_INPUT   0x80
#define bmHID_MAIN_ITEM_OUTPUT   0x90
#define bmHID_MAIN_ITEM_TAG   0xfc
#define DATA_SIZE_0   0x00
#define DATA_SIZE_1   0x01
#define DATA_SIZE_2   0x02
#define DATA_SIZE_4   0x03
#define DATA_SIZE_MASK   0x03
#define HID_BOOT_INTF_SUBCLASS   0x01
#define HID_BOOT_PROTOCOL   0x00
#define HID_DESCRIPTOR_HID   0x21
#define HID_DESCRIPTOR_REPORT   0x22
#define HID_DESRIPTOR_PHY   0x23
#define HID_INTF   0x03
#define HID_ITEM_TYPE_GLOBAL   1
#define HID_ITEM_TYPE_LOCAL   2
#define HID_ITEM_TYPE_MAIN   0
#define HID_ITEM_TYPE_RESERVED   3
#define HID_LONG_ITEM_PREFIX   0xfe
#define HID_MAIN_ITEM_COLLECTION_APPLICATION   1
#define HID_MAIN_ITEM_COLLECTION_LOGICAL   2
#define HID_MAIN_ITEM_COLLECTION_NAMED_ARRAY   4
#define HID_MAIN_ITEM_COLLECTION_PHYSICAL   0
#define HID_MAIN_ITEM_COLLECTION_REPORT   3
#define HID_MAIN_ITEM_COLLECTION_USAGE_MODIFIER   6
#define HID_MAIN_ITEM_COLLECTION_USAGE_SWITCH   5
#define HID_MAX_HID_CLASS_DESCRIPTORS   5
#define HID_PROTOCOL_KEYBOARD   0x01
#define HID_PROTOCOL_MOUSE   0x02
#define HID_PROTOCOL_NONE   0x00
#define HID_REQUEST_GET_IDLE   0x02
#define HID_REQUEST_GET_PROTOCOL   0x03
#define HID_REQUEST_GET_REPORT   0x01
#define HID_REQUEST_SET_IDLE   0x0A
#define HID_REQUEST_SET_PROTOCOL   0x0B
#define HID_REQUEST_SET_REPORT   0x09
#define HID_RPT_PROTOCOL   0x01
#define MAX_REPORT_PARSERS   2
#define TAG_GLOBAL_LOGICALMAX   0x20
#define TAG_GLOBAL_LOGICALMIN   0x10
#define TAG_GLOBAL_PHYSMAX   0x40
#define TAG_GLOBAL_PHYSMIN   0x30
#define TAG_GLOBAL_POP   0xB0
#define TAG_GLOBAL_PUSH   0xA0
#define TAG_GLOBAL_REPORTCOUNT   0x90
#define TAG_GLOBAL_REPORTID   0x80
#define TAG_GLOBAL_REPORTSIZE   0x70
#define TAG_GLOBAL_UNIT   0x60
#define TAG_GLOBAL_UNITEXP   0x50
#define TAG_GLOBAL_USAGEPAGE   0x00
#define TAG_LOCAL_USAGE   0x00
#define TAG_LOCAL_USAGEMAX   0x20
#define TAG_LOCAL_USAGEMIN   0x10
#define TAG_MAIN_COLLECTION   0xA0
#define TAG_MAIN_ENDCOLLECTION   0xC0
#define TAG_MAIN_FEATURE   0xB0
#define TAG_MAIN_INPUT   0x80
#define TAG_MAIN_OUTPUT   0x90
#define TAG_MASK   0xF0
#define TYPE_GLOBAL   0x04
#define TYPE_LOCAL   0x08
#define TYPE_MAIN   0x00
#define TYPE_MASK   0x0C