#include <modm/driver/adc/adc_sampler.hpp>
|  | 
| typedef uint16_t | DataType | 
|  | this type is chosen automatically, it may be uint8_t, uint16_t or uint32_t 
 | 
|  | 
template<class AdcInterrupt, uint8_t Channels, uint32_t Oversamples = 1>
class modm::AdcSampler< AdcInterrupt, Channels, Oversamples >
- Template Parameters
- 
  
    | AdcInterrupt | a class implementing the AdcInterrupt interface |  | Channels | number of ADC channels connected to sensor(s) >= 1 |  | Oversamples | # of samples to average for each channel |  
 
- Author
- Niklas Hauser 
template<class AdcInterrupt , uint8_t Channels, uint32_t Oversamples = 1> 
 
- Returns
- pointer to first element of 16bit result array 
 
 
template<class AdcInterrupt , uint8_t Channels, uint32_t Oversamples = 1> 
  
  | 
        
          | static void modm::AdcSampler< AdcInterrupt, Channels, Oversamples >::initialize | ( | const Channel * | mapping, |  
          |  |  | DataType * | data |  
          |  | ) |  |  |  | static | 
 
- Parameters
- 
  
    | mapping | array of length Channelscontaining the channel-to-data mapping |  | data | array of length Channelscontaining the results |  
 
 
 
template<class AdcInterrupt , uint8_t Channels, uint32_t Oversamples = 1> 
  
  | 
        
          | static bool modm::AdcSampler< AdcInterrupt, Channels, Oversamples >::isReadoutFinished | ( |  | ) |  |  | static | 
 
- Returns
- trueif sampling finshed,- falseif sampling is currently on-going
- Warning
- The class adds and divides the oversamples in-place, so the data is invalid while isReadoutFinished()returns false!
 
 
template<class AdcInterrupt , uint8_t Channels, uint32_t Oversamples = 1> 
  
  | 
        
          | static bool modm::AdcSampler< AdcInterrupt, Channels, Oversamples >::startReadout | ( |  | ) |  |  | static | 
 
Starts the ADC readout routine and buffers the results 
- Returns
- falsewhen a readout is in progress,- trueotherwise
 
 
The documentation for this class was generated from the following file: