1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

22 Commits

Author SHA1 Message Date
Marian Buschsieweke
97b91b4f8f
boards/stm32: use GPIO LL for LEDs
This fixes a race in `LED<NUM>_TOGGLE`, which is a read-copy-write
operation. Any access to a GPIO pin on the same GPIO port that
happens concurrently could result in data corruption. Using the
GPIO LL API, which is thread-safe, fixes the issue.

Note: The used GPIO LL functions will work even in when the GPIO LL
      module is not used.
2024-08-02 09:55:24 +02:00
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
Marian Buschsieweke
043e8cc88e
boards,sys/arduino: major clean up
- Rename all `arduino_pinmap.h` to `arduino_iomap.h`
    - An empty `arduino_pinmap.h` that just includes `arduino_iomap.h`
      is provided for backward compatibility
    - Move all info from `arduino_board.h` into the new file as trivial
      macros, so that they can also be used outside of sketches
    - The new name reflects the fact not just pin mappings, but also
      other I/O features such as PWMs are mapped
- Drop all `arduino_board.h`
    - `arduino_board.h` and `arduino_iomap.h` now provide the exact
      same information, just in a different format
    - a generic `arduino_board.h` is provided instead that just
      uses the info in `arduinio_iomap.h` and provides them in the
      format the code in `sys/arduino` expects it
- Add fine grained features to indicate for mappings
    - availability of mappings for analog pins, DAC pins, PWM pins,
      UART devices, SPI/I2C buses to the corresponding RIOT
      identification can now be expressed:
        - `arduino_pins`: `ARDUINO_PIN_0` etc. are available
        - `arduino_analog`: `ARDUINO_A0` etc. are available
        - `arduino_pwm`: `ARDUINO_PIN_13_PWM_DEV` etc. are available
        - `arduino_dac`: `ARDUINO_DAC0` etc. are available
        - `arduino_uart`: `ARDUINO_UART_D0D1` or similar are available
        - `arduino_spi`: `ARDUINO_SPI_ISP` or similar are available
        - `arduino_i2c`: `ARDUINO_I2C_UNO` or similar are available
    - mechanical/electrical compatibility with specific form factors
      can now be expressed as features:
        - `aruino_shield_nano`: Arduino NANO compatible headers
        - `aruino_shield_uno`: Arduino UNO compatible headers
        - `aruino_shield_mega`: Arduino MEGA compatible headers
        - `aruino_shield_isp`: ISP header is available

This provides the groundwork to implement shield support as modules
that can rely on the I/O mappings, rather than having to provide a
configuration per board.
2023-06-26 17:24:07 +02:00
Marian Buschsieweke
1fd9913293
boards/common/stm32: clean up LED definitions
Let boards only define the port and pin number of each LEDs. The common
definitions in `stm32_leds.h` will provide `LED<x>_ON`, `LED<x>_OFF`,
`LED<x>_TOGGLE`, `LED<x>_PIN`, `LED<x>_MASK` and `LED<x>_PORT`.

In addition to code de-duplication, this also makes it easier to use
LEDs in GPIO LL, which can be beneficial for super low overhead
debugging output - e.g. when a bug is timing sensitive and `DEBUG()`
would spent to much time for stdio to reproduce a bug.
2022-08-08 23:35:06 +02:00
Benjamin Valentin
468ea89953 boards: drop LED init
This is handled by periph_init_leds now
2022-02-18 14:35:43 +01:00
MrKevinWeiss
02a2de4916
cpu/stm32: Add Kconfig dependency modeling 2021-07-02 15:11:05 +02:00
de37259c64
boards/nucleo-*: put Kconfig HSE/LSE clock config in common 2021-01-20 09:16:46 +01:00
7fbfb92f03
boards/stm32gx: move Kconfig clock config to cpu 2020-10-29 23:00:44 +01:00
68b6e4f7ef
boards/nucleo32: fix arduino pinmap for stm32l011k4 2020-10-15 16:24:33 +02:00
Gunar Schorcht
b082fd1941 board/nucleo32: fix Arduino pin mapping
On Nucleo-32 boards with STM32 MCUs that do not have the GPIO port F, the Arduino pins D7 and D8 are not connected to PF0 and PF1 but to PC14 and PC15. This is also the case for the Nucleo-L412KB.
2020-07-23 00:16:48 +02:00
4f8f1bc6f2
boards/common/nucleo: model common features in Kconfig 2020-07-16 11:34:02 +02:00
86360f73d4
boards/nucleo32: fix arduino pinmap for nucleo-l432kc 2019-10-07 14:30:36 +02:00
70802fc652 boards*: cleanup doxygen
- replace brief with name where required
- remove some unwanted empty lines
- fix missing closing doxygen name block
2018-04-18 12:08:56 +02:00
f8744e7b27 boards/common: move nucleo doxygen group to boards group 2018-01-27 18:48:24 +01:00
Hauke Petersen
c6c0b752c3 boards/nucleo: use shard board.h and board.c files 2018-01-24 10:24:23 +01:00
Hauke Petersen
b4f497f5e2 boards/nucleo: factored out nucleo64 common 2018-01-24 10:23:17 +01:00
906a9e3a02 boards/common/nucleo: add missing 'brief' description 2018-01-18 10:23:34 +01:00
ce66117dc0 boards/common/nucleo: use @name instead of @brief 2018-01-05 15:33:03 +01:00
5b5c99c27b boards: fix doxygen typo on arduino 2018-01-05 15:32:20 +01:00
smlng
b1df79a45b boards: fix doxygen groups for STM nucleo boards 2017-12-15 17:06:29 +01:00
smlng
b06b5748ec boards/common: enhance doxygen for stm nucleo32 2017-12-15 10:25:59 +01:00
Hauke Petersen
00a365b956 boards/nucleo32: move shared code to common/nucleo32 2017-11-30 10:26:36 +01:00