Struct Channel
pub struct Channel {
pub(crate) path: PathBuf,
}Expand description
Represents an ADC channel.
Fields§
§path: PathBufImplementations§
§impl Channel
impl Channel
pub fn new(name: ChannelName) -> Result<Self>
pub fn new(name: ChannelName) -> Result<Self>
Creates a new channel.
This function only verifies that the channel exists in the system. It doesn’t perform any other initialization.
pub fn read(&self) -> Result<VoltageResult>
pub fn read(&self) -> Result<VoltageResult>
Reads the value of the ADC channel.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnwindSafe for Channel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more