Giovanni help me to resolve a problem with my project Dual USB CDC, with some patches. One patch has changed the usb_lld template and his test archictecture STM32. I replicated it on MIPS-PIC32. Could you submit in your repository?
diff --git a/os/hal/platforms/MIPS-PIC32MX/usb_lld.h b/os/hal/platforms/MIPS-PIC32MX/usb_lld.h index 1d88784..b855762 100644 --- a/os/hal/platforms/MIPS-PIC32MX/usb_lld.h +++ b/os/hal/platforms/MIPS-PIC32MX/usb_lld.h @@ -274,6 +274,20 @@ struct USBDriver { */ const USBEndpointConfig *epc[USB_MAX_ENDPOINTS + 1]; /** + * @brief Fields available to user, it can be used to associate an + * application-defined handler to an IN endpoint. + * @note The base index is one, the endpoint zero does not have a + * reserved element in this array. + */ + void *in_params[USB_MAX_ENDPOINTS]; + /** + * @brief Fields available to user, it can be used to associate an + * application-defined handler to an OUT endpoint. + * @note The base index is one, the endpoint zero does not have a + * reserved element in this array. + */ + void *out_params[USB_MAX_ENDPOINTS]; + /** * @brief Endpoint 0 state. */ usbep0state_t ep0state;
Hi Etmatrix, It's clear that current HAL infrastructure is suffering from code duplication =/. Hope this gonna change with 3.0. Anyway, I'll submit the patch, np.
I merged the master and pushed correction for usb LLD. BTW, seems likes os/hal/platforms/STM32/USBv1/usb_lld.h was not updated correctly. Also I see that most of the demos push USB driver instance to sduConfigureHookI.
Giovanni wrote:That's odd, I see them all updated and that low level driver has the new fields, revision 5657.
Giovanni
They all have new fields but os/hal/platforms/STM32/USBv1/usb_lld.h still has obsolete 'param' field. Also demos/ARMCM4-STM32F407-DISCOVERY-MEMS/usbcfg.c and testhal/STM32F1xx/RTC_FATTIME/main.c still push usbp to sduConfigureHookI.