mirror of
https://github.com/STMicroelectronics/stm32-mw-usb-device.git
synced 2026-02-08 20:18:07 -05:00
Release v2.11.4
This commit is contained in:
@@ -32,7 +32,11 @@ EndBSPDependencies */
|
||||
|
||||
static int8_t TEMPLATE_CUSTOM_HID_Init(void);
|
||||
static int8_t TEMPLATE_CUSTOM_HID_DeInit(void);
|
||||
#ifdef USBD_CUSTOMHID_REPORT_BUFFER_EVENT_ENABLED
|
||||
static int8_t TEMPLATE_CUSTOM_HID_OutEvent(uint8_t *report_buffer);
|
||||
#else
|
||||
static int8_t TEMPLATE_CUSTOM_HID_OutEvent(uint8_t event_idx, uint8_t state);
|
||||
#endif /* USBD_CUSTOMHID_REPORT_BUFFER_EVENT_ENABLED */
|
||||
|
||||
#ifdef USBD_CUSTOMHID_CTRL_REQ_COMPLETE_CALLBACK_ENABLED
|
||||
static int8_t TEMPLATE_CUSTOM_HID_CtrlReqComplete(uint8_t request, uint16_t wLength);
|
||||
@@ -49,6 +53,9 @@ __ALIGN_BEGIN static uint8_t TEMPLATE_CUSTOM_HID_ReportDesc[USBD_CUSTOM_HID_REPO
|
||||
USBD_CUSTOM_HID_ItfTypeDef USBD_CustomHID_template_fops =
|
||||
{
|
||||
TEMPLATE_CUSTOM_HID_ReportDesc,
|
||||
#ifdef USBD_CUSTOMHID_REPORT_DESC_SIZE_ENABLED
|
||||
USBD_CUSTOM_HID_REPORT_DESC_SIZE,
|
||||
#endif /* USBD_CUSTOMHID_REPORT_DESC_SIZE_ENABLED */
|
||||
TEMPLATE_CUSTOM_HID_Init,
|
||||
TEMPLATE_CUSTOM_HID_DeInit,
|
||||
TEMPLATE_CUSTOM_HID_OutEvent,
|
||||
@@ -95,10 +102,17 @@ static int8_t TEMPLATE_CUSTOM_HID_DeInit(void)
|
||||
* @param state: event state
|
||||
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
|
||||
*/
|
||||
|
||||
#ifdef USBD_CUSTOMHID_REPORT_BUFFER_EVENT_ENABLED
|
||||
static int8_t TEMPLATE_CUSTOM_HID_OutEvent(uint8_t *report_buffer)
|
||||
{
|
||||
UNUSED(report_buffer);
|
||||
#else
|
||||
static int8_t TEMPLATE_CUSTOM_HID_OutEvent(uint8_t event_idx, uint8_t state)
|
||||
{
|
||||
UNUSED(event_idx);
|
||||
UNUSED(state);
|
||||
#endif /* USBD_CUSTOMHID_REPORT_BUFFER_EVENT_ENABLED */
|
||||
|
||||
/* Start next USB packet transfer once data processing is completed */
|
||||
if (USBD_CUSTOM_HID_ReceivePacket(&USBD_Device) != (uint8_t)USBD_OK)
|
||||
@@ -151,7 +165,7 @@ static int8_t TEMPLATE_CUSTOM_HID_CtrlReqComplete(uint8_t request, uint16_t wLen
|
||||
static uint8_t *TEMPLATE_CUSTOM_HID_GetReport(uint16_t *ReportLength)
|
||||
{
|
||||
UNUSED(ReportLength);
|
||||
uint8_t *pbuff;
|
||||
uint8_t *pbuff = NULL;
|
||||
|
||||
return (pbuff);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user