zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.62k stars 6.5k forks source link

udc_stm32 build failure on stm32f1 and stm32f3 (and possibly others) #75307

Closed fabiobaltieri closed 3 months ago

fabiobaltieri commented 3 months ago

Describe the bug

drivers/usb/udc/udc_stm32.c fails to build on f1 families since https://github.com/zephyrproject-rtos/zephyr/pull/75129 got merged:

zephyrproject/zephyr/drivers/usb/udc/udc_stm32.c:792:37: error: 'USBD_HS_SPEED' undeclared (first use in this function); did you mean 'USBD_FS_SPEED'?
  792 |         if (priv->pcd.Init.speed == USBD_HS_SPEED) {
      |                                     ^~~~~~~~~~~~~
      |                                     USBD_FS_SPEED

https://github.com/zephyrproject-rtos/zephyr/pull/75306 out with a proposed fix

To Reproduce west build -p -b stm32_min_dev@blue samples/subsys/usb/hid-keyboard

Expected behavior No build errors.

Impact Somewhat of an annoyance if you want to actually use the driver, not a problem at all if you don't.

Environment (please complete the following information): Linux, Zephyr SDK, the commit above

henrikbrixandersen commented 3 months ago

This also affects stm32f3.