cc1101-embassy
An async Embassy driver for the CC1101 sub-1 GHz
RF transceiver, targeting [embedded-hal] 1.0 and [embedded-hal-async] 1.0.
Features
- Async-first design using
embedded-hal-async'sWaittrait for GDO pin interrupts - Human-readable
RadioConfigbuilder — no raw register values required - Hardware CRC, variable or fixed packet length, RSSI/LQI status appending
- Optional
defmtlogging behind thedefmtfeature flag no_std, no heap allocation, works on stable Rust
Quick start
let config = new
.frequency_hz
.baud_rate
.modulation
.tx_power;
let mut radio = new.await?;
radio.configure.await?;
// Transmit
radio.transmit.await?;
// Receive
let mut buf = ;
let packet = radio.receive.await?;
info!;
Wiring (CC1101 SPI)
| CC1101 pin | RP2040 (example) | Notes |
|---|---|---|
| VCC | 3.3 V | 1.8–3.6 V |
| GND | GND | |
| CSn | GP5 | Active low chip select (managed by SpiDevice) |
| SCLK | GP2 | SPI clock |
| MOSI (SI) | GP3 | SPI MOSI |
| MISO (SO) | GP4 | SPI MISO (also GDO1) |
| GDO0 | GP6 | Interrupt pin — packet RX/TX done |
| GDO2 | GP7 | Optional — sync word detect / RX threshold |