zephyr/drivers/usb/device
Ulf Magnusson e833fafd4b drivers: usb: stm32: Fix broken DT_USB_ENABLE_PIN_REMAP test
'enable-pin-remap' is defined as 'type: boolean' in
dts/bindings/usb/st,stm32-usb.yaml, so it generates either

    #define DT_USB_ENABLE_PIN_REMAP 1

or

    #define DT_USB_ENABLE_PIN_REMAP 0

depending on if 'enable-pin-remap;' appears on the node or not.

Since a macro is always generated, #ifdef won't work. The test needs to
be this instead:

    #if DT_USB_ENABLE_PIN_REMAP == 1

(Should be careful with '#if HMZ == 0' though, because it's true even if
HMZ is undefined.)

This behavior was inherited from the old scripts, and some things depend
on it, e.g. by expanding macros in initializers.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-24 09:36:31 -07:00
..
CMakeLists.txt
Kconfig dts/Kconfig: Remove symbol HAS_DTC_USB 2019-09-12 08:16:42 -05:00
usb_dc_dw.c usb: remove QMSI include 2019-09-18 11:06:18 -05:00
usb_dc_kinetis.c
usb_dc_mcux_ehci.c
usb_dc_native_posix_adapt.c
usb_dc_native_posix_adapt.h
usb_dc_native_posix.c
usb_dc_nrfx.c
usb_dc_sam.c
usb_dc_sam0.c
usb_dc_stm32.c drivers: usb: stm32: Fix broken DT_USB_ENABLE_PIN_REMAP test 2019-09-24 09:36:31 -07:00
usb_dw_registers.h