1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 22:43:50 +01:00

4463 Commits

Author SHA1 Message Date
Marian Buschsieweke
17d2516a54
Merge pull request #20581 from maribu/timer_get_closest_freq
drivers/periph_timer: add `timer_get_closest_freq()`
2025-04-02 14:45:14 +00:00
Marian Buschsieweke
5b600d3a8e
drivers/periph_timer: add timer_get_closest_freq
Add an API to search for the frequency supported by a timer that
is closest to the given target frequency.

This is in fact non-trivial to get right, as pre-scaler registers can
be 16 bit or even 32 bit in size, making a naive loop over all possible
pre-scalers too expensive (computationally).

Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
2025-04-02 16:21:07 +02:00
Marian Buschsieweke
48162bd0a6
Merge pull request #21325 from KSKNico/clang-format-header-fix
treewide: fixing order of doxygen tags and header guards
2025-03-28 16:45:02 +00:00
KSKNico
d357f5388b drivers/include: applied the script to the driver headers 2025-03-28 17:09:07 +01:00
mguetschow
d2fbe23e78
Merge pull request #21112 from KSKNico/tm1637
drivers/tm1637: add driver and tests for tm1637 7-segment display
2025-03-25 13:49:02 +00:00
Gunar Schorcht
0d62eb9abd
Merge pull request #21305 from fabian18/pr/sdmmc_reinit_on_power_loss
drivers/{mtd_sdmmc,sdmmc}: reinit card
2025-03-19 11:30:25 +00:00
fabian18
fab3a1d750
Merge pull request #21260 from fabian18/pr/sdmmc_sdhc_guard_dma_check
drivers/sdmmc/sdmmc_sdhc: remove DMA check
2025-03-19 09:36:18 +00:00
Fabian Hüßler
6174ca6c29 drivers/{mtd_sdmmc,sdmmc}: reinit card 2025-03-19 10:11:00 +01:00
KSKNico
cccce720e3 drivers/tm1637: driver for the tm1637 7-segment display 2025-03-18 16:53:36 +01:00
MrKevinWeiss
f770f72202
treewide: Fix spelling mistakes 2025-03-13 13:59:07 +01:00
carl
8275208249 drivers/pcd8544: rename CHAR_WIDTH 2025-03-11 16:19:39 +01:00
Fabian Hüßler
803588d64c drivers/sdmmc/sdmmc_sdhc: remove DMA check
At the moment there is no MCU that implements sdhc_conf_t and supports DMA with it.
2025-03-01 18:39:51 +01:00
Oleg Hahm
4d41dda9a7
Merge pull request #21221 from mguetschow/examples-names-short
examples: shorten subfolders' names
2025-02-21 09:07:48 +00:00
Mikolai Gütschow
9a45c30222
examples: shorten subfolders' names 2025-02-21 09:55:24 +01:00
benpicco
f67055c3b2
Merge pull request #19668 from benpicco/ieee802154_symbol_time_on_demand
ieee802154/submac: calculate symbol time on demand
2025-02-20 12:04:10 +00:00
fabian18
8bbeba10cb
Merge pull request #21169 from fabian18/pr/mtd_sdmmc_remove_MTD_DRIVER_FLAG_DIRECT_WRITE
{cpu/sam0_common/sam0_sdhc,drivers/mtd}: do not allocate `work_area` twice
2025-02-19 17:02:42 +00:00
krzysztof-cabaj
a2dfd78b27 treewide: fix double the in doc and comments 2025-02-18 13:25:02 +01:00
Mikolai Gütschow
ca5fe72bf8
treewide: fix example references in docs
adapt to folder structure from #21135
2025-02-14 19:14:22 +01:00
Fabian Hüßler
9e7a269de0 drivers/mtd: prevent work_area double allocation 2025-02-12 16:25:59 +01:00
benpicco
837bc0c5ed
Merge pull request #20428 from cogip/fdcan
can: add CAN FD support to STM32G4 and native architecture
2025-02-10 16:31:39 +00:00
fabian18
7e33118e3d
Merge pull request #21195 from fabian18/pr/at_rx_fix_off_by_one_bug
drivers/at: at_readline_stop_at_str fix remaining buffer length
2025-02-07 10:54:34 +00:00
Fabian Hüßler
5633a19a37 drivers/at: at_readline_stop_at_str fix remaining buffer length 2025-02-05 20:27:49 +01:00
Marian Buschsieweke
a82573558d
drivers/periph_{i2c,spi}: fix doc on initialization
Both SPI and I2C peripheral drivers *MUST NOT* be initialized by the
application code / (non-peripheral) device driver, as this is done
automatically be default. Some peripheral drivers have a non-idempotent
initialization and initializing them twice will break things.

Sadly, the doc states the exact opposite.

This updates the documentation to match the implementation. In addition
the special case is pointed out of disabling the automatic
initialization during boot, in which case the app indeed has to do the
initialization.
2025-02-04 09:22:40 +01:00
Gilles DOFFE
f05fc0c70f can: introduce loop_delay
During the data phase of a FDCAN transmission only one node is
transmitting, all others are receivers. The length of the bus line has
no impact.
When transmitting via pin FDCAN_TX the protocol controller receives the
transmitted data from its local CAN transceiver via pin FDCAN_RX. The
received data is delayed by the CAN transceiver loop delay.
If this delay is greater than TSEG1 (time segment before sample point),
a bit error is detected. Without transceiver delay compensation, the bit
rate in the data phase of a FDCAN frame is limited by the transceiver's
loop delay.

Since this parameter is related to the transceiver used, there cannot be
a default value, and it must be explicitly defined with the
configuration variable CONFIG_FDCAN_DEVICE_TRANSCEIVER_LOOP_DELAY.

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-01-29 20:51:23 +01:00
Gilles DOFFE
3c026569f6 can: add CAN FD configuration
Add CAN FD specifities to CAN system library in RIOT:
* 64 bytes payload
* Bit rate switching
* Error State Indicator

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-01-29 20:51:23 +01:00
Gilles DOFFE
f6f6f6973c can: introduce typedef can_frame_t
Whole CAN code in RIOT is using 'struct can_frame' to represent a CAN
frame.
However incoming CAN FD support will bring 'struct canfd_frame' to
represent CAN FD frames.
Even if the 'struct canfd_frame' has additional flags and a bigger
payload, it is aligned on 'struct can_frame' and thus they can be
referenced by the same pointers in the code.

As it is impossible to predict which one will be used in RIOT, just
define a new type 'can_frame_t' which will map to the right struct
according to the MCU CAN supported format.

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-01-29 20:51:22 +01:00
Gilles DOFFE
ae51a22fbb can: use frame len instead of can_dlc
RIOT implementation of CAN bus relies on SocketCAN model.
Since commit c398e56 (can: add optional DLC element to Classical CAN
frame structure), '__u8 can_dlc' attribute of struct can_frame is
considered as deprecated in SocketCAN and kept for legacy support.
Attribute '__u8 len' should be used instead.

	union {
		/* CAN frame payload length in byte (0 .. CAN_MAX_DLEN)
		 * was previously named can_dlc so we need to carry that
		 * name for legacy support
		 */
		__u8 len;
		__u8 can_dlc; /* deprecated */
	};

Moreover, CAN FD frame structure does not support legacy attribute
'can_dlc', making 'len' mandatory for incoming CAN FD support in RIOT.

	struct canfd_frame {
		canid_t can_id;  /* 32 bit CAN_ID + EFF/RTR/ERR flags */
		__u8    len;     /* frame payload length in byte */
		__u8    flags;   /* additional flags for CAN FD */
		__u8    __res0;  /* reserved / padding */
		__u8    __res1;  /* reserved / padding */
		__u8    data[CANFD_MAX_DLEN]
__attribute__((aligned(8)));
	};

Signed-off-by: Gilles DOFFE <gilles.doffe@rtone.fr>
2025-01-29 20:51:22 +01:00
Marian Buschsieweke
e1cfa0b2db
drivers/periph_uart: document acquire/release semantic
The UART API has not spelled out what happens when `uart_init()` is
called twice. This adds precise language that states that
acquire/release semantic is to be expected from the caller. Hence,
a caller needs to call `uart_poweroff()` before reconfiguring the UART
with a second call `uart_init()` for the same UART interface.

In practise, few apps will ever reconfigure the symbol rate. So the
impact is rather low.

However: This API now allows drivers to implement sharing of a serial
peripheral that can provide multiple interfaces (e.g. UART, SPI, I2C,
etc.). It would require some cooperation from the code that does use
the UART to actually release the UART again after each transaction;
something that will only work when RX data is only expected at
known points in time (e.g. in response to a request, or never in case
of TX only stdio). But still, this can mean the difference between
a use case becoming feasible on an MCU with a low number of serial
peripherals or not.
2025-01-24 16:46:24 +01:00
benpicco
91d587f8fa
Merge pull request #21095 from benpicco/drivers/at24cxxx-fix_set
drivers/at24cxxx: fix uninitialized return value in `_set()`
2024-12-17 16:08:48 +00:00
Benjamin Valentin
7ae354f191 drivers/at24cxxx: fix uninitialized return value in _set() 2024-12-17 15:24:13 +01:00
benpicco
24dc0143f8
Merge pull request #21074 from derMihai/mir/fix_dose_poweroff
drivers/dose: fix poweroff
2024-12-13 15:29:35 +00:00
Marian Buschsieweke
a0327ae723
Merge pull request #21068 from IsikcanYilmaz/drivers/ws281x/esp32_rmt_symbols_at_init
drivers/ws281x: esp32 neopixel driver to set the rmt symbol high/low lengths at init instead of every write
2024-12-13 08:36:48 +00:00
Dirk
9fb41d941e
drivers/sx126x: add #ifndef for SX126X_PARAMS
To be able to use multiple sx126x connected to one mcu.
2024-12-12 13:08:04 +01:00
Mihai Renea
6e0219e410 drivers/dose: fix poweroff 2024-12-11 15:33:50 +01:00
Isikcan Yilmaz
53a4a8adbe drivers/ws281x: esp32 neopixel driver to set the rmt symbol data structures at init instead of every write 2024-12-08 13:48:03 +01:00
Martine Lenders
d6f463764c
Merge pull request #21018 from miri64/saul_bat_voltage/feat/initial
saul: initial import of saul_bat_voltage module
2024-11-29 19:21:06 +00:00
Marian Buschsieweke
0dfd83938f
{cpu,drivers}/periph_gpio_ll: add missing include
For `gpio_ll_print_conf()` we need to include `<stdio.h>`, when not
using `fmt.h`.
2024-11-27 09:06:56 +01:00
Marian Buschsieweke
c700aa92d4
Merge pull request #21031 from benpicco/net_fixes-misc
drivers/at86rf215: return ENETDOWN when interface is down
2024-11-23 16:30:32 +00:00
Benjamin Valentin
a379658fa1 drivers/at86rf215: tx_frame_len is already set by at86rf215_tx_load() 2024-11-22 19:50:12 +01:00
Benjamin Valentin
ef639df76f drivers/at86rf215: return ENETDOWN when interface is down 2024-11-22 19:44:12 +01:00
Martine S. Lenders
9ad6abb081
saul: initial import of saul_bat_voltage module 2024-11-22 18:42:04 +01:00
Marian Buschsieweke
a841fc39b9
Merge pull request #21020 from benpicco/drivers/atwinc15x0-netdev_new
drivers/atwinc15x0: port to `netdev_new_api`
2024-11-21 22:15:04 +00:00
Marian Buschsieweke
db331188b9
Merge pull request #21025 from benpicco/drivers/wdt-early_init
drivers/periph_init: initialize watchdog first
2024-11-21 22:14:48 +00:00
Benjamin Valentin
220d1008a0 drivers/periph_init: initialize watchdog first
We want to initialize the watchdog early so it can detect a hang in
later init functions.
2024-11-21 16:28:28 +01:00
Benjamin Valentin
7c93da905f drivers/atwinc15x0: port to netdev_new_api 2024-11-21 13:59:58 +01:00
benpicco
27073eeab6
Merge pull request #21016 from benpicco/driver/ethos-netdev_new_api
drivers/ethos: port to netdev_new_api
2024-11-21 10:25:14 +00:00
Marian Buschsieweke
8179312d06
Merge pull request #20978 from benpicco/drivers/slipdev-netdev_new
drivers/slipdev: port to netdev_new_api
2024-11-21 09:55:19 +00:00
Marian Buschsieweke
7832253f39
Merge pull request #20991 from benpicco/rivers/dose-new_api
drivers/dose: port to netdev_new_api
2024-11-21 05:49:32 +00:00
Benjamin Valentin
fc72c76054 drivers/ethos: port to netdev_new_api 2024-11-21 00:14:16 +01:00
Benjamin Valentin
8e4bdca325 drivers/dose: port to netdev_new_api 2024-11-21 00:10:57 +01:00