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

10862 Commits

Author SHA1 Message Date
Benjamin Valentin
42754b58ea gnrc_sock_udp: set source port when aux local is present 2024-05-21 19:25:55 +02:00
Benjamin Valentin
52350852cc sys/event/timeout: uninitialized event is not pending 2024-05-21 19:25:55 +02: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
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
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
Benjamin Valentin
7cbf516e3b event_periodic_callback: add getter for interval & count 2024-02-01 17:11:37 +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
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
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
Marian Buschsieweke
10e896390d
sys/libc/endian.h: fix compilation with older newlib
Older versions of newlib already provide the magic endian numbers
via `machine/endian.h`, which may be indirectly included. This changes
the header to only provide the macros if the are not provided otherwise.
For sanity, it checks if the values are indeed the expected magic
numbers, even if provided from other sources.
2024-01-31 14:50:36 +01:00
Marian Buschsieweke
0d01356c9c
sys/libc/endian: fix compilation on AVR
There is no need to use `__uint16_t` instead of `uint16_t` etc., so
let's just go with `uint16_t` and have AVR GCC happy.
2024-01-31 14:46:24 +01:00
Marian Buschsieweke
e5f69206ad
sys/libc/endian.h: fix magic constants
The constants BIG_ENDIAN etc. were not consistently defined. This
bug was not caught by the unit tests, as the preprocessor would
treat undefined macros as being `0` in numeric comparisons, hence
the following test did select the correct implementation:

```C
#if BYTE_ORDER == LITTLE_ENDIAN
/* correct implementation for all currently supported boards */
#endif
```

This adds now an explicit test to the unit tests to ensure that the
magic numbers are consistently the correct values. Hence, this bug
should no longer be able to sneak in.

Co-authored-by: Teufelchen <9516484+Teufelchen1@users.noreply.github.com>
2024-01-31 14:46:24 +01:00
Han Xinrong
bf3c038fa9 sys/random/fortuna/fortuna.c:add error check of aes_encrypt() 2024-01-30 19:04:01 +01:00
Benjamin Valentin
be399d59d0 gcoap_fileserver: rename to nanocoap_fileserver 2024-01-30 16:59:00 +01:00
Benjamin Valentin
a76feeb70e nanocoap_sock: improve debug output 2024-01-30 16:33:55 +01:00
benpicco
7c8c522a73
Merge pull request #20309 from jia200x/pr/fix_tnt_loopback
gnrc_ipv6: fix double-free when pinging TNT loopback address
2024-01-30 11:54:48 +00:00
Marian Buschsieweke
e085ad02af
Merge pull request #20310 from maribu/libc/endian
sys/libc: add endian.h
2024-01-30 11:48:45 +00:00
Marian Buschsieweke
68018fe182
sys/libc: add endian.h
This provides glibc, NetBSD, FreeBSD compatible endian.h header with a
lean and simple API to convert between host byte order to little endian
and big endian and the other way around.
2024-01-30 10:59:28 +01:00
chrysn
55cbb7bdfa
Merge pull request #20303 from chrysn-pull-requests/rust-updates
treewide: Rust updates
2024-01-29 19:54:32 +00:00
Jose Alamos
8dc5e9109e
gnrc_ipv6: fix double free when pinging TNT loopback address 2024-01-29 14:34:41 +01:00
Fabian Hüßler
278dec22b1 vfs: fix FATFS_VFS_FILE_BUFFER_SIZE for increased VFS_NAME_MAX 2024-01-29 11:54:21 +01:00
chrysn
002cd42e26 treewide: cargo update 2024-01-27 09:41:26 +01:00
benpicco
2d459157f1
Merge pull request #20284 from benpicco/coap_build_reply_header
nanocoap: add coap_build_reply_header()
2024-01-24 22:00:57 +00:00
chrysn
52b0c8087b
Merge pull request #20294 from Teufelchen1/chore/rpl_format
routing/rpl: Fixing styling & format
2024-01-24 12:08:05 +00:00
Teufelchen1
1407d4b638 net/rpl: Major style fixes using uncrustify 2024-01-24 11:47:28 +01:00
Teufelchen1
8f6d5b2cb4 net/rpl: Minor style fixes 2024-01-24 11:45:32 +01:00
benpicco
ded97c36f0
Merge pull request #20285 from benpicco/gnrc_loopback-linklocal
gnrc/ipv6: only send link-local loopback if it's on the same interface
2024-01-23 21:48:54 +00:00
Benjamin Valentin
c71b5ae617 nanocoap: implement coap_reply_simple() using coap_build_reply_header() 2024-01-23 19:16:59 +01:00
Benjamin Valentin
158c1b8fa8 nanocoap: add coap_build_reply_header() 2024-01-23 19:16:59 +01:00
Benjamin Valentin
a6ef93fc71 nanocoap: make use of COAP_PAYLOAD_MARKER 2024-01-23 19:16:59 +01:00
Benjamin Valentin
fdc722f842 net/coap: define COAP_PAYLOAD_MARKER 2024-01-23 13:56:10 +01:00
mguetschow
50cf7b77cd
Merge pull request #20272 from Teufelchen1/chore/fmt_test_2
tests: Slightly increase coverage of fmt unittests
2024-01-23 12:06:48 +00:00
Teufelchen1
7c39b48847 tests: Slightly increase coverage of fmt unittests 2024-01-23 10:30:49 +01:00
Benjamin Valentin
616a5d69f6 gnrc/ipv6: only send link-local loopback if it's on the same interface 2024-01-22 20:03:41 +01:00
benpicco
8dbe2ef7e4
Merge pull request #20273 from benpicco/coap_find_uri_query
nanocoap: implement coap_find_uri_query()
2024-01-20 11:27:15 +00:00
Benjamin Valentin
1c24462cd9 nanocoap: implement coap_find_uri_query() 2024-01-19 10:53:03 +01:00
Benjamin Valentin
0b925c2494 sys/shell: fix reserved addresses in i2c_scan
There are only 8 reserved addresses on the low end of the address space.
2024-01-18 15:08:14 +01:00
Benjamin Valentin
c650b38989 gcoap: move gcoap_fileserver to nanoCoAP 2024-01-17 19:21:47 +01:00
Marian Buschsieweke
0cffb7f365
Merge pull request #20257 from fzi-haxel/native64-part1
core, sys, drivers: 64-bit support preparations
2024-01-17 15:40:34 +00:00
Frederik Haxel
394cd0e3a8 sys: 64 bit compatibility
* priority_queue_t: Replaced `-1U` literal with PRIORITY_QUEUE_DATA_SIGNALING define
* architecture.h: Added 64-bit
* bloom.h: Fixed typedef for the hashfp_t function pointer
* vfs.h: Increased default vfs buffer sizes for 64 bit
* bytes.h: Check if socklen_t is already defined
* ztimer: Use PRIxPTR format specifier
2024-01-17 16:05:12 +01:00
mguetschow
084dedcca7
Merge pull request #20116 from bergzand/pr/sha256/no_static
hashes/sha2{24,56}: Remove static variables from sha256
2024-01-16 16:01:56 +00:00
benpicco
c1ae2ecb9f
Merge pull request #20259 from fabian18/pr/gnrc/ipv6/nib_rejoin_ip6_mcast
gnrc/ipv6/nib: rejoin ipv6_addr_all_nodes_link_local on interface up
2024-01-16 15:11:53 +00:00
434e5647d0
hashes/sha224: Remove static variables from sha224 2024-01-16 16:00:44 +01:00
bac3f48dc9
hashes/sha256: Remove static variables from sha256
This removes the static (thread-unsafe) variables from sha256 and
hmac_sha256 to remove a potential footgun. The static variable is only
used when the caller does not supply a pointer to store the digest and
it is returned via the (undocumented) return value.

This commit removes this option and makes the digest argument mandatory.
2024-01-16 16:00:39 +01:00
Fabian Hüßler
ab3f77e673 gnrc/ipv6/nib: rejoin ipv6_addr_all_nodes_link_local on interface up 2024-01-16 12:34:37 +01:00
Frederik Haxel
291c89f1e7 sys/net/gnrc: Fixed wrong PRIuSIZE format specifier 2024-01-12 17:17:33 +01:00
benpicco
0c80553534
Merge pull request #20244 from benpicco/sys/shell/cmds-version
sys/shell: add firmware version to version cmd
2024-01-11 17:56:40 +00:00
Benjamin Valentin
f932552b99 sys/shell: add firmware version to version cmd 2024-01-11 14:38:15 +01:00
benpicco
714958ad3c
Merge pull request #20241 from benpicco/busy_wait
sys/busy_wait: add busy wait helper
2024-01-11 12:19:31 +00:00