MG32F10x Standard Peripherals Firmware Library

USB_HID_KeyBoard/usbd_user.h
1 /* Define to prevent recursive inclusion -------------------------------------*/
2 #ifndef __USBD_USER_H
3 #define __USBD_USER_H
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 /* Includes ------------------------------------------------------------------*/
10 #include <stdint.h>
11 #include <stdbool.h>
12 #include "usbd_core.h"
13
14 /* Exported types ------------------------------------------------------------*/
15 /* Exported constants --------------------------------------------------------*/
16 /* Exported macro ------------------------------------------------------------*/
17 /* Exported functions --------------------------------------------------------*/
18
19 void USBD_User_Init(void);
20 void USBD_User_DeInit(void);
21 void USBD_User_Connect(void);
22 void USBD_User_Disconnect(void);
23
24 void USBD_User_Reset(void);
25 void USBD_User_Resume(void);
26 void USBD_User_Suspend(void);
27 void USBD_User_SOF(void);
28
29 uint8_t* USBD_User_GetDeviceDescriptor(uint16_t* length);
30 uint8_t* USBD_User_GetConfigDescriptor(uint8_t index, uint16_t* length);
31 uint8_t* USBD_User_GetStringDescriptor(uint8_t index, uint16_t* length);
32 uint8_t* USBD_User_GetHIDDescriptor(uint8_t desc_type, uint16_t* length);
33 bool USBD_User_SetConfig(uint8_t cfgidx);
34 void USBD_User_ClearConfig(uint8_t cfgidx);
35
36 UsbdControlStage USBD_User_EndPoint0_Setup(void);
37 UsbdControlStage USBD_User_EndPoint0_Out(void);
38
39 void USBD_User_EP1_IN(void);
40 void USBD_User_EP2_IN(void);
41 void USBD_User_EP3_IN(void);
42 void USBD_User_EP1_OUT(void);
43 void USBD_User_EP2_OUT(void);
44 void USBD_User_EP3_OUT(void);
45
46 #ifdef __cplusplus
47 }
48 #endif
49
50 #endif /* __USBD_USER_H */
usbd_core.h