From f635c09c4b53cd3120eb1c516cd268e70ecfcae6 Mon Sep 17 00:00:00 2001 From: Bastian Bloessl Date: Sun, 27 Oct 2024 23:07:43 +0100 Subject: [PATCH] make bandwidth functions public --- src/device.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/device.rs b/src/device.rs index 4693ddd..6611803 100644 --- a/src/device.rs +++ b/src/device.rs @@ -1077,21 +1077,30 @@ impl< /// Get the hardware bandwidth filter, if available. /// /// Returns `Err(Error::NotSupported)` if unsupported in underlying driver. - fn bandwidth(&self, direction: Direction, channel: usize) -> Result { + pub fn bandwidth(&self, direction: Direction, channel: usize) -> Result { self.dev.bandwidth(direction, channel) } /// Set the hardware bandwidth filter, if available. /// /// Returns `Err(Error::NotSupported)` if unsupported in underlying driver. - fn set_bandwidth(&self, direction: Direction, channel: usize, bw: f64) -> Result<(), Error> { + pub fn set_bandwidth( + &self, + direction: Direction, + channel: usize, + bw: f64, + ) -> Result<(), Error> { self.dev.set_bandwidth(direction, channel, bw) } /// Get the range of possible bandwidth filter values, if available. /// /// Returns `Err(Error::NotSupported)` if unsupported in underlying driver. - fn get_bandwidth_range(&self, direction: Direction, channel: usize) -> Result { + pub fn get_bandwidth_range( + &self, + direction: Direction, + channel: usize, + ) -> Result { self.dev.get_bandwidth_range(direction, channel) } }