During production it is often desirable for devices to perform
some kind of basic self-test to isolate defects.
For this it is necessary for the initialization not to hang if a
component is faulty / not connected.
This moves an already exising self-test that was previously enabled
as a debug option to an independent compile-time configurable.
It is necessary to call this in _init() before mrf24j40_hardware_reset()
as the reset function uses xtimer_usleep() which will cause another
thread to get scheduled.
If this thread (e.g. rpl or ipv6) then tries to access the netdev, RIOT
will crash.
If the destination address or an address within the source route is
multicast within a RPL source routing header, a receiving node is
supposed to just discard the packets, but not to send an ICMPv6 error
message, as the test assumes at the moment.
Source: https://tools.ietf.org/html/rfc6554#section-4.2
Two Functions cmd_test_xtimer_mutex_lock_timeout_low_prio_thread and thread_low_prio_test are added.
This testfunction will test xtimer_mutex_lock_timeout with two threads (main thread and lower prio than main thread).
The main thread creates another thread and sleeps. While the main thread sleeps the other thread takes the mutex
and wakes the main thread up.
Then the main thread calls xtimer_mutex_lock_timeout and the second thread unlocks the mutex and
the main thread gets it and waits for the created thread to end.
Has test messages showing the thread count. To make sure the created thread ends.
(test messages may be removed in the future)
Removing the periph_timer feature requirement, which isn't
directly required by this examples but rather by xtimer.
The latter set this requirement already in Makefile.dep
hence, it is duplicated and not necessary here.
The IPv6 (extension) headers of the first fragment received are re-used
for the reassembled packet, so when receiving a subsequent packet we
need to distinguish, if we just want to release the payload or all of
the packet after the packet data was added to the reassembly buffer.
Adds a test case for when the following conditions cause a crash:
- a subsequent fragment is received before the first
- the reassembly buffer is currently filled up when another fragment of
a different datagram arrives and thus needs to be cached out to make
room for the new reassembly
This allow configuring the flash targets in the same way as the
compilation and test targets.
This is part of trying to flash with docker using a different flash target.
Right now the gain and reference are hard coded. Until it is configurable
at runtime prefer the same default as with Arduino Core. That is,
GAIN_DIV2 and REFSEL_INTVCC1. This way we can properly measure the
battery voltage.