#iot #abstraction #packet #mocking #embedded-devices #driver #flags

no-std radio

Generic traits for embedded packet radio devices

22 releases (11 breaking)

new 0.12.1 Apr 18, 2024
0.11.1 May 6, 2022
0.11.0 Feb 14, 2022
0.10.1 Dec 21, 2021
0.1.0 Dec 25, 2018

#103 in Hardware support

Download history 27/week @ 2024-02-26 3/week @ 2024-03-04 6/week @ 2024-03-11 5/week @ 2024-03-25 74/week @ 2024-04-01 1/week @ 2024-04-08 276/week @ 2024-04-15

356 downloads per month
Used in 6 crates

MIT license

67KB
1.5K SLoC

Rust IoT Radio Abstraction(s)

An embedded-hal like abstraction for digital radio devices, this is intended to provide a common basis for implementing packet radio drivers, and for extension to support 802.15.4 / BLE etc. in the hope that we can construct embedded network stacks using this common abstraction.

Radio devices should implement the core traits, and then gain automatic blocking helper functions. Experimental async/await helpers are available behind the nonblocking feature flag, this uses dtolnay/async-trait, imports std and async-std, and requires a nightly compiler, and a MockRadio implementation for testing is available behind the mock feature flag (also requiring nightly).

Status

Work In Progress, expect major API changes

GitHub tag Build Status Crates.io Docs.rs

Open Issues

Features:

  • Generic Traits
    • Transmit
    • Receive
    • Set Channel
    • Fetch RSSI
    • Register Access
    • Configuration (?)
  • Mode Specific Traits (and definitions)
    • 802.15.4
    • BLE
    • LoRa
  • Helpers
    • Blocking
    • Async

Examples

For similar interfaces, check out:

Dependencies

~1–14MB
~139K SLoC