The macro `ARDUINO_SPI_D11D12D13` is used to refer to the SPI bus
on the pins D11/D12/D13 on Arduino UNO compatible boards. For all
Nucleo64 boards this is `SPI_DEV(0)`, but for this board `SPI_DEV(0)`
is internally connected to the radio. Instead `SPI_DEV(1)` is connected
to the correct pins. This provides the macro explicitly in
`periph_conf.h`, which takes preference over the fallback in
`boards/common/nucleo64` when provided.
sock_udp_recv_buf_aux() sometimes will return -ETIMEDOUT before
the given timeout has expired (e.g. 28798µs instead of 160000µs).
This messes with many assumptions and breaks protocols that rely
on the timeout.
Until we have a proper fix, add this workaround.
The test should execute only with `make test-with-config` and not with
`make test`, as boards without the shield cannot pass the test.
For some reason I accidentally added both variants, which makes no
sense. This drops the `make test` variant.
Finally, the `README.md` is updated to refer to `make test-with-config`
instead of `make test`.
This test application makes use of the RIOT Peripheral Selftest Shield,
which connects e.g. PWM to ADC or SPI MOSI to SPI MISO, UART TXD to RXD,
etc. This provides quick and fully automated self testing capabilities.
Please note that the simplicity and ease of use of the hardware comes
with a prices: There are whole classes of issues that cannot be detected
automatically. This test cannot replace other testing approaches
(such as manual testing or PHiLIP on the HiL), but only complement them.
`flash_<funcname>()` is implemented by `<funcname>_P()` provided by
the AVR libc on AVR targets. Previously, the preprocessor was used
to do the aliasing, but this causes issues with LLVM: The signatures of
e.g. `printf_P()` expects `const char *`, whereas flash utils expects
`FLASH_ATTR const char *`. For GCC this will just implicitly drop the
`FLASH_ATTR`, while it requires an explicit cast for LLVM.
To implement the explicit cast, `static inline` function wrappers
where used instead where possible. But for the variadic functions
(e.g. `printf(fmt, ...)`) the linker is used to provide the aliases,
as there is no way to pass the variadic functions throw in C. The
alternative would be to implement `flash_printf()` by calling
`vprintf_P()`, but that increased ROM size quite a bit.
Finally, a work around for a bug in Ubuntu's toolchain has been added:
An unused function that calls to `printf_P()`, `fprintf_P()` and
`snprintf_P()`. Since this function is garbage collected anyway, it
has no impact on the generated ELF file.
The function signature in the Doxygen generated doc was incorrect.
Given that the implementation does have the correct signature, the
impact may not be that large. Still, incorrect doc is confusing, so
let's fix it.