Skip to main content

Crate crazyradio

Crate crazyradio 

Source
Expand description

§Crazyradio driver for Rust

This crate provides a radio hardware abstraction for the Crazyradio USB dongle.

Methods map to hardware operations (channels, datarates, TX power, addresses, pipes) while USB protocol details — such as inline-mode bulk headers and settings caching — are handled transparently. Values use conventional hardware-domain units (e.g. RSSI in negative dBm). Higher-level concerns like connection management, retry policies, and device discovery belong in downstream crates such as crazyflie-link.

§Cargo features

  • shared_radio enables SharedCrazyradio object that allows to share a radio between threads
  • async enables async versions of open/serial functions, the SharedCrazyradio async API, and async sniffer mode via Crazyradio::enter_sniffer_mode_async
  • serde enables serde serialization/deserialization of the Channel struct
  • packet_capture enables functionality to capture packets by registering a callback which is called for each in/out packet

Modules§

capturepacket_capture
Wireshark packet capture support for Crazyradio

Structs§

Ack
Ack status of a sent packet
Channel
Radio channel
Crazyradio
Represents a Crazyradio
ReceivedSnifferPacketasync
A packet received in async sniffer mode, with owned payload.
SharedCrazyradioshared_radio
Multi-user threaded Crazyradio
SnifferPacket
A packet received in sniffer mode
SnifferReceiverasync
Receives sniffed packets from the radio.
SnifferSenderasync
Sends broadcast packets and queries drop count while in sniffer mode.
TestState
Firmware-applied radio TEST state.
WeakSharedCrazyradioshared_radio
A weak reference to a SharedCrazyradio

Enums§

Datarate
Radio datarate
Error
Errors returned by Crazyradio functions
InlineMode
Inline mode setting for USB protocol
NrfTxPower
nRF52840 RADIO.TXPOWER value for TEST modes.
Power
Radio power
TestMode
Radio TEST mode.