Using the Tock libtocksync_alarm_delay_ms() syscall has too much
overhead, both in terms of extra time but also jitter. This means it's
not a reliable source for short but accurate delays, such as the kind
used in LoRaWAN.
This patch instead uses a busy loop for short (less then 5 second)
delays. This might have some impact on performance and power as we are
busy running in a loop, but overall we end up with a much more accurate
time and working LoRaWAN.
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Add support for running RadioLib on Tock.
Tock is an embedded operating system designed for running multiple
concurrent, mutually distrustful applications on Cortex-M and RISC-V
based embedded platforms (https://github.com/tock/tock).
This PR uses libtock-c (https://github.com/tock/libtock-c) to add
support to running RadioLib as a Tock userspace application.
This has been tested on the SparkFun LoRa Thing Plus - expLoRaBLE board
(https://github.com/tock/tock/tree/master/boards/apollo3/lora_things_plus)
but will work on any LoRa compatible Tock board (currently only the
expLoRaBLE board).
Signed-off-by: Alistair Francis <alistair@alistair23.me>