1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-23 21:43:51 +01:00
Marian Buschsieweke 26d8fe4383
cpu/stm32/usbdev_fs: allow inverted disconnect GPIO
The STM32F3 requires a dedicated digital signal to emulate a disconnect
event by pulling D+ down via a 1.5 kOhm resistor. Some boards, such as
the OLIMEXINO-STM32F3, do not directly connect a GPIO but place a
transistor in between. Depending on the exact implementation, the logic
level may end up being inverted compared to directly connecting a
GPIO.

This adds a flag member to the `stm32_usbdev_fs_config_t` and a new flag
to indicate inverted logic. In addition the members in the struct are
sorted by alignment, as this is a foolproof algorithm to prevent wasting
memory on unneeded padding.

Finally, the USB driver is adapted to honor the flag.

Co-authored-by: crasbe <crasbe@gmail.com>
2025-10-07 17:42:28 +02:00
..
2023-07-26 09:02:10 +02:00