This patch replaces the package supplied logging macros with RIOT's. It
also removes the requirement that DEVELHELP be defined to enable
logging. Instead, logging can be enabled/dissabled via the log level.
This patch replaces the package supplied logging macros with RIOT's. It
also removes the requirement that DEVELHELP be defined to enable
logging. Instead, logging can be enabled/dissabled via the log level.
The patch also replaceses the package's trace macro with RIOT's DEBUG
macro.
This adds enough to do compile testing for gcoap_forward_proxy.
A proper test would still be needed, though.
This still already exposed compilation issues.
Now that model.h is in the repo, it no longer is a build dependency.
This allows compilation of the test without having emlearn installed,
which is useful e.g. for build testing.
The Makefile rule to regenerate model.h has been left in place, but
just adding the header to the test allows to build the application
without heaving emlearn installed, which is convenient for the CI.
Actual users of emlearn will like still want to generate the header.
Add some tests to verify that when creating or importing keys,
the usage flags PSA_KEY_USAGE_SIGN_HASH/PSA_KEY_USAGE_VERIFY_HASH
automatically set the usage flags PSA_KEY_USAGE_SIGN_MESSAGE/
PSA_KEY_USAGE_VERIFY_MESSAGE on the key.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
This pulls in several updates for which there is no urgent need, but
also no good reason *not* to do them (especially as they may contain bug
fixes, even critical ones).
In all other tests we added a delay after writing to the output buffer
of GPIO A before expected the input buffer of GPIO B (connected to A)
to reflect the change, but not in test_switch_dir().
This adds the delay here as well to make the test more robust in regard
to GPIO peripherals that react not as fast as the CPU can query them.
It turns out that the feature to switch the GPIO direction quickly
is not only a way to emulate open drain / open source mode for less
sophisticated GPIO peripherals that do not natively support it.
It also enables tri-state output (push-pull high, push-pull low,
high impedance), which is useful e.g. for driven charlieplexed LEDs
quickly.
This changes the API by introducing a `gpio_ll_prepare_switch_dir()`
function that prepares the value used to identify which pins should
be switched to input or to output mode. This is useful for GPIO
peripherals in which the GPIO mode register does not allocate one bit
per pin (so that only the direction is given there), such as the one
for STM32. This allows an STM32 implementation in which preparing the
bitmask needed to modify the direction of pins is not trivial.
The assumption that every MCU has this feature turned out wrong. Hence,
add a feature to allow testing for support of edge triggered IRQs on
both flanks.
A test intended to ensure that a configuration toggling the direction
of a GPIO two times restores the original configuration not only
compared the configuration at the two points in time, but also the
value of the input buffer. Since a floating input reads back random
values when not externally driven, the test was actually randomly
failing. Apparently I got lucky before consistently and this never
triggered until now.
This now clears the input value from both the configuration reported
before and after toggling the direction twice and should now indeed
succeed consistently.
The API was based on the assumption that GPIO ports are mapped in memory
sanely, so that a `GPIO_PORT(num)` macro would work allow for constant
folding when `num` is known and still be efficient when it is not.
Some MCUs, however, will need a look up tables to efficiently translate
GPIO port numbers to the port's base address. This will prevent the use
of such a `GPIO_PORT(num)` macro in constant initializers.
As a result, we rather provide `GPIO_PORT_0`, `GPIO_PORT_1`, etc. macros
for each GPIO port present (regardless of MCU naming scheme), as well as
`GPIO_PORT_A`, `GPIO_PORT_B`, etc. macros if (and only if) the MCU port
naming scheme uses letters rather than numbers.
These can be defined as macros to the peripheral base address even when
those are randomly mapped into the address space. In addition, a C
function `gpio_port()` replaces the role of the `GPIO_PORT()` and
`gpio_port_num()` the `GPIO_PORT_NUM()` macro. Those functions will
still be implemented as efficient as possible and will allow constant
folding where it was formerly possible. Hence, there is no downside for
MCUs with sane peripheral memory mapping, but it is highly beneficial
for the crazy ones.
There are also two benefits for the non-crazy MCUs:
1. We can now test for valid port numbers with `#ifdef GPIO_PORT_<NUM>`
- This directly benefits the test in `tests/periph/gpio_ll`, which
can now provide a valid GPIO port for each and every board
- Writing to invalid memory mapped I/O addresses was treated as
triggering undefined behavior by the compiler and used as a
optimization opportunity
2. We can now detect at compile time if the naming scheme of the MCU
uses letters or numbers, and produce more user friendly output.
- This is directly applied in the test app
Providing the configuration via Makefile variables if Kconfig is supported by the module
may involve some non-determinism in the environment variable that is finally exposed to the python tests.
This commit moves the configuration from Makefile to app.config.
The board white list was needed as temporary workaround during the
KConfig migration. As the migration was aborted, the workaround should
no longer be needed.
Partially fixes https://github.com/RIOT-OS/RIOT/issues/20680
This gets rid of a long list of boards with network interfaces and
instead let's boards (or MCUs with peripheral network interfaces)
provide the netif feature.
The apps that before used the long list are not depending on the
feature instead (in case of the default example, this is an
optional dependency).
Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
Co-authored-by: mewen.berthelot <mewen.berthelot@orange.com>
This updates the test app to use the XFA shell interface and ztimer.
In addition, a shell command to power off the UART interface is added
to e.g. confirm that power consumption indeed goes down.