https://github.com/rust-iot/radio-hal
Embedded rust radio abstraction crate
https://github.com/rust-iot/radio-hal
Last synced: 2 months ago
JSON representation
Embedded rust radio abstraction crate
- Host: GitHub
- URL: https://github.com/rust-iot/radio-hal
- Owner: rust-iot
- License: mit
- Created: 2018-05-04T04:25:58.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-04-18T23:25:26.000Z (about 1 year ago)
- Last Synced: 2025-03-08T18:24:12.519Z (2 months ago)
- Language: Rust
- Homepage: https://ryan.kurte.nz/notes/2020-01-05-rust-radio
- Size: 103 KB
- Stars: 71
- Watchers: 5
- Forks: 13
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Rust IoT Radio Abstraction(s)
An [embedded-hal](https://github.com/rust-embedded/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](https://docs.rs/radio/), and then gain automatic [blocking](https://docs.rs/radio/latest/radio/blocking/index.html) helper functions. Experimental [async/await](https://docs.rs/radio/latest/radio/nonblocking/index.html) helpers are available behind the `nonblocking` feature flag, this uses [dtolnay/async-trait](https://github.com/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**
[](https://github.com/ryankurte/rust-radio)
[](https://travis-ci.com/ryankurte/rust-radio)
[](https://crates.io/crates/radio)
[](https://docs.rs/radio)[Open Issues](https://github.com/ryankurte/rust-radio/issues)
### Features:
- [ ] Generic Traits
- [x] Transmit
- [x] Receive
- [x] Set Channel
- [x] Fetch RSSI
- [x] Register Access
- [ ] Configuration (?)
- [ ] Mode Specific Traits (and definitions)
- [ ] 802.15.4
- [ ] BLE
- [ ] LoRa
- [x] Helpers
- [x] Blocking
- [x] Async### Examples
- [ryankurte/rust-radio-sx127x](https://github.com/ryankurte/rust-radio-sx127x)
- [ryankurte/rust-radio-sx128x](https://github.com/ryankurte/rust-radio-sx128x)
- [ryankurte/rust-radio-at86rf212](https://github.com/ryankurte/rust-radio-at86rf212)
- [ryankurte/rust-radio-s2lp](https://github.com/ryankurte/rust-radio-s2lp)**For similar interfaces, check out:**
- Riot-OS
- [netdev.h](https://github.com/RIOT-OS/RIOT/blob/master/drivers/include/net/netdev.h)
- [ieee802154.h](https://github.com/RIOT-OS/RIOT/blob/master/drivers/include/net/netdev/ieee802154.h)
[netdev_ieee802154.c](https://github.com/RIOT-OS/RIOT/blob/master/drivers/netdev_ieee802154/netdev_ieee802154.c)
- Contiki-OS
- [core/dev/radio.h](https://github.com/contiki-os/contiki/blob/master/core/dev/radio.h)
- Tock-PS
- [ieee802154/device.rs](https://github.com/tock/tock/blob/master/capsules/src/ieee802154/device.rs)