stm32/usb: Expose USB HID device instance via usbd_hid_get().

This is needed to implement a HID device in user C modules.
This commit is contained in:
Koen De Vleeschauwer
2020-10-15 12:51:52 +02:00
committed by Damien George
parent 3ce21945b1
commit 432b65f178
2 changed files with 20 additions and 0 deletions

View File

@@ -16,6 +16,8 @@ typedef struct _usbd_hid_itf_t {
uint8_t report_in_buf[HID_DATA_FS_MAX_PACKET_SIZE];
} usbd_hid_itf_t;
usbd_hid_itf_t *usbd_hid_get(void);
static inline int usbd_hid_rx_num(usbd_hid_itf_t *hid) {
return hid->report_in_len != USBD_HID_REPORT_INVALID;
}