Skip to content

code0100fun/rust-hackrf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust HackRF

Rust wrapper for libhackrf

Installation

Add it to your Cargo.toml:

[dependencies.hackrf]
git = "git://github.com/code0100fun/rust-hackrf"

Usage

extern crate hackrf;
use hackrf::HackRF;

HackRF::open(|mut hackrf| {

    hackrf.set_freq(900000000);
    hackrf.set_sample_rate(8000000);
    hackrf.set_baseband_filter_bandwidth(28000000);
    hackrf.set_vga_gain(20);
    hackrf.set_lna_gain(8);

    let (tx, rx) = hackrf.start();
    Thread::spawn(move || {
        loop {
            let mut bytes = rx.recv();
            // ...
        }
    });
});

About

Rust wrapper for libhackrf

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages