1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-21 12:33:49 +01:00

8 Commits

Author SHA1 Message Date
Marian Buschsieweke
9cbd344fdc
Merge pull request #21718 from maribu/cpu/stm32/usbdev_fs/inverted-disconnect-pin
cpu/stm32/usbdev_fs: allow inverted disconnect GPIO
2025-10-07 18:44:07 +00: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
krzysztof-cabaj
c6113d2630 cpu/stm32: move licenses to SPDX format 2025-10-02 10:24:48 +02:00
Marian Buschsieweke
cac44edec7
tree-wide: replace multiple empty lines with one
For each C source/header `$file`: `sed -e '/^$/N;/^\n$/D' -i $file`.
2025-05-21 22:51:04 +02:00
KSKNico
fe821eaa1d cpu: replace header guards with #pragma once 2025-05-21 17:13:37 +02:00
Gunar Schorcht
1fde5a4401 cpu/stm32/periph/usbdev_fs: support GPIO for USB connect/disconnect
Since some STM32 MCU don't have internal D+ pullup, there are boards that use a GPIO for USB bus connect/disconnect.
2022-10-05 09:15:29 +02:00
Gunar Schorcht
78fc60c700 cpu/stm32: use usbdev_synopsys_dwc2 driver as periph_usbdev 2022-09-27 01:00:57 +02:00
Alexandre Abadie
4d75c6ddde
cpu/stm32: group periph definitions by periph type 2022-01-02 20:07:51 +01:00