rda5807m

Crates.iorda5807m
lib.rsrda5807m
version0.1.0
sourcesrc
created_at2024-08-12 09:06:34.334844
updated_at2024-08-12 09:06:34.334844
descriptionrda5807m driver for Rust
homepagehttps://github.com/zzyandzzy/rda5807m
repositoryhttps://github.com/zzyandzzy/rda5807m
max_upload_size
id1334202
size40,740
intent (zzyandzzy)

documentation

https://docs.rs/rda5807m

README

rda5807m

rda5807m driver for Rust.

Usage

use linux_embedded_hal::I2cdev;
use rda5807m::{Address, Rda5708m};

fn main() {
    let dev = I2cdev::new("/dev/i2c-1").unwrap();
    let mut rda5807m = Rda5708m::new(dev, Address::default());
    // start
    rda5807m.start().unwrap();
    // set volume
    rda5807m.set_volume(1).unwrap();
    // get freq
    let freq = rda5807m.get_frequency().unwrap();
    // set freq
    rda5807m.set_frequency(101700).unwrap();
    // seek up
    rda5807m.seek_up(true).unwrap();
    // stop
    rda5807m.stop().unwrap();
}

Commit count: 0

cargo fmt