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

45320 Commits

Author SHA1 Message Date
Marian Buschsieweke
6fb369d4fc
drivers/periph/gpio_ll: Add API to switch direction
This adds two functions:

    void gpio_ll_switch_dir_output(gpio_port_t port, uword_t outputs);
    void gpio_ll_switch_dir_input(gpio_port_t port, uword_t inputs);

The first configures GPIO pins specified by a bitmask as output, the
second configures the specified pins as input.

The main use case is to allow bit-banging bidirectional protocols using
more basic GPIO peripherals that do not implement open drain mode, such
as found e.g. on MSP430, ATmega, or SAM0.

It is not intended to implement this feature on modern MCUs with
sophisticated GPIO peripherals.
2024-02-05 10:56:16 +01:00
Marian Buschsieweke
8bf61336a2
Merge pull request #20290 from maribu/drivers/periph/gpio_ll/features
drivers/periph_gpio_ll: Fix GPIO_DISCONNECT handling and add compile time feature checks
2024-02-05 07:30:54 +00:00
Marian Buschsieweke
f10a994a9e
cpu/gd32v/periph_gpio_ll: fix and clean up
Use analog mode for GPIO_DISCONNECT, as this is said to have the lowest
current leakage due to disabling the Schmitt trigger and correctly
detect this in `gpio_ll_query_conf()`.

Also drop the `schmitt_trigger_disabled` member in `gpio_conf_t`, as
the Schmitt trigger is only ever disabled in Analog mode anyway and
cannot be freely configured.
2024-02-05 08:21:52 +01:00
Marian Buschsieweke
1351c61c6a
cpu/efm32: expose pull up on GPIO_DISCONNECT
Allow enabling the pull on on `GPIO_DISCONNECT` and query that
correctly.
2024-02-05 08:21:51 +01:00
Marian Buschsieweke
6028097132
cpu/stm32/periph_gpio_ll: Fix and clean up
The separate Schmitt trigger bit in the configuration is dropped, as
the Schmitt trigger is only every disabled when in `GPIO_DISCONNECT`
mode. So no need to encode the same information twice.

The `gpio_state_t` is improved to be a bitmask that holds the
MODER register value and a flag indicating whether open-drain mode
should be enabled.

Finally, `GPIO_DISCONNECT` is implemented. This is done by placing the
GPIO in analog mode, which by disabling the Schmitt trigger reduces
power consumption.
2024-02-05 08:21:51 +01:00
benpicco
0eddf4afd1
Merge pull request #20337 from benpicco/boards/weact-g030f6
boards/weact-g030f6: add support for minimal break-out board
2024-02-05 03:52:39 +00:00
Benjamin Valentin
e20784833d boards/stm32g0316-disco: enable periph_rtc 2024-02-05 00:45:42 +01:00
Benjamin Valentin
0cdbde8fb8 boards/stm32g0316-disco: set TIMER_0_MAX_VALUE 2024-02-05 00:45:42 +01:00
Benjamin Valentin
85cfcafdf6 boards/weact-g030f6: add new board 2024-02-05 00:45:42 +01:00
benpicco
e83ab21783
Merge pull request #20336 from maribu/doc/doxygen/src/getting-started.md
doc/getting-started: point out where to run make
2024-02-04 21:32:36 +00:00
Benjamin Valentin
895a6f87ed cpu/stm32/rtc: add support for STM32G0 2024-02-04 19:44:56 +01:00
Marian Buschsieweke
8ea106c16e
build system: add tl;dr to error message
When running `make` in the root directory, it might be best to just
add as tl;dr section at the bottom.
2024-02-04 19:41:32 +01:00
Marian Buschsieweke
57ecb896ec
doc/getting-started: point out where to run make 2024-02-04 17:54:02 +01:00
Benjamin Valentin
fcd734e10e drivers/ethos: add STDIO_UART_RX_BUFSIZE compat define 2024-02-03 13:09:10 +01:00
benpicco
85dcc1bd3b
Merge pull request #19742 from benpicco/shell_cmd_udptty
shell/cmds: add udptty command
2024-02-02 16:28:26 +00:00
benpicco
68152c53a9
Merge pull request #20331 from maribu/boards/common/nrf52
boards/common/nrf52: add OpenOCD's RIOT awareness
2024-02-02 13:01:59 +00:00
Marian Buschsieweke
47280b3a9b
drivers/w5100: make use of spi_transfer_u16_be()
This also fixes a bug, as the free coded byte swap code was incorrect.
2024-02-02 13:05:02 +01:00
Marian Buschsieweke
87abafb13f
drivers/periph_spi: Add spi_transfer_u16_be()
This adds a helper function to exchange a 16 bit number that is to
be transferred in big endian order on the wire.
2024-02-02 13:05:02 +01:00
Benjamin Valentin
13deed1a83 shell/cmds: add udptty command 2024-02-02 12:55:25 +01:00
Marian Buschsieweke
8403f6b7cc
boards/common/nrf52: add OpenOCD's RIOT awareness
This enables RIOT awareness in OpenOCD, so that `info threads` actually
shows RIOT's threads.
2024-02-02 12:25:11 +01:00
benpicco
22dbbf4a07
Merge pull request #20319 from chrysn-pull-requests/rust-simplifications
makefiles/cargo: Remove CARGO_CHANNEL and other simplifications
2024-02-02 08:07:02 +00:00
Marian Buschsieweke
98f505654f
Merge pull request #20327 from leandrolanzieri/pr/example/wakaama_rename
examples/wakaama: rename to lwm2m
2024-02-02 06:11:21 +00:00
Marian Buschsieweke
3b3da09ec6
Merge pull request #20313 from maribu/sys/byteorder/cleanup-implementation
sys/byteorder: clean up implementation
2024-02-02 05:38:33 +00:00
Marian Buschsieweke
8c588d919c
Merge pull request #20328 from benpicco/event/periodic_callback-getter
event_periodic_callback: add getter for interval & count
2024-02-01 18:27:41 +00:00
Marian Buschsieweke
ebfaa362f5
pkg/tinydtls: fix conflict with endian.h 2024-02-01 18:24:40 +01:00
Marian Buschsieweke
e14b309c42
sys/byteorder: clean up implementation
This changes the implementation to be solely build upon `endian.h`
and `unaligned.h`.

This turns `byteorder.h` basically in syntactic sugar on top of the
`<endian.h>` API, reducing the complexity of the implementation and,
hence, the maintenance effort.

Note that yields a small ROM reduction as well *yeah!*

```
make BOARD=nrf52840dk RIOT_CI_BUILD=1 BUILD_IN_DOCKER=1 -C tests/unittests
```

Yields before this commit:

```
   text	  data	   bss	   dec	   hex	filename
 417788	  2200	 28640	448628	 6d874	/data/riotbuild/riotbase/tests/unittests/bin/nrf52840dk/tests_unittests.elf
```

And with this commit:

```
   text	  data	   bss	   dec	   hex	filename
 417756	  2200	 28640	448596	 6d854	/data/riotbuild/riotbase/tests/unittests/bin/nrf52840dk/tests_unittests.elf
```
2024-02-01 18:24:40 +01:00
Marian Buschsieweke
48b2552ed2
pkg/esp8266_sdk: make use of <endian.h> 2024-02-01 18:24:40 +01:00
benpicco
5bd879b406
Merge pull request #20315 from fzi-haxel/native-x86-64-support
native: Linux/x86_64 support
2024-02-01 17:11:56 +00:00
Teufelchen
ed44a43464
Merge pull request #19546 from MrKevinWeiss/pr/reruntests
Enable compile_and_test_for_board to skip if nothing changed
2024-02-01 16:22:34 +00:00
Benjamin Valentin
7cbf516e3b event_periodic_callback: add getter for interval & count 2024-02-01 17:11:37 +01:00
chrysn
50c9d93951 rust/doc: Document make info-rust for IDE/editor setup 2024-02-01 14:39:43 +01:00
chrysn
9a59d59bd2 makefiles/rust: Remove RIOT_USEMODULE
The latest versions of riot-wrappers and riot-sys do not require it any
more, and the exported data from info-rust is thus much more stable.
2024-02-01 13:54:46 +01:00
chrysn
16153d73cc rust: Selectively update riot-wrappers and -sys
This pulls in embedded-nal 0.7 implementations, and (on both crates)
alterations that decouple riot-wrappers from riot-sys and simplify build
system integration, and do away with the need for passing
RIOT_USEMODULE.
2024-02-01 13:53:42 +01:00
MrKevinWeiss
ceec795ae5
compile_and_test_for_board: Add only-if-changed feature
This will use the make test-input-hash-changed feature to save
the test hashes with the results and optionally skip running
the test if nothing has changed.

Murdock already has this feature but it is not easily accessible.

This should prevent unneeded flash cycles as well as speeding up
constant rerunning of tests for boards.
2024-02-01 13:50:00 +01:00
MrKevinWeiss
66d75f191c
makefiles/tests: Add test-input-hash-changed target
This target allows one to check if a test-input-hash is there and if it differs from
a new one, adding basic support to skip tests if nothing needs to be run.
2024-02-01 13:49:59 +01:00
MrKevinWeiss
8a77807e57
makefiles: Add RIOT_TEST_HASH_DIR to build system
RIOT_TEST_HASH_DIR represents the dir to generate the test-input-hash.sha1 file for
checking if a test has changed, uses BINDIR by default.

Since it defaults to BINDIR it should have no effect on running systems.
This allows a bit more fine grain control, especially when using
the compile_and_test_for_board.py script.
2024-02-01 13:49:57 +01:00
e48cbb2cd8
Merge pull request #20324 from maribu/tests/sys/ztimer_overhead
tests/sys/timer_overhead: disable test on native in CI
2024-02-01 12:09:43 +00:00
Leandro Lanzieri
7284f7dabf
examples/wakaama: rename to lwm2m 2024-02-01 11:53:51 +01:00
Kevin "Tristate Tom" Weiss
e6844f8d28
Merge pull request #20325 from miri64/tests/enh/lwip-radio-settings
tests/pkg/lwip: include default-radio-settings.inc.mk
2024-02-01 09:51:39 +00:00
Leandro Lanzieri
d523d5dab4
pkg/wakaama/common: mark resource as updated when written to 2024-02-01 10:29:20 +01:00
Leandro Lanzieri
2f7e540c3b
pkg/wakaama: patch const URI on value changed function 2024-02-01 10:28:00 +01:00
Leandro Lanzieri
ba63450e9d
pkg/wakaama: fix patch file name 2024-02-01 10:27:25 +01:00
benpicco
d00fdcb301
Merge pull request #20030 from benpicco/nanocoap_fileserver
gcoap_fileserver: rename to nanocoap_fileserver
2024-02-01 09:08:49 +00:00
benpicco
ad743820f4
Merge pull request #20317 from Wer-Wolf/native_timer_init
Fix for `periph_timer` on `native`
2024-02-01 09:08:20 +00:00
Marian Buschsieweke
01aa5d8167
tests/sys/timer_overhead: disable test on native in CI 2024-02-01 09:55:55 +01:00
Martine Lenders
fb9b6b9cdc
tests/pkg/lwip: include default-radio-settings.inc.mk 2024-02-01 09:52:22 +01:00
benpicco
4934504c93
Merge pull request #20314 from benpicco/nanocoap_sock-debug
nanocoap_sock: improve debug output
2024-01-31 21:20:09 +00:00
Marian Buschsieweke
9723a8d5f4
sys/endian: move form sys/libc
Move the <endian.h> header from `sys/libc/include` to `sys/include`.
2024-01-31 20:14:46 +01:00
chrysn
4005235976 makefiles/rust: Show the exported environment in make info-rust
Contributes-To: https://github.com/RIOT-OS/RIOT/issues/20088
2024-01-31 17:15:08 +01:00
chrysn
740f7c7708 makefiles/rust: Silence checks in QUIET=0 mode
The checks would print their prominently colored warnings and confuse
users, and the comments are more geared to those editing the Makefiles
than to those watching which commands get executed.
2024-01-31 16:13:34 +01:00