mirror of
https://github.com/STMicroelectronics/stm32-mw-usb-device.git
synced 2026-02-08 20:18:07 -05:00
Release v2.10.0
This commit is contained in:
@@ -34,6 +34,10 @@ static int8_t TEMPLATE_CUSTOM_HID_Init(void);
|
||||
static int8_t TEMPLATE_CUSTOM_HID_DeInit(void);
|
||||
static int8_t TEMPLATE_CUSTOM_HID_OutEvent(uint8_t event_idx, uint8_t state);
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
extern USBD_HandleTypeDef USBD_Device;
|
||||
|
||||
__ALIGN_BEGIN static uint8_t TEMPLATE_CUSTOM_HID_ReportDesc[USBD_CUSTOM_HID_REPORT_DESC_SIZE] __ALIGN_END = {0};
|
||||
|
||||
USBD_CUSTOM_HID_ItfTypeDef USBD_CustomHID_template_fops =
|
||||
{
|
||||
TEMPLATE_CUSTOM_HID_ReportDesc,
|
||||
@@ -83,7 +87,10 @@ static int8_t TEMPLATE_CUSTOM_HID_OutEvent(uint8_t event_idx, uint8_t state)
|
||||
UNUSED(state);
|
||||
|
||||
/* Start next USB packet transfer once data processing is completed */
|
||||
USBD_CUSTOM_HID_ReceivePacket(&USBD_Device);
|
||||
if (USBD_CUSTOM_HID_ReceivePacket(&USBD_Device) != (uint8_t)USBD_OK)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user