WB32F10x Standard Peripherals Firmware Library

USB_HID_KeyBoard/usbd_user_hid.h
1 /* Define to prevent recursive inclusion -------------------------------------*/
2 #ifndef __USBD_USER_HID_H
3 #define __USBD_USER_HID_H
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 /* Includes ------------------------------------------------------------------*/
10 #include <stdint.h>
11 #include <stdbool.h>
12 #include "usb_hid_def.h"
13
14 /* Exported types ------------------------------------------------------------*/
15 /* Exported constants --------------------------------------------------------*/
16 #define USBD_HID_IF_NUM 0
17
18 extern uint8_t hid_report_buf[8];
19 extern int hid_report_xfer_flag;
20
21 /* Exported macro ------------------------------------------------------------*/
22 /* Exported functions --------------------------------------------------------*/
23
24 bool USBD_User_HID_GetReport(void);
25 bool USBD_User_HID_SetReport(bool data_received);
26 bool USBD_User_HID_GetIdle(void);
27 bool USBD_User_HID_SetIdle(void);
28 bool USBD_User_HID_GetProtocol(void);
29 bool USBD_User_HID_SetProtocol(void);
30
31 #ifdef __cplusplus
32 }
33 #endif
34
35 #endif /* __USBD_USER_HID_H */