I'm using STMCubeMX 4.21.0 to generate custom USB HID project. My device needs to send frequent HID reports, therefore it calls USBD_CUSTOM_HID_SendReport every 1-10ms.
This function always returns USBD_OK, even if previous report is not transmitted - in this case it just ignores new report.
It becomes a problem because there is no way for user code to check if data was successfully transmitted or another attempt is required.
I've implemented a local workaround in this function: it returns USBD_BUSY when hhid->state == CUSTOM_HID_BUSY
But this change is not in user modifiable area, therefore this change is lost on every project re-generation in CubeMX.
Am I missing something, is there any other good way to work around this issue?