Skip to content

Commit

Permalink
make bandwidth functions public
Browse files Browse the repository at this point in the history
  • Loading branch information
bastibl committed Oct 27, 2024
1 parent 1c0e5d0 commit f635c09
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<f64, Error> {
pub fn bandwidth(&self, direction: Direction, channel: usize) -> Result<f64, Error> {
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<Range, Error> {
pub fn get_bandwidth_range(
&self,
direction: Direction,
channel: usize,
) -> Result<Range, Error> {
self.dev.get_bandwidth_range(direction, channel)
}
}

0 comments on commit f635c09

Please sign in to comment.