libhackrf 0.1.1

A modern libhackrf wrapper that supports receiving and transmitting.
Documentation
  • Coverage
  • 24.42%
    21 out of 86 items documented1 out of 28 items with examples
  • Size
  • Source code size: 16.72 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.46 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • connorslade/libhackrf-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • connorslade

libhackrf-rs

A modern libhackrf wrapper that supports receiving and transmitting.

Example

See the fm_transmit crate for a more complete example of how to use this library, it allows transmitting and receiving frequency modulated audio signals.

let hackrf = HackRf::open()?;
hackrf.set_sample_rate(2_000_000)?;
hackrf.set_freq(100_000_000)?;
hackrf.set_txvga_gain(16)?;

hackrf.start_tx(
    |_hackrf, buffer, _user| {
        for sample in buffer.iter_mut() {
            *sample = Complex::ZERO;
        }
    },
    (),
)?;

loop { thread::park() }