Struct max116xx_10bit::Max116xx10BitEocExt [−][src]
pub struct Max116xx10BitEocExt<SPI, CS, EOC, CLOCKED> { /* fields omitted */ }
Implementations
impl<SpiE, PinE, CS, SPI, EOC, CLOCKED: Clocked> Max116xx10BitEocExt<SPI, CS, EOC, CLOCKED> where
SPI: Transfer<u8, Error = SpiE> + FullDuplex<u8, Error = SpiE>,
CS: OutputPin<Error = PinE>,
impl<SpiE, PinE, CS, SPI, EOC, CLOCKED: Clocked> Max116xx10BitEocExt<SPI, CS, EOC, CLOCKED> where
SPI: Transfer<u8, Error = SpiE> + FullDuplex<u8, Error = SpiE>,
CS: OutputPin<Error = PinE>,
Set up the ADC depending on clock and reference configuration
pub fn averaging(
&mut self,
avg_conv: AveragingConversions,
avg_res: AveragingResults
) -> Result<(), Error<SpiE, PinE>>
pub fn averaging(
&mut self,
avg_conv: AveragingConversions,
avg_res: AveragingResults
) -> Result<(), Error<SpiE, PinE>>
Set up the Averaging register. This sets the AVGON, NAVG1, NAVG0, NSCAN1 and NSCAN0 bits accordingly
impl<SpiE, PinE, SPI, CS, EOC> Max116xx10BitEocExt<SPI, CS, EOC, InternallyClockedInternallyTimedSerialInterface> where
SPI: Transfer<u8, Error = SpiE> + FullDuplex<u8, Error = SpiE>,
CS: OutputPin<Error = PinE>,
EOC: InputPin<Error = PinE>,
impl<SpiE, PinE, SPI, CS, EOC> Max116xx10BitEocExt<SPI, CS, EOC, InternallyClockedInternallyTimedSerialInterface> where
SPI: Transfer<u8, Error = SpiE> + FullDuplex<u8, Error = SpiE>,
CS: OutputPin<Error = PinE>,
EOC: InputPin<Error = PinE>,
Implementations when using the internal clock with a conversion started through the serial interface
Request a channel repeatedly, using scan mode 10. The number of scans is determined
by the averaging register NSCAN0 and NSCAN1 configuration which can be configured
with the averaging
function
pub fn request_multiple_channels_n_to_highest(
&mut self,
n: u8
) -> Result<(), Error<SpiE, PinE>>
This function is used to retrieve the results for a single byte request. The EOC pin needs to be passed explicitely here. If no request was made, AdcError::NoPendingOperation is returned. If a request was made for multipel results, AdcError::PendingOperation will be returned.
This function is used to retrieve the results for all functions requesting multiple bytes. If no request was made, AdcError::NoPendingOperation is returned. If a request was made for a single channel, AdcError::PendingOperation will be returned.