From 714715b4aae512d1384b7387e3d2f695ea9b348e Mon Sep 17 00:00:00 2001 From: sigil-03 Date: Sun, 10 Aug 2025 17:53:34 -0600 Subject: [PATCH] add better interface handling --- src/dac.rs | 4 ++++ src/interface.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/src/dac.rs b/src/dac.rs index f1efe6d..f3fa49f 100644 --- a/src/dac.rs +++ b/src/dac.rs @@ -131,4 +131,8 @@ impl<'a, T: DacInterface> DpcmDac<'a, T> { false } } + + pub fn disable_output(&mut self) { + self.output.disable(); + } } \ No newline at end of file diff --git a/src/interface.rs b/src/interface.rs index ea18854..8224c4d 100644 --- a/src/interface.rs +++ b/src/interface.rs @@ -1,4 +1,5 @@ pub trait DacInterface { // write the amplitude (0->100%) + fn disable(&mut self); fn write_amplitude(&mut self, amplitude: u8); } \ No newline at end of file