-
Couldn't load subscription status.
- Fork 1k
Closed
Description
Hello @fpistm, as I can understand function usbd_interface_init() is a hook to initiate USB function (HID at the moment) if required, correct?
Arduino_Core_STM32/cores/arduino/main.cpp
Lines 53 to 59 in 4919790
| int main( void ) | |
| { | |
| initVariant(); | |
| #if defined(USBCON) | |
| usbd_interface_init(); | |
| #endif |
If yes, what about making its definition
Arduino_Core_STM32/cores/arduino/stm32/usb_interface.c
Lines 119 to 131 in 4e1c225
| void usbd_interface_init(void) | |
| { | |
| #ifdef USBD_USE_HID_COMPOSITE | |
| /* Init Device Library */ | |
| USBD_Init(&hUSBD_Device_HID, &HID_Desc, 0); | |
| /* Add Supported Class */ | |
| USBD_RegisterClass(&hUSBD_Device_HID, USBD_COMPOSITE_HID_CLASS); | |
| /* Start Device Process */ | |
| USBD_Start(&hUSBD_Device_HID); | |
| #endif // USBD_USE_HID_COMPOSITE | |
| } |
as
weak so that users can redefine it in order to implement USB features in sketches or external libraries?
Thanks in advance and best, E.
Metadata
Metadata
Assignees
Labels
No labels