Commit graph

43 commits

Author SHA1 Message Date
jgromes
a692b72347 Move ESP-IDF HAL back to examples (#1322) 2024-11-30 21:53:48 +01:00
Alistair Francis
9d9d480a48
hal: Tock: Namespace HAL, update timer implementation and update libtock-c (#1313)
* tock: use native time getter, remove globals

Tock has direct support for querying time. The prior `millis()`
method here replicated the same functionality, but missed some
corner case concerns around overflow/wrapping. Instead, just use
the native Tock time getter method. This also removes unneeded
global variables and methods.

* NonArduino/Tock: Update to latest libtock-c

Update to the latest libtock-c commit. libtock-c now includes a
libtockHal.h, so we can use that instead of the version here.

Signed-off-by: Alistair Francis <alistair@alistair23.me>

---------

Signed-off-by: Alistair Francis <alistair@alistair23.me>
Co-authored-by: Pat Pannuto <pat.pannuto@gmail.com>
2024-11-14 18:51:00 +01:00
Jan Gromeš
9e7c0129e6
[HAL] HALs in src (#1281)
* [HAL] Move HALs to src

* [CI] Temporarily drop unofficial STM32 (package down)

* [LR11x0] Fix ambiguous call

* [CI] Return Maple mini back to build matrix
2024-10-20 19:14:33 +02:00
Ali Mosallaei
83e05701fe
[HAL] Add tones support for the RPi Pico (#1239)
* Add tones support for RPi Pico

* Add dependencies to CMakeLists

* Address review
2024-09-27 20:26:13 +02:00
jgromes
260534741d Added readme to ESP-IDF example 2024-08-17 21:19:14 +02:00
StevenCellist
6fdaef0953 Revert libtock being included 2024-07-22 21:29:54 +02:00
StevenCellist
a6c9d0037a [LoRaWAN] Collection of fixes
- Fix v1.0.4 MAC-in-payload decryption
- Don't process 0MHz frequencies from CFList
- Fix downlink-event datarate not showing correctly after ADR request
- Convert getDevAddr to uint32_t
- Backend: improve MAC Queue<>Buffer processing
2024-07-21 21:37:01 +02:00
Alistair Francis
ace0997359
NonArduino: Tock: A collection of fixes for LoRaWAN support (#1145) 2024-07-03 18:23:00 +02:00
jgromes
bc36c1e98a Use lgpio as the RPi HAL 2024-06-14 19:49:19 +01:00
Alistair Francis
f12875fac5 examples/NonArduino/Tock: Update to the latest libtock-c API
Update to use the latest libtock-c functions.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
2024-05-15 19:52:18 +10:00
Alistair Francis
58c8d2d1f4 examples/NonArduino/Tock: Remove libtock-c submodule
Remove the libtock-c submodule to fix https://github.com/jgromes/RadioLib/issues/1091

Signed-off-by: Alistair Francis <alistair@alistair23.me>
2024-05-13 19:45:13 +10:00
jgromes
b675e0c034 Fix RPi example flags 2024-05-03 21:05:44 +01:00
Alistair Francis
2f85326fec
examples/NonArduino/Tock: Support RISC-V and bump libtock-c (#1082)
* examples/NonArduino/Tock: Support building for RISC-V

Signed-off-by: Alistair Francis <alistair@alistair23.me>

* examples/NonArduino/Tock: Update to newer libtock-c

Signed-off-by: Alistair Francis <alistair@alistair23.me>

---------

Signed-off-by: Alistair Francis <alistair@alistair23.me>
2024-05-01 15:12:05 +02:00
Elizabeth Myers
205031550b
Use RadioLibTime_t (aka unsigned long) when dealing with millis() and micros() (#1075)
* Use unsigned long when dealing with millis() and micros().

Although sizeof(uint32_t) == sizeof(unsigned long) on Arduino, this is
not the case on 64-bit Linux, where sizeof(unsigned long) ==
sizeof(uint64_t).

Most timestamp arithmetic and comparisons have been left alone, to
reduce code churn. This is fine, as uint32_t is perfectly wide to store
most timestamp deltas this library will deal with, and C will promote
the integer rather than do a narrowing conversion. The real problem
arises with narrowing conversions being done by assuming timestamps are
32-bit.

No functional changes intended for platforms where sizeof(uint32_t) ==
sizeof(unsigned long) (so most 8/16/32-bit platforms).

Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>

* Change most timestamps to use RadioLibTime_t.

This makes it obvious what is and isn't a timestamp.

Not everything has been converted; anything dealing with protocol and
chip-level timestamps has been left alone on purpose, to make it clear
that these functions do require 32-bit timestamps.

No functional changes intended on platforms where sizeof(uint32_t) ==
sizeof(unsigned long).

Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>

* Use uint32_t internally in getTimeOnAir.

We need to not overflow the integers with the shifts and
multiplications, so this is correct behaviour.

Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>

---------

Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>
2024-04-25 21:50:58 +02:00
jgromes
46ef20ebe9 Fix interrupt emulation in Raspberry Pi example 2024-04-14 14:37:55 +01:00
jgromes
eaa42b0d6b Update RPi Pico SDK example 2024-01-27 14:03:40 +01:00
Cameron Goddard
e558f541e1 add Pico HAL 2024-01-21 15:39:28 -05:00
Alistair Francis
ffbcbdfc84 Tock: toolchain: Try to be smarter about finding toolchains
Instead of hard coding paths, let's instead try to find the toolchain
from the users PATH.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-09-08 19:29:49 +10:00
Alistair Francis
7e9e7ba7be Tock: Fixup build failure
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-08-29 21:00:47 +10:00
Alistair Francis
87200bd312 Tock: Use the default radio begin()
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-07-24 21:10:23 +10:00
Alistair Francis
fe892ecd31 Tock: Fixup the radio setup
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-07-21 22:03:45 +10:00
Alistair Francis
6234a84ac9 Tock: Build libtock-c lib with the build script
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-07-21 22:01:56 +10:00
Alistair Francis
377385fb13 Tock: Don't call blocking yield
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-07-20 21:42:51 +10:00
Alistair Francis
2edbe9cd57 Tock: Fixup time calculation
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-07-20 21:42:51 +10:00
Alistair Francis
bb61063810 Tock: Expand the .gitignore
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-07-13 22:43:22 +10:00
Alistair Francis
3c7dc7acba Tock: README: Initial commit
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-07-13 22:43:22 +10:00
Alistair Francis
5750d88797 Tock: Use \r\n for all new lines
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-07-11 13:27:04 +10:00
Alistair Francis
6a6bb8526b Tock: Update Radio config for SparkFun LoRa Thing Plus - expLoRaBLE
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-07-11 13:24:19 +10:00
Alistair Francis
a72b549450 Tock: Implement yield()
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-07-11 13:23:48 +10:00
Alistair Francis
ae05a4283e Tock: Use Tock's libgcc
The Tock specific version of libgcc is built to be position independent,
so use that instead of the one supplied by the compiler. This fixes a
few odd corner cases when using printf().

Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-07-11 13:23:34 +10:00
Alistair Francis
a8172308fe examples: NonArduino: Tock: Initial commit
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>
2023-06-29 09:54:30 +10:00
jgromes
a4dbae03a3 [MOD] Fixed missing cast (#776) 2023-06-26 19:41:12 +02:00
jgromes
f4f11a35d3 [Mod] Updated examples to use buffered SPI (#776) 2023-06-26 19:39:10 +02:00
jgromes
cb7b282c9b Updae ESP-IFD example (#748) 2023-06-04 13:25:08 +02:00
jgromes
4e2ff97afc Added ESP-IDF example (#748) 2023-05-21 18:24:18 +02:00
jgromes
b02a5c1867 Updated raspberry example 2023-05-18 20:52:28 +01:00
jgromes
1a55220020 Updated non-Arduino example 2023-05-16 17:12:45 +01:00
jgromes
a797bef0d2 Fixed term order for RPi example 2023-05-07 07:17:47 +01:00
jgromes
32cef2699d Update Raspberry example 2023-05-06 18:34:41 +01:00
jgromes
a21cabf3e3 Make build scripts executable 2023-05-06 18:02:12 +01:00
jgromes
e1853ddf04 Added CMake for NonArduino example 2023-04-30 22:10:48 +02:00
jgromes
d5fe5e3e2d [HAL] Cleaned up example and added comments 2023-04-22 18:07:47 +02:00
Mestery
94050efb1b add example 2023-04-18 19:21:01 +02:00