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

46254 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
Marian Buschsieweke
36e8526046
drivers/periph_gpio_ll: change API to access GPIO ports
The API was based on the assumption that GPIO ports are mapped in memory
sanely, so that a `GPIO_PORT(num)` macro would work allow for constant
folding when `num` is known and still be efficient when it is not.

Some MCUs, however, will need a look up tables to efficiently translate
GPIO port numbers to the port's base address. This will prevent the use
of such a `GPIO_PORT(num)` macro in constant initializers.

As a result, we rather provide `GPIO_PORT_0`, `GPIO_PORT_1`, etc. macros
for each GPIO port present (regardless of MCU naming scheme), as well as
`GPIO_PORT_A`, `GPIO_PORT_B`, etc. macros if (and only if) the MCU port
naming scheme uses letters rather than numbers.

These can be defined as macros to the peripheral base address even when
those are randomly mapped into the address space. In addition, a C
function `gpio_port()` replaces the role of the `GPIO_PORT()` and
`gpio_port_num()` the `GPIO_PORT_NUM()` macro. Those functions will
still be implemented as efficient as possible and will allow constant
folding where it was formerly possible. Hence, there is no downside for
MCUs with sane peripheral memory mapping, but it is highly beneficial
for the crazy ones.

There are also two benefits for the non-crazy MCUs:
1. We can now test for valid port numbers with `#ifdef GPIO_PORT_<NUM>`
    - This directly benefits the test in `tests/periph/gpio_ll`, which
      can now provide a valid GPIO port for each and every board
    - Writing to invalid memory mapped I/O addresses was treated as
      triggering undefined behavior by the compiler and used as a
      optimization opportunity
2. We can now detect at compile time if the naming scheme of the MCU
   uses letters or numbers, and produce more user friendly output.
    - This is directly applied in the test app
2024-08-02 09:55:24 +02:00
benpicco
687a30af33
Merge pull request #20802 from miri64/mailmap/enh/tud
mailmap: add my TU Dresden e-mail address
2024-07-31 11:15:02 +00:00
Martine Lenders
9cab9e1fcf
mailmap: add my TU Dresden e-mail address 2024-07-31 10:54:57 +02:00
Martine Lenders
11ea4a359d
Merge pull request #20801 from Teufelchen1/fix/dhcpv6
net/dhcpv6: Improve option handling in dhcpv6 advertise
2024-07-31 07:51:42 +00:00
Bennet Blischke
cc9855b3ae net/dhcpv6: Improve option handling in dhcpv6 advertise 2024-07-30 19:21:09 +02:00
mguetschow
2d6d3acce7
Merge pull request #20797 from mguetschow/2024.07-release-notes
release-notes.txt: add 2024.07 release notes
2024-07-30 17:13:35 +00:00
Mikolai Gütschow
79734f946f
release-notes.txt: add 2024.07 release notes
Co-authored-by: Marian Buschsieweke <maribu@users.noreply.github.com>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Co-authored-by: Teufelchen1 <bennet.blischke@haw-hamburg.de>
Co-authored-by: Marian Buschsieweke <maribu@users.noreply.github.com>
2024-07-30 18:55:50 +02:00
Teufelchen
1e6164fd68
Merge pull request #20549 from chrysn-pull-requests/gcoap-asan
gcoap: Avoid reading beyond defined input buffer
2024-07-30 10:13:41 +00:00
mguetschow
fe3a4e24a1
Merge pull request #20798 from benpicco/gcoap-fix-guards
net/gcoap: fix guards around defines
2024-07-30 08:13:06 +00:00
Benjamin Valentin
2aaaf6df9e net/gcoap: fix guards around defines 2024-07-29 19:04:15 +02:00
benpicco
9781bc0ad3
Merge pull request #20757 from xnumad/offl-lifetimes
gnrc/ipv6: Store all SLAAC prefixes
2024-07-29 14:06:22 +00:00
benpicco
41204c8b81
Merge pull request #20450 from benpicco/THREAD_CREATE_STACKTEST-delete
core/thread: always use THREAD_CREATE_STACKTEST when DEVELHELP is enabled
2024-07-29 11:52:06 +00:00
Benjamin Valentin
0fbc10fb45 core/thread: introduce THREAD_CREATE_NO_STACKTEST 2024-07-29 11:45:58 +02:00
Benjamin Valentin
312a550f1a treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
Benjamin Valentin
b1d3825c27 core/thread: always use THREAD_CREATE_STACKTEST with DEVELHELP 2024-07-29 11:45:58 +02:00
xnumad
e25066768b gnrc/ipv6: Store all SLAAC prefixes
Incl. off-link ones, since lifetimes for the autoconfigured addresses are managed by the prefix entry.
2024-07-28 09:53:55 +02:00
benpicco
d2fa0c6ce1
Merge pull request #20796 from krzysztof-cabaj/examples-leds_shell-fix-segfault
examples/leds_shell: use periph_gpio_mock on native
2024-07-26 15:45:07 +00:00
krzysztof-cabaj
ca9835fc53 examples/leds_shell: fix segfault 2024-07-26 17:40:21 +02:00
benpicco
9afad95487
Merge pull request #20793 from krzysztof-cabaj/stm32l476g-ADC
boards/stm32l476g-disco: add ADC support
2024-07-24 16:47:19 +00:00
krzysztof-cabaj
99b5bc1f4f cpu/stm32/l4: enable missing star-up time 2024-07-24 12:09:42 +02:00
benpicco
16f8160163
Merge pull request #20795 from bmewen/wamr-update
pkg/wamr : updated wamr version to v2.1.1
2024-07-24 09:44:57 +00:00
mewen.berthelot
36bcdd41bd pkg/wamr : updated wamr version to v2.1.1 2024-07-24 09:45:32 +02:00
krzysztof-cabaj
c1a33faeb5 boards/stm32l476g-disco: add doxygen doc to ADC config 2024-07-19 12:29:34 +02:00
krzysztof-cabaj
098a34452a boards/stm32l476g-disco: add ADC support 2024-07-19 11:50:39 +02:00
mguetschow
4612cc2348
Merge pull request #20782 from krzysztof-cabaj/example-LEDs
examples/leds_shell: add example for interactive LEDs/GPIO control
2024-07-18 09:53:48 +00:00
Teufelchen
388a7d4056
Merge pull request #20790 from benpicco/log_panic
core/panic: don't use LOG_ functions in panic handler
2024-07-17 14:43:50 +00:00
Benjamin Valentin
3237ed911e core/panic: don't use LOG_ functions in panic handler 2024-07-17 16:18:19 +02:00
Teufelchen
06a19bd9cf
Merge pull request #20789 from mguetschow/cosy-build-dir
dist/tools/cosy: take BUILD_DIR into account
2024-07-16 18:57:41 +00:00
Mikolai Gütschow
6f70ed01bf
dist/tools/cosy: take BUILD_DIR into account 2024-07-16 16:52:33 +02:00
krzysztof-cabaj
9959e629bf examples/leds_shell: code refactoring-one led and gpio commands 2024-07-16 14:25:27 +02:00
benpicco
dd06b3727c
Merge pull request #20786 from mguetschow/rust-wrappers-bump
rust: bump rust-riot-{sys,wrappers} version
2024-07-15 14:31:42 +00:00
Mikolai Gütschow
b07eddd66a
rust: bump rust-riot-{sys,wrappers} version
both only bump the version number with no functional changes
2024-07-15 14:14:41 +02:00
mguetschow
9ca96967c0
Merge pull request #20698 from netd-tud/sha3_implementation
sys/psa_crypto: sha3 support
2024-07-15 10:32:17 +00:00
mguetschow
34dfaa2800
Merge pull request #20785 from miri64/doc/fix/msc-links
doc: fix links to GNRC master thesis
2024-07-15 09:34:11 +00:00
Martine Lenders
53d853342f
doc: fix links to GNRC master thesis 2024-07-15 11:25:30 +02:00
Wunderbaeumchen
9b502027ab sys/psa_crypto: added sha3 glue code 2024-07-13 04:35:21 +02:00
krzysztof-cabaj
4273f970a7 examples/leds_shell: change application name 2024-07-12 22:41:39 +02:00
krzysztof-cabaj
9aea4bdb55 examples/LEDs: add README.md file 2024-07-12 22:41:39 +02:00
krzysztof-cabaj
1113be9e05 examples/LEDs: addition of new example appplication 2024-07-12 22:41:38 +02:00
benpicco
57882ebea3
Merge pull request #20783 from mguetschow/led-functions
drivers/led: add LED_NUMOF and convenience inline functions
2024-07-12 17:09:30 +00:00
Mikolai Gütschow
bb97445b20
boards/*: include periph/gpio.h in board.h 2024-07-12 15:02:43 +02:00
benpicco
db21bd134f
Merge pull request #20121 from benpicco/pyterm-session
makefiles/tools/serial.inc.mk: make use of pyterm session names
2024-07-11 15:48:42 +00:00
Mikolai Gütschow
751a430f89
tests/leds: adapt test to use led.h provided macros and functions 2024-07-11 14:49:37 +02:00
Mikolai Gütschow
b0b3b071d3
drivers/led: add LED_NUMOF and convenience inline functions 2024-07-11 14:48:16 +02:00
mguetschow
3e712a54ca
Merge pull request #20673 from Einhornhool/pr/update-cryptoauth-shell-command
sys/shell: Update cryptoauthlib shell commands
2024-07-11 06:54:52 +00:00
Lena Boeckmann
272d48db63 pkg/cryptoauthlib: Address static test fails 2024-07-10 14:07:47 +02:00
Lena Boeckmann
1ce304cee0 sys/shell/cmds/cryptoauthlib: Fix key slot number 2024-07-10 13:53:01 +02:00
mguetschow
626006b455
Merge pull request #20776 from xnumad/kea-subnet-id
tools/dhcpv6-pd_ia: fix: Add explicit subnet id
2024-07-09 09:45:37 +00:00
benpicco
4e4c4a194f
Merge pull request #20779 from crasbe/pr/jlink_flashing
makesfiles/jlink: fix exports for flashing
2024-07-08 11:10:47 +00:00