pub struct AdcBuffered<'a> { /* private fields */ }
Implementations§
Source§impl<'a> AdcBuffered<'a>
Creates a new instance of AdcBuffered
with the specified channel and optional configuration flags.
impl<'a> AdcBuffered<'a>
Creates a new instance of AdcBuffered
with the specified channel and optional configuration flags.
§Arguments
ch
- The ADC channel to initialize.data
- A reference to the ADC channel data.flags
- Optional configuration flags for the ADC initialization.
§Returns
A new AdcBuffered
instance ready for buffered conversion operations.
pub fn new(ch: AdcChannel, data: &'a AdcChData, flags: Option<u32>) -> Self
Sourcepub fn set_buf(&self, buffer: &mut [u16])
pub fn set_buf(&self, buffer: &mut [u16])
Sets the buffer for storing conversion results.
§Arguments
buffer
- The mutable buffer to be used for storing conversion results.
Sourcepub fn read(&self) -> Option<AdcDataType>
pub fn read(&self) -> Option<AdcDataType>
Reads a single conversion result from the ADC data buffer.
§Returns
An Option<AdcDataType>
containing the conversion result if available, or None
otherwise.
Sourcepub fn read_multiple(&self, buf: &mut [AdcDataType]) -> usize
pub fn read_multiple(&self, buf: &mut [AdcDataType]) -> usize
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for AdcBuffered<'a>
impl<'a> RefUnwindSafe for AdcBuffered<'a>
impl<'a> Send for AdcBuffered<'a>
impl<'a> Sync for AdcBuffered<'a>
impl<'a> Unpin for AdcBuffered<'a>
impl<'a> UnwindSafe for AdcBuffered<'a>
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