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

43544 Commits

Author SHA1 Message Date
Marian Buschsieweke
b9484852f1
drivers/sx126x: fix argument validation in spreading factor
The lowest possible value is `LORA_SF5` and not `LORA_SF6`. This fixes
the argument validation to allow setting `LORA_SF5` as spreading factor.

Fixes https://github.com/RIOT-OS/RIOT/issues/17861
2023-05-22 15:06:07 +02:00
bors[bot]
a28f6e5a41
Merge #19628 #19637
19628: Fix periph clk r=aabadie a=Enoch247

### Contribution description

This fixes some minor doc and argument type errors. See commit messages for details.

### Testing procedure

It compiles without errors for me.

### Issues/PRs references

None known

19637: sys/usb/usbus_msc: fix typo in C expression r=aabadie a=maribu

### Contribution description

Rather than setting the correct blk_len, the code only wrote 1 and 0 into the three bytes due to the use of a logic and where a bitwise and should be used.


Co-authored-by: Joshua DeWeese <jdeweese@primecontrols.com>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-21 06:04:07 +00:00
Marian Buschsieweke
28c1630f54
sys/usb/usbus_msc: fix typo in C expression
Rather than setting the correct blk_len, the code only wrote 1 and 0
into the three bytes due to the use of a logic and where a bitwise
and should be used.
2023-05-20 22:18:27 +02:00
bors[bot]
8fc1187278
Merge #17830 #19635
17830: periph/timer: fix Kconfig menu title r=aabadie a=gschorcht

### Contribution description

This PR is a very small fix of inconsistent peripheral driver entry in `Kconfig` for `periph/timer`.

In Kconfig menu `(Top) → Drivers → Peripherals drivers` all entries start with the peripheral name in alphabetical order with only one exception, the timer entry. This entry is called `Configure timer peripheral driver`:
```
[ ] CPU unique ID
[ ] EEPROM peripheral driver
[ ] Flashpage peripheral driver  ----
[*] GPIO peripheral driver  --->
[ ] HWRNG peripheral driver
[ ] PWM peripheral driver
[*] Power Management (PM) peripheral driver
[*]     Auto initialize Power Management (PM) peripheral
[ ] Quadrature Decoder (QDEC) peripheral driver
[ ] RTC peripheral driver  ----
[ ] SPI peripheral driver  ----
[*] UART peripheral driver  --->
[*] Configure timer peripheral driver  --->
```
This is confusing and doesn't help to find the right entry. This PR
1. changes the entry to `Timer peripheral driver` and
2. corrects the alphabetical order.

### Testing procedure

Use command
```
TEST_KCONFIG=1 make -C tests/periph_timer menuconfig
```
and check the output. in menu `(Top) → Drivers → Peripherals drivers`. It should be with this PR:
```
[ ] CPU unique ID
[ ] EEPROM peripheral driver
[ ] Flashpage peripheral driver  ----
[*] GPIO peripheral driver  --->
[ ] HWRNG peripheral driver
[ ] PWM peripheral driver
[*] Power Management (PM) peripheral driver
[*]     Auto initialize Power Management (PM) peripheral
[ ] Quadrature Decoder (QDEC) peripheral driver
[ ] RTC peripheral driver  ----
[ ] SPI peripheral driver  ----
[*] Timer peripheral driver  --->
[*] UART peripheral driver  --->
```
### Issues/PRs references


19635: drivers/mrf24j40: cleanup function r=aabadie a=maribu

### Contribution description

`_set_csma_params()` spends some time to prepare a value in `uint8_t tmp`, which then is never used. Likely this is a leftover of moving code to `mrf24j40_set_csma_max_retries()`. This drops the leftover code.


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-20 18:43:44 +00:00
bors[bot]
7ac0b6f821
Merge #19433
19433: cpu/esp32: deduplication in Kconfig for ESP32x SoCs r=aabadie a=gschorcht

### Contribution description

This PR reduces the code duplication in Kconfig for ESP32x SoCs.

It defines a new common CPU symbol `CPU_COMMON_ESP32X` in Kconfig that is used by all `CPU_FAM_ESP32x` symbols. It selects all features, modules and packages that are common for all ESP32x SoC variants. This avoids the selection of features, modules and packages again and again for each ESP32x SoC variant.

The same is done in PR #19432 for common ESP32x board definitions.

### Testing procedure

Green CI

### Issues/PRs references

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-05-20 15:42:00 +00:00
Marian Buschsieweke
c10b8838f1
drivers/mrf24j40: cleanup function
`_set_csma_params()` spends some time to prepare a value in
`uint8_t tmp`, which then is never used. Likely this is a leftover
of moving code to `mrf24j40_set_csma_max_retries()`. This drops the
leftover code.
2023-05-20 16:59:25 +02:00
bors[bot]
06e27d5aba
Merge #19619
19619: cpu/arm7: Fix undefined behavior based on invalid assembly r=aabadie a=Teufelchen1

### Contribution description

Hellooo! 🦤

In this PR a single `NOP` is added after an `ldm` in ARM7 common code in the scheduling management.
The change is necessary because this particular `ldm` affects certain banked registers, including `R14 / lr`. The next instruction then immediately accesses `lr`. This is invalid and the exact effect depends on the underlying hardware implementation. An intermediate `NOP` ensures correct behaviour in such cases.

The ARM docs can be found [here](https://documentation-service.arm.com/static/5f8dacc8f86e16515cdb865a), in section `A4.1.21 LDM (2)`. It states:
> In ARM architecture versions earlier than ARMv6, this form of LDM must not be
followed by an instruction that accesses banked registers. A following NOP is a good
way to ensure this.


### Testing procedure

Without this change, on the Game Boy Advance, RIOT behaves irregularly. With the `NOP`, it works fine!
If possible, this change should be tested on other ARM7 hardware as well but I do not have access to any.  

----

Special thanks `@pyropeter` for spotting the extremely tiny note on this issue within the ARM docs. You saved me hours of tears! 👾

Co-authored-by: Teufelchen1 <bennet.blischke@outlook.com>
2023-05-20 12:51:14 +00:00
bors[bot]
f47003c1db
Merge #19572
19572: cpu/stm32/periph_pwm: support of complementary timer outputs r=maribu a=gschorcht

### Contribution description

This PR provides the support of complementary timer outputs as PWM channels for advanced timers (TIM1/TIM8).

To use a complementary output of an advanced timer as PWM channel, the output is defined with an offset of 4, i.e. normal outputs are in the range of 0 to 3 (CH1...CH4) and complementary outputs are in the range of 4 to 6 (CH1N...CH3N). If the defined output is less than 4, the normal output is enabled, otherwise the complementary output is enabled.

This change is required to support PWM on boards that have connected the complementary outputs of advanced timers to the PWM connector pins, for example the STM32L496-DISCO board.

### Testing procedure

- Green CI
- Use any STM32 board which supports the `periph_pwm` feature. `tests/periph_pwm` should still work.
- Change the configuration for this board so that either timer TIM1 or TIM8 and a complementary channel is used for any exposed GPIO. `tests/periph_pwm` should also work with such a configuration.

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-05-20 09:57:27 +00:00
bors[bot]
975f150383
Merge #19621 #19622 #19623 #19626 #19627
19621: sys: add Kconfig support for clif r=MrKevinWeiss a=aabadie



19622: sys: add some missing kconfig + adapt related tests when possible r=aabadie a=aabadie



19623: pkg/libbase58: add kconfig support r=MrKevinWeiss a=aabadie



19626: sys/gnrc_lorawan: remove deprecated tx port option r=aabadie a=aabadie



19627: makefiles/pseudomodules: remove deprecated event_thread_lowest module r=aabadie a=aabadie



Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-05-20 07:13:34 +00:00
bors[bot]
a08b90c648
Merge #19633
19633: drivers/slipdev: fix logic bug r=fabian18 a=maribu

### Contribution description

A typo resulted in a boolean expression to always be true and the `_poweron()` function to always exit early. This fixes the issue.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-20 00:35:17 +00:00
bors[bot]
24593ce18c
Merge #19631 #19632
19631: drivers/dfplayer: fix bug in utility function r=maribu a=maribu

### Contribution description

Apparently, those functions have never been used. Otherwise this obvious bug wouldn't have sailed unnoticed for so long.



19632: drivers/pcf857x: fix error handling r=maribu a=maribu

### Contribution description

This fixes a typo/copy paste error in the error handling.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-19 21:54:05 +00:00
Marian Buschsieweke
adfe9ac306
drivers/slipdev: fix logic bug
A typo resulted in a boolean expression to always be true and the
`_poweron()` function to always exit early. This fixes the issue.
2023-05-19 23:01:30 +02:00
Marian Buschsieweke
bc1c831d39
drivers/pcf857x: fix error handling
This fixes a typo/copy paste error in the error handling.
2023-05-19 21:59:40 +02:00
Marian Buschsieweke
5683281b5d
drivers/dfplayer: fix bug in utility function
Apparently, those functions have never been used. Otherwise this
obvious bug wouldn't have sailed unnoticed for so long.
2023-05-19 21:51:44 +02:00
bors[bot]
a46b49a24c
Merge #19605 #19624 #19625
19605: drivers/at86rf2xx: setting rx timestamp based on symbol counter for ATmega*RFR2 r=maribu a=chudov



19624: pkg/tensorflow-lite: remove deprecated package r=maribu a=aabadie

Use tflite-micro instead



19625: sys/hashes: remove deprecated aes cmac hashing r=maribu a=aabadie



Co-authored-by: chudov <chudov@gmail.com>
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-05-19 17:05:02 +00:00
Gunar Schorcht
d8cf5a0c66 cpu/stm32/periph_pwm: add doc for complementary timer channels 2023-05-19 16:51:26 +02:00
Gunar Schorcht
62210303ab cpu/stm32/periph_pwm: allow to use complementary timer channels
To use a complementary output of an advanced timer as PWM channel, the output is defined with an offset of 4, i.e. normal outputs are in the range of 0 to 3 (CH1...CH4) and complementary outputs are in the range of 4 to 6 (CH1N...CH3N). If the defined output is less than 4, the normal output is enabled, otherwise the complementary output is enabled.
2023-05-19 16:51:26 +02:00
Joshua DeWeese
094977d9e0 cpu/stm32: make bus arg consistent
Some periph clock functions took the bus arg as a `uin8_t`, others took
it as a `bus_t`. This patch makes them all take it as a `bus_t`.
2023-05-19 10:44:24 -04:00
Joshua DeWeese
99337cda9c cpu/stm32: fix incorrect doc
The doxygen doc for `periph_lpclk_dis()` and `periph_clk_dis()` we
flip-flopped. This patch corrects this.
2023-05-19 10:44:24 -04:00
bors[bot]
57555ca849
Merge #19616 #19617
19616: boards/adafruit-clue: use shared usb_board_reset.mk for flash/reset/term targets r=aabadie a=aabadie



19617: make/usb_board_reset: define {preflash,term}-delay when necessary r=aabadie a=aabadie



Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-05-19 14:22:04 +00:00
558d7dd8f2
makefiles/pseudomodules: remove deprecated event_thread_lowest module 2023-05-19 16:15:10 +02:00
889d753ed6
sys/ 2023-05-19 16:07:01 +02:00
cfb5000d5c
sys/gnrc/lorawan: remove handling of deprecated tx port 2023-05-19 16:06:53 +02:00
0eb5bac330
sys/hashes: remove deprecated ase cmac hashing 2023-05-19 16:01:12 +02:00
eefa4de943
pkg/tensorflow-lite: remove deprecated package
Use tflite-micro instead
2023-05-19 15:48:44 +02:00
609ba37b81
tests/pkg/libbase58: add Kconfig config 2023-05-19 15:40:57 +02:00
ca5ac76199
pkg/libbase58: add Kconfig support 2023-05-19 15:40:44 +02:00
chudov
c52f6e71c2 drivers/at86rf2xx: rx timestamp generation for ATmegaRFR2
Signed-off-by: chudov <chudov@gmail.com>
2023-05-19 15:33:15 +02:00
12a6ed0dda
tests/sys/ssp: add kconfig dependency file 2023-05-19 15:16:35 +02:00
b747a21450
tests/sys/sema_inv: add kconfig dependency file 2023-05-19 15:14:51 +02:00
d7f14e4a87
tests/sys/sema_inv: switch to ztimer 2023-05-19 15:14:26 +02:00
27cf550f74
sys/ut_process: add missing Kconfig 2023-05-19 15:09:56 +02:00
d39af66176
sys/uuid: add missing Kconfig 2023-05-19 15:09:55 +02:00
67391afe1a
sys/ssp: add missing Kconfig 2023-05-19 15:09:55 +02:00
4c9d6c0b49
sys/sema_inv: add missing Kconfig 2023-05-19 15:09:55 +02:00
5d351632d1
sys/coding: add missing Kconfig 2023-05-19 15:09:54 +02:00
f28d0f1b7b
sys: add Kconfig support for clif 2023-05-19 15:03:42 +02:00
Teufelchen1
583a1da348 cpu/arm7: Fix undefined behavior based on invalid assembly 2023-05-19 11:34:30 +02:00
bors[bot]
2327d74d24
Merge #19609
19609: drivers/lpsxxx: avoid float arithmetics r=aabadie a=maribu

### Contribution description

Perform computation directly in centi-degree-celsius to avoid floating point arithmetics. In addition, use scientific rounding in the division.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-19 07:49:57 +00:00
Marian Buschsieweke
dcb49cb46d
drivers/lpsxxx: avoid float arithmetics
Fixes https://github.com/RIOT-OS/RIOT/issues/17486
2023-05-19 09:23:30 +02:00
bors[bot]
23babe6ea1
Merge #19615
19615: tests/sys/shell_coreclk: add test application for shell_cmd_coreclk r=aabadie a=aabadie



Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-05-18 20:00:39 +00:00
f25731e88a
make/usb_board_reset: define {preflash,term}-delay when necessary 2023-05-18 21:41:54 +02:00
d2628e89b4
boards/adafruit-clue: use shared usb_board_reset.mk for flashing 2023-05-18 21:37:19 +02:00
9b3771778f
tests/sys/shell_coreclk: add test application for shell_cmd_coreclk 2023-05-18 21:00:05 +02:00
bors[bot]
19ce68dd2e
Merge #19603
19603: doc/mainpage: minor improvements r=aabadie a=aabadie



Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-05-17 18:22:17 +00:00
22fda62623
doc/mainpage: fix punctuation 2023-05-17 14:51:48 +02:00
a1c60faa2a
doc/mainpage: point to supported board on main website
The wiki page is fairly outdated
2023-05-17 14:51:11 +02:00
bors[bot]
7e59b68a9c
Merge #19599
19599: examples/wasm/wasm_sample: revert prebuild WASM r=kfessel a=maribu

### Contribution description

Running `make` in the wasm example modifies the `hello_prebuild.wasm` example, making it easy to sneak in unwanted changes. This reverts such an instance and modifies the Makefile to only recreate/update `hello_prebuild.wasm` with:

    make hello_prebuild.wasm


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-17 12:10:50 +00:00
Marian Buschsieweke
f6c7234e39
examples/wasm/wasm_sample: revert prebuild WASM
Running `make` in the wasm example modifies the `hello_prebuild.wasm`
example, making it easy to sneak in unwanted changes. This reverts such
an instance and modifies the Makefile to only recreate/update
`hello_prebuild.wasm` with:

    make hello_prebuild.wasm
2023-05-17 12:31:13 +02:00
bors[bot]
1c1199c407
Merge #19600
19600: build-system: Allow out of tree BUILD_DIR r=maribu a=maribu

### Contribution description

- Replace all users of `$(RIOTBASE)/build` with the already present `$(BUILD_DIR)` variable
- Replace all users of `$(BUILD_DIR)/pkg` with the already present `$(PKGDIRBASE)` variable
- Create a `CACHEDIR.TAG` file in the `$(BUILD_DIR)`


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-16 21:26:57 +00:00