This is a platform agnostic Rust driver for the Si446x radio trancivers using the [embedded-hal] traits and SPI.
This driver allows you to:
- Reset, power up and identify the radio.
- Read/write properties and load WDS configurations.
- Configure GPIO and control the radio state.
Supports no_std, blocking and optional async operation.
Silicon Labs Si446x radio transceivers. Hardware validation is pending.
Wiring: CS and SDN are plain GPIO outputs, data goes over SPI.
let spi_device = ExclusiveDevice::new_no_delay(spi, cs).unwrap();
let mut radio = Si446x::new(spi_device, sdn);Sequence:
- Reset via the SDN pin:
radio.reset(&mut delay)?;- Load the profile generated in WDS (includes
POWER_UP):
radio.load_configuration(RADIO_CONFIGURATION, &mut delay)?;- Check communication with the chip:
radio.part_info(&mut delay)?;- Switch state (
Ready/Rx/Tx):
radio.change_state(State::Rx, &mut delay)?;- Fine-tune on top of the profile — properties and GPIO:
radio.set_property(0x22, 0x01, &[0x1F], &mut delay)?; // PA power
radio.gpio_pin_cfg(cfg, &mut delay)?;- Transmission:
radio.change_state(State::Tx, &mut delay)?;
// data: into the TX FIFO, or direct mode — toggling GPIO0
radio.change_state(State::Ready, &mut delay)?;- Status check:
let state = radio.request_device_state(&mut delay)?;Licensed under MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)