Skip to content

Commit cd17871

Browse files
mniestrojdkalowsk
authored andcommitted
drivers: udc: stm32: fix USB_OTG_HS_EMB_PHY macro value check
USB_OTG_HS_EMB_PHY macro is always defined, so `defined(USB_OTG_HS_EMB_PHY)` always results in true. This means that driver always selected `USB_OTG_SPEED_HIGH_IN_FULL` and never `USB_OTG_SPEED_HIGH`. Fix that by checking value of defined macro. Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
1 parent f499ea0 commit cd17871

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/udc/udc_stm32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ LOG_MODULE_REGISTER(udc_stm32, CONFIG_UDC_DRIVER_LOG_LEVEL);
5151
* The following defines are used to map the value of the "maxiumum-speed"
5252
* DT property to the corresponding definition used by the STM32 HAL.
5353
*/
54-
#if defined(CONFIG_SOC_SERIES_STM32H7X) || defined(USB_OTG_HS_EMB_PHY)
54+
#if defined(CONFIG_SOC_SERIES_STM32H7X) || USB_OTG_HS_EMB_PHY
5555
#define UDC_STM32_HIGH_SPEED USB_OTG_SPEED_HIGH_IN_FULL
5656
#else
5757
#define UDC_STM32_HIGH_SPEED USB_OTG_SPEED_HIGH

0 commit comments

Comments
 (0)