1#ifndef __INCLUDED_HID_H__
2#define __INCLUDED_HID_H__
22#define HID_DBGMSG printf
24#define HID_DBGMSG(...)
35#define CONFIG_HID_MAX_DEV 3
36#define HID_MAX_BUFFER_SIZE 64
37#define HID_CLIENT_SIZE 64
43#define HID_RET_DEV_NOT_FOUND -9
44#define HID_RET_IO_ERR -11
45#define HID_RET_INVALID_PARAMETER -13
46#define HID_RET_OUT_OF_MEMORY -15
47#define HID_RET_NOT_SUPPORTED -17
50#define HID_REPORT_GET 0x01
51#define HID_GET_IDLE 0x02
52#define HID_GET_PROTOCOL 0x03
53#define HID_REPORT_SET 0x09
54#define HID_SET_IDLE 0x0A
55#define HID_SET_PROTOCOL 0x0B
HIDDEN_SYMBOLS struct usb_device USB_DEV_T
#define HID_MAX_BUFFER_SIZE
int32_t USBH_HidStartIntReadPipe(HID_DEV_T *hdev, HID_IR_FUNC *func)
Start purge the USB interrupt in transfer.
int32_t HID_HidGetProtocol(HID_DEV_T *hdev, uint8_t *protocol)
HID class standard request Get_Protocol request. The Get_Protocol request reads which protocol is cur...
int32_t HID_HidGetReportDescriptor(HID_DEV_T *hdev, uint8_t *desc_buf, int buf_max_len)
Get report descriptor request.
int32_t HID_HidGetIdle(HID_DEV_T *hdev, int rtp_id, uint8_t *idle_rate)
HID class standard request Get_Idle request. The Get_Idle request reads the current idle rate for a p...
void USBH_HidInit(void)
Init USB Host HID driver.
int32_t HID_HidSetIdle(HID_DEV_T *hdev, int rtp_id, uint8_t idle_rate)
HID class standard request Set_Idle request. The Set_Idle request silences a particular report on the...
uint8_t inbuf[HID_MAX_BUFFER_SIZE]
int32_t USBH_HidStartIntWritePipe(HID_DEV_T *hdev, HID_IW_FUNC *func)
Start purge the USB interrupt out transfer.
int32_t HID_HidGetReport(HID_DEV_T *hdev, int rtp_typ, int rtp_id, uint8_t *data, int len)
HID class standard request Get_Report request. The Get_Report request allows the host to receive a re...
uint8_t client[HID_CLIENT_SIZE]
HID_DEV_T * USBH_HidGetDeviceList(void)
Get a list of currently connected USB Hid devices.
int32_t HID_HidSetReport(HID_DEV_T *hdev, int rtp_typ, int rtp_id, uint8_t *data, int len)
HID class standard request Set_Report request. The Set_Report request allows the host to send a repor...
int32_t HID_HidSetProtocol(HID_DEV_T *hdev, uint8_t protocol)
HID class standard request Set_Protocol request. The Set_Protocol switches between the boot protocol ...
struct usbhid_dev HID_DEV_T
void() HID_IR_FUNC(struct usbhid_dev *hdev, uint8_t *rdata, int data_len)
void() HID_IW_FUNC(struct usbhid_dev *hdev, uint8_t **wbuff, int *buff_size)
USB Host core driver header file.