Kconfig.dep depends on FORCE, so it is always generated when compiling
with Kconfig under normal conditions. Whan TEST_KCONFIG=1 is set, this
file is no longer a dependency for out.config. So when cleaning the
'bin' directory, out.config has no direct dependencies that force its
rebuilding (the generated directory is order only). This causes the file
not to be produced when calling `TEST_KCONFIG=1 make clean all`.
This PR changes the dependency on the 'generated' directory to a direct
dependency when `CLEAN` is set and leaves it as order-only when not.
This allows to generate out.config only when needed by not depending on
FORCE.
This replaces the printf statement in the timer callback with fmt-based
printing and a single puts. This is less heavy on the stack usage than
printf, making this test a bit easier to digest on the smaller
platforms.
Verified that each warning generated by -Wcast-align is indeed a false positive
and used an (intermediate) cast to `uintptr_t` to silence the warnings.
container_of() is safe to use in regard to alignment requirements, when used
correctly. Using `uintptr_t` instead of `char *` for applying the offset results
in -Wcast-align not complaining.
Change driver guide to expect drivers to return negative errno codes instead of
enums for error codes. Those have the following advantages:
- More efficient implementation of POSIX compatibility wrappers:
- In case of error, just an `errno = -retval; return -1` is needed
- Better interoperability
- A lot of code within RIOT and in external code is doing so already.
Applying this consistently allows passing error codes through, rather
than translating between errno codes and custom enum values
- Not reinventing the wheel
- Defining and documenting custom error codes for each driver is unneeded
effort
- The error classes that device driver have to report are largely the same.
There is no reason to have dozens of error codes for an input/output
error, each with a unique spelling a programmer needs to memorize
xtimer.h must not be included, when the xtimer module is not use. Otherwise
compilation on the waspmote-pro with https://github.com/RIOT-OS/RIOT/pull/14799
will not longer work. gnrc_netif_pktq includes xtimer.h and uses xtimer, but
gnrc_netif includes gnrc_netif_pktq.h regardless of whether gnrc_netif_pktq
is used. This makes sure that gnrc_netif_pktq.h is only included when actually
used.
Previously, the function would always return the max_len parameter.
This poses two issues:
1. the API requires to return the actual packet size
2. the API requires that if the packet is larger than max_len, the
packet is flushed and -ENOBUFS is returned
3. this basically bypasses the packet flushing, consequtive _recv()
would return the last packet again
This commit fixes those issues.
On samd5x only the RTC can wake the CPU from Deep Sleep (pm modes 0 & 1).
The external interrupt controller is disabled, but we can use the tamper
detection of the RTC.
If an gpio interrupt is configured on one of the five tamper detect pins,
those can be used to wake the CPU from Deep Sleep / Hibernate.