stm32-code/stm32f072_usb_custom_hid/User/Inc/usbd_custom_hid.h

25 lines
650 B
C

#ifndef __USBD_CUSTOM_HID_H
#define __USBD_CUSTOM_HID_H
#include <stdint.h>
/* USB设备配置 */
#define USBD_VID 0x0483
#define USBD_PID 0x5710
#define USBD_PVN 0x0100 //Product Version Number
#define USBD_MAX_POWER 100
#define USBD_LANGID_STRING 1033
/* HID IN&OUT端点配置 */
#define CUSTOM_HID_IN_EP 0x81
#define CUSTOM_HID_IN_EP_SIZE 16
#define CUSTOM_HID_IN_INTERVAL 10
#define CUSTOM_HID_OUT_EP 0x02
#define CUSTOM_HID_OUT_EP_SIZE 16
#define CUSTOM_HID_OUT_EP_INTERVAL 10
void usbd_custom_hid_start(uint8_t busid, uintptr_t reg_base);
uint8_t usbd_custom_hid_send(const uint8_t *data, uint16_t length);
#endif