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

4389 Commits

Author SHA1 Message Date
chrysn
f116a78de8 doc: Clarify that our CPU ID is not ARM's CPUID 2024-09-27 10:42:17 +02:00
chrysn
739e2697d6 drivers/leds: Make initialization conditional on presence, not pin
The LEDx_PIN may still be defined (eg. on the particle-mesh family
because it is used to configure the PWM pins); the IS_PRESENT macro
performs the stricter check ov testing for an _ON function.
2024-08-26 11:12:51 +02:00
chrysn
c0288f7d40 rust: Update to riot-wrappers 0.9 2024-08-22 17:33:40 +02:00
Jan Romann
947a5043c3 drivers/sx127x: fix link formatting in documentation 2024-08-20 14:19:27 +02:00
Marian Buschsieweke
a6b459eff3
drivers/periph/gpio_ll: change gpio_ll_switch_dir API
It turns out that the feature to switch the GPIO direction quickly
is not only a way to emulate open drain / open source mode for less
sophisticated GPIO peripherals that do not natively support it.
It also enables tri-state output (push-pull high, push-pull low,
high impedance), which is useful e.g. for driven charlieplexed LEDs
quickly.

This changes the API by introducing a `gpio_ll_prepare_switch_dir()`
function that prepares the value used to identify which pins should
be switched to input or to output mode. This is useful for GPIO
peripherals in which the GPIO mode register does not allocate one bit
per pin (so that only the direction is given there), such as the one
for STM32. This allows an STM32 implementation in which preparing the
bitmask needed to modify the direction of pins is not trivial.
2024-08-08 16:22:36 +02:00
Marian Buschsieweke
5db461c28b
drivers/periph_gpio_ll: always use hardware features
GPIO LL headers might be included even when not using GPIO LL. Some
functions may be provided by the common header or the platform specific
one, depending on the features used. Hence, the header can only be
safely included if the correct set of GPIO LL hardware features is used.
2024-08-02 13:41:37 +02:00
Marian Buschsieweke
422042bd00
drivers/periph_gpio_ll_irq: make support for both edges optional
The assumption that every MCU has this feature turned out wrong. Hence,
add a feature to allow testing for support of edge triggered IRQs on
both flanks.
2024-08-02 13:41:36 +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
Mikolai Gütschow
b0b3b071d3
drivers/led: add LED_NUMOF and convenience inline functions 2024-07-11 14:48:16 +02:00
Joshua DeWeese
ad24c08c50 drivers/periph_wdt: fix auto starting of watchdog timer
When WDT_HAS_INIT is non-zero (which it is for all but two supported
CPUs). The watchdog timer was not automatically started on boot when the
periph_wdt_auto_start module was enabled. This patch fixes this.
2024-06-19 12:25:02 -04:00
Marian Buschsieweke
8821f1f301
Merge pull request #20730 from maribu/tree-wide/musl/fixes
tree wide: compilation fixes for `native64` on musl systems
2024-06-15 17:12:03 +00:00
Leandro Lanzieri
ebf64133d7
drivers: add max31855 2024-06-12 13:11:45 +02:00
Marian Buschsieweke
a62f10f7e3
Merge pull request #20731 from chrysn-pull-requests/ws281x-saul-write
drivers/ws281x: Fix SAUL writes
2024-06-05 21:04:51 +00:00
chrysn
ad2a031e6c drivers/ws281x: Return correct number of written elements 2024-06-05 22:41:40 +02:00
chrysn
329f6e4573 drivers/ws281x: Remove unconditional debug output 2024-06-05 22:41:22 +02:00
Marian Buschsieweke
1582fdd571
drivers/at25xxx: s/PAGE_SIZE/AT25_PAGE_SIZE/
On musl, PAGE_SIZE has a different meaning. So add an AT25_ prefix
to avoid a name clash.
2024-06-05 21:56:29 +02:00
LP-HAW
8ab2c795e5 drivers/w5500: enable polling in interrupt mode 2024-06-05 16:30:59 +02:00
LP-HAW
134d84401d drivers/w5500: remove Kconfig 2024-06-05 16:30:59 +02:00
Mihai Renea
5a7d553b8e drivers/at: expose some internal API 2024-05-28 12:20:54 +02:00
benpicco
719663f89c
Merge pull request #20675 from benpicco/drivers-i2c_init
drivers: don't call i2c_init()
2024-05-16 14:41:59 +00:00
Benjamin Valentin
85b2decafa drivers: don't call i2c_init()
This is already called by periph_init()
2024-05-16 14:55:30 +02:00
Benjamin Valentin
c1e79c84d0 drivers/at86rf215: port to new netdev API 2024-05-15 17:24:42 +02:00
benpicco
3791db3941
Merge pull request #18427 from maribu/lwip/confirm_send
pkg/lwip: make use of confirm send
2024-05-06 11:05:10 +00:00
Stefan Schmidt
9d62ad4c5c driver/w5500: driver for the W5500 ethernet chip
- driver can be used with interrupt or in polling mode (default)
2024-05-02 22:07:17 +02:00
Marian Buschsieweke
87e242189a
drivers/kw41zrf: kw41zrf implements the legacy netdev API 2024-04-30 08:41:07 +02:00
krzysztof-cabaj
a813e9728b drivers/led: add LEDX_IS_PRESENT defines 2024-04-29 16:25:32 +02:00
Marian Buschsieweke
daa6b9da84
Merge pull request #20587 from Teufelchen1/fix/mtd
drivers/mtd: Add check for interger overflow
2024-04-18 10:59:40 +00:00
Teufelchen1
3bd047a565 drivers/mtd: Add check for interger overflow 2024-04-18 12:23:50 +02:00
Marian Buschsieweke
8cff167a93
Merge pull request #20588 from crasbe/master
drivers/at24cxxx: Add M24C01 device and enhance documentation
2024-04-17 08:40:04 +00:00
Marian Buschsieweke
fc271ea198
Merge pull request #20562 from MrKevinWeiss/pr/saulrgb
drivers/ws281x: Add saul support
2024-04-17 08:00:51 +00:00
crasbe
251b525e7e drivers/at24cxxx: add documentation about driver usage 2024-04-16 18:06:03 +02:00
crasbe
6d1bfd63c6 drivers/at24cxxx: add defines for M24C01 2024-04-16 18:06:03 +02:00
Teufelchen
5bc8ca5318
Merge pull request #18093 from Ollrogge/remove_flashpage_free_funcs
periph/flashpage: remove deprecated flashpage_*_free functions
2024-04-16 08:47:11 +00:00
Marian Buschsieweke
cf6fa4edf0
tree wide: add IWYU pragma: export where needed
We occasionally have some public `foo.h` header that includes a private
`foo_arch.h` header. Users are expected to include the `foo.h` header
and not the `foo_arch.h`. However, clangd will claim that the `#include`
of `foo.h` is unused if only functions / macros/ types / ... from
`foor_arch.h` is used and nothing from `foo.h`.

This adds the `IWYU pragma: export` comment to the include of
`foo_arch.h` in `foo.h`, so that clangd treats functions / macros /
types provided by `foo_arch.h` as if they were instead provided by
`foo.h`, which fixes the false positives.
2024-04-14 14:26:05 +02:00
MrKevinWeiss
0a96e36fb5
drivers/ws281x: Add saul support 2024-04-11 11:43:21 +02:00
Ollrogge
10c987eb66 Revert "periph/flashpage: extend API"
This reverts commit 72d47013dd.
2024-04-04 17:57:40 +02:00
Karl Fessel
9d2dda27ce
Merge branch 'master' into cpu/samd5x-write-CAN-driver 2024-03-28 09:52:26 +01:00
Marian Buschsieweke
04620d471c
Merge pull request #20438 from MrKevinWeiss/pr/kconfig/dep/removal
Remove Kconfig dependency modelling
2024-03-27 16:39:56 +00:00
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
MrKevinWeiss
2ace90a8fc
drivers/lsm6dsxx: Allow non-specific variant 2024-03-26 18:13:19 +01:00
Firas Hamdi
74bf01baa8 drivers/mcp2515: load RX mailbox 2024-03-26 15:17:48 +01:00
MrKevinWeiss
7a68fb0d5e
*Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
Mihai Renea
63e057cb50 drivers/at: Fix sync URC handling. at_send_cmd_get_lines() keeps EOL. 2024-03-20 14:32:09 +01:00
Mihai Renea
218d79fee5 drivers/at: refactor for better unit testing of parsing methods 2024-03-20 12:50:07 +01:00
Mihai Renea
b40c9a0366 drivers/at: removed async URC handling. 2024-03-20 12:49:56 +01:00
benpicco
17ec57ee6d
Merge pull request #20488 from dylad/pr/usbus/remove_deprecated_event
periph_usbdev: remove deprecated event flag
2024-03-19 19:49:04 +00:00
benpicco
3ebccd78d4
Merge pull request #20486 from FlapKap/tests/drivers/mtd_flashpage_assert_error
drivers/mtd_flashpage: fix comperror when compiling without asserts
2024-03-19 17:48:41 +00:00
Dylan Laduranty
6fdc00a1b5 drivers/periph/usbdev: remove deprecated event flag
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-03-19 16:41:27 +01:00
kasper
02d86c2a25 drivers/mtd_flashpage: fix comperror when compiling without asserts
the variable cpu_flash_base is only used in asserts. This gives errors if you compile without them.
2024-03-19 14:36:01 +00:00
Teufelchen
de176a8ef3
Merge pull request #20407 from chrysn-pull-requests/drop-rgbled
drivers/rgbled: Remove driver
2024-03-19 11:12:37 +00:00