Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
USB Human Interface Device (HID)

protocol definitions

USB Human Interface Device (HID) protocol definitions

Data Structures

struct  usb_hid_descriptor_t
 HID Descriptor. More...
 

Enumerations

enum  usb_descriptor_type_hid {
  USB_DT_HID = 0x21,
  USB_DT_HID_REPORT = 0x22,
  USB_DT_HID_PHYSICAL = 0x23
}
 HID USB descriptor types. More...
 
enum  usb_hid_item_report_type {
  USB_HID_ITEM_REPORT_TYPE_MAIN = 0,
  USB_HID_ITEM_REPORT_TYPE_GLOBAL = 1,
  USB_HID_ITEM_REPORT_TYPE_LOCAL = 2,
  USB_HID_ITEM_REPORT_TYPE_LONG = 3
}
 HID Type for report descriptor. More...
 
enum  usb_hid_protocol {
  USB_HID_PROCOTOL_BOOT = 0,
  USB_HID_PROCOTOL_REPORT = 1
}
 HID protocol. More...
 
enum  usb_hid_report_type {
  USB_HID_REPORT_TYPE_INPUT = 1,
  USB_HID_REPORT_TYPE_OUTPUT = 2,
  USB_HID_REPORT_TYPE_FEATURE = 3
}
 HID report type. More...
 
enum  usb_reqid_hid {
  USB_REQ_HID_GET_REPORT = 0x01,
  USB_REQ_HID_GET_IDLE = 0x02,
  USB_REQ_HID_GET_PROTOCOL = 0x03,
  USB_REQ_HID_SET_REPORT = 0x09,
  USB_REQ_HID_SET_IDLE = 0x0A,
  USB_REQ_HID_SET_PROTOCOL = 0x0B
}
 Hid USB requests (bRequest) More...
 

Possible Class value

#define HID_CLASS   0x03
 

Possible SubClass value

#define HID_SUB_CLASS_NOBOOT   0x00
 Interface subclass NO support BOOT protocol. More...
 
#define HID_SUB_CLASS_BOOT   0x01
 Interface subclass support BOOT protocol. More...
 

Possible protocol value

#define HID_PROTOCOL_GENERIC   0x00
 Protocol generic standard. More...
 
#define HID_PROTOCOL_KEYBOARD   0x01
 Protocol keyboard standard. More...
 
#define HID_PROTOCOL_MOUSE   0x02
 Protocol mouse standard. More...
 

HID Report type

Used by SETUP_HID_GET_REPORT & SETUP_HID_SET_REPORT

#define REPORT_TYPE_INPUT   0x01
 
#define REPORT_TYPE_OUTPUT   0x02
 
#define REPORT_TYPE_FEATURE   0x03
 

Constants of field DESCRIPTOR_HID

#define USB_HID_BDC_V1_11   0x0111
 Numeric expression identifying the HID Class Specification release (here V1.11) More...
 
#define USB_HID_NUM_DESC   0x01
 Numeric expression specifying the number of class descriptors Note: Always at least one i.e. More...
 

Country code

#define USB_HID_NO_COUNTRY_CODE   0
 
#define USB_HID_COUNTRY_ARABIC   1
 
#define USB_HID_COUNTRY_BELGIAN   2
 
#define USB_HID_COUNTRY_CANADIAN_BILINGUAL   3
 
#define USB_HID_COUNTRY_CANADIAN_FRENCH   4
 
#define USB_HID_COUNTRY_CZECH_REPUBLIC   5
 
#define USB_HID_COUNTRY_DANISH   6
 
#define USB_HID_COUNTRY_FINNISH   7
 
#define USB_HID_COUNTRY_FRENCH   8
 
#define USB_HID_COUNTRY_GERMAN   9
 
#define USB_HID_COUNTRY_GREEK   10
 
#define USB_HID_COUNTRY_HEBREW   11
 
#define USB_HID_COUNTRY_HUNGARY   12
 
#define USB_HID_COUNTRY_INTERNATIONAL_ISO   13
 
#define USB_HID_COUNTRY_ITALIAN   14
 
#define USB_HID_COUNTRY_JAPAN_KATAKANA   15
 
#define USB_HID_COUNTRY_KOREAN   16
 
#define USB_HID_COUNTRY_LATIN_AMERICAN   17
 
#define USB_HID_COUNTRY_NETHERLANDS_DUTCH   18
 
#define USB_HID_COUNTRY_NORWEGIAN   19
 
#define USB_HID_COUNTRY_PERSIAN_FARSI   20
 
#define USB_HID_COUNTRY_POLAND   21
 
#define USB_HID_COUNTRY_PORTUGUESE   22
 
#define USB_HID_COUNTRY_RUSSIA   23
 
#define USB_HID_COUNTRY_SLOVAKIA   24
 
#define USB_HID_COUNTRY_SPANISH   25
 
#define USB_HID_COUNTRY_SWEDISH   26
 
#define USB_HID_COUNTRY_SWISS_FRENCH   27
 
#define USB_HID_COUNTRY_SWISS_GERMAN   28
 
#define USB_HID_COUNTRY_SWITZERLAND   29
 
#define USB_HID_COUNTRY_TAIWAN   30
 
#define USB_HID_COUNTRY_TURKISH_Q   31
 
#define USB_HID_COUNTRY_UK   32
 
#define USB_HID_COUNTRY_US   33
 
#define USB_HID_COUNTRY_YUGOSLAVIA   34
 
#define USB_HID_COUNTRY_TURKISH_F   35
 

#define HID_CLASS   0x03

Referenced by uhi_hid_mouse_install().

#define HID_PROTOCOL_GENERIC   0x00

Protocol generic standard.

#define HID_PROTOCOL_KEYBOARD   0x01

Protocol keyboard standard.

#define HID_PROTOCOL_MOUSE   0x02

Protocol mouse standard.

Referenced by uhi_hid_mouse_install().

#define HID_SUB_CLASS_BOOT   0x01

Interface subclass support BOOT protocol.

#define HID_SUB_CLASS_NOBOOT   0x00

Interface subclass NO support BOOT protocol.

#define REPORT_TYPE_FEATURE   0x03
#define REPORT_TYPE_INPUT   0x01
#define REPORT_TYPE_OUTPUT   0x02
#define USB_HID_BDC_V1_11   0x0111

Numeric expression identifying the HID Class Specification release (here V1.11)

#define USB_HID_COUNTRY_ARABIC   1
#define USB_HID_COUNTRY_BELGIAN   2
#define USB_HID_COUNTRY_CANADIAN_BILINGUAL   3
#define USB_HID_COUNTRY_CANADIAN_FRENCH   4
#define USB_HID_COUNTRY_CZECH_REPUBLIC   5
#define USB_HID_COUNTRY_DANISH   6
#define USB_HID_COUNTRY_FINNISH   7
#define USB_HID_COUNTRY_FRENCH   8
#define USB_HID_COUNTRY_GERMAN   9
#define USB_HID_COUNTRY_GREEK   10
#define USB_HID_COUNTRY_HEBREW   11
#define USB_HID_COUNTRY_HUNGARY   12
#define USB_HID_COUNTRY_INTERNATIONAL_ISO   13
#define USB_HID_COUNTRY_ITALIAN   14
#define USB_HID_COUNTRY_JAPAN_KATAKANA   15
#define USB_HID_COUNTRY_KOREAN   16
#define USB_HID_COUNTRY_LATIN_AMERICAN   17
#define USB_HID_COUNTRY_NETHERLANDS_DUTCH   18
#define USB_HID_COUNTRY_NORWEGIAN   19
#define USB_HID_COUNTRY_PERSIAN_FARSI   20
#define USB_HID_COUNTRY_POLAND   21
#define USB_HID_COUNTRY_PORTUGUESE   22
#define USB_HID_COUNTRY_RUSSIA   23
#define USB_HID_COUNTRY_SLOVAKIA   24
#define USB_HID_COUNTRY_SPANISH   25
#define USB_HID_COUNTRY_SWEDISH   26
#define USB_HID_COUNTRY_SWISS_FRENCH   27
#define USB_HID_COUNTRY_SWISS_GERMAN   28
#define USB_HID_COUNTRY_SWITZERLAND   29
#define USB_HID_COUNTRY_TAIWAN   30
#define USB_HID_COUNTRY_TURKISH_F   35
#define USB_HID_COUNTRY_TURKISH_Q   31
#define USB_HID_COUNTRY_UK   32
#define USB_HID_COUNTRY_US   33
#define USB_HID_COUNTRY_YUGOSLAVIA   34
#define USB_HID_NO_COUNTRY_CODE   0
#define USB_HID_NUM_DESC   0x01

Numeric expression specifying the number of class descriptors Note: Always at least one i.e.

Report descriptor.

HID USB descriptor types.

Enumerator
USB_DT_HID 
USB_DT_HID_REPORT 
USB_DT_HID_PHYSICAL 

HID Type for report descriptor.

Enumerator
USB_HID_ITEM_REPORT_TYPE_MAIN 
USB_HID_ITEM_REPORT_TYPE_GLOBAL 
USB_HID_ITEM_REPORT_TYPE_LOCAL 
USB_HID_ITEM_REPORT_TYPE_LONG 

HID protocol.

Enumerator
USB_HID_PROCOTOL_BOOT 
USB_HID_PROCOTOL_REPORT 

HID report type.

Enumerator
USB_HID_REPORT_TYPE_INPUT 
USB_HID_REPORT_TYPE_OUTPUT 
USB_HID_REPORT_TYPE_FEATURE 

Hid USB requests (bRequest)

Enumerator
USB_REQ_HID_GET_REPORT 
USB_REQ_HID_GET_IDLE 
USB_REQ_HID_GET_PROTOCOL 
USB_REQ_HID_SET_REPORT 
USB_REQ_HID_SET_IDLE 
USB_REQ_HID_SET_PROTOCOL