zephyr/drivers/usb
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
..
device drivers: usb: stm32: Fix broken DT_USB_ENABLE_PIN_REMAP test 2019-09-24 09:36:31 -07:00
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
Kconfig drivers: usb: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00