13 lines
351 B
Rust
13 lines
351 B
Rust
use crate::CodecPins;
|
|
pub trait Dac<T> {
|
|
fn new(i2c: T, pins: CodecPins) -> Self;
|
|
/// The DAC should start muted
|
|
fn init(&mut self);
|
|
fn change_rate(&mut self, new_rate: u32);
|
|
#[allow(unused_variables)]
|
|
#[allow(dead_code)]
|
|
fn set_volume(&mut self, left: u8, right: u8) {}
|
|
fn mute(&mut self);
|
|
fn unmute(&mut self);
|
|
}
|