ADC  9.2
Analog to Digital Conversor library for the Teensy 3.1/3.2 microprocessor
ADC_util Namespace Reference

Util functions for ino sketches and tests. More...

Functions

const char * getConversionEnumStr (ADC_CONVERSION_SPEED conv_speed)
 Convert the conversion speed code to text. More...
 
const char * getSamplingEnumStr (ADC_SAMPLING_SPEED samp_speed)
 Convert the sampling speed code to text. More...
 
const char * getStringADCError (ADC_ERROR fail_flag)
 Converts the error code to text. More...
 

Variables

const uint8_t averages_list [] = {1, 4, 8, 16, 32}
 List of possible averages. More...
 
const uint8_t resolutions_list [] = {8, 10, 12, 16}
 List of possible resolutions. More...
 
const ADC_CONVERSION_SPEED conversion_speed_list []
 List of possible conversion speeds. More...
 
const ADC_SAMPLING_SPEED sampling_speed_list []
 List of possible sampling speeds. More...
 

Detailed Description

Util functions for ino sketches and tests.

Function Documentation

◆ getConversionEnumStr()

const char* ADC_util::getConversionEnumStr ( ADC_CONVERSION_SPEED  conv_speed)

Convert the conversion speed code to text.

Parameters
conv_speedThe conversion speed enum element
Returns
the corresponding text

Definition at line 53 of file ADC_util.h.

◆ getSamplingEnumStr()

const char* ADC_util::getSamplingEnumStr ( ADC_SAMPLING_SPEED  samp_speed)

Convert the sampling speed code to text.

Parameters
samp_speedThe sampling speed enum element
Returns
the corresponding text

Definition at line 97 of file ADC_util.h.

◆ getStringADCError()

const char* ADC_util::getStringADCError ( ADC_ERROR  fail_flag)

Converts the error code to text.

Parameters
fail_flagThe error code
Returns
the corresponding text

Definition at line 126 of file ADC_util.h.

Variable Documentation

◆ averages_list

const uint8_t ADC_util::averages_list[] = {1, 4, 8, 16, 32}

List of possible averages.

Definition at line 160 of file ADC_util.h.

◆ conversion_speed_list

const ADC_CONVERSION_SPEED ADC_util::conversion_speed_list[]
Initial value:
= {
ADC_CONVERSION_SPEED::VERY_LOW_SPEED,
ADC_CONVERSION_SPEED::LOW_SPEED,
ADC_CONVERSION_SPEED::MED_SPEED,
ADC_CONVERSION_SPEED::HIGH_SPEED,
ADC_CONVERSION_SPEED::HIGH_SPEED_16BITS,
ADC_CONVERSION_SPEED::VERY_HIGH_SPEED,
ADC_CONVERSION_SPEED::ADACK_2_4,
ADC_CONVERSION_SPEED::ADACK_4_0,
ADC_CONVERSION_SPEED::ADACK_5_2,
ADC_CONVERSION_SPEED::ADACK_6_2}

List of possible conversion speeds.

Definition at line 182 of file ADC_util.h.

◆ resolutions_list

const uint8_t ADC_util::resolutions_list[] = {8, 10, 12, 16}

List of possible resolutions.

Definition at line 169 of file ADC_util.h.

◆ sampling_speed_list

const ADC_SAMPLING_SPEED ADC_util::sampling_speed_list[]
Initial value:
= {
ADC_SAMPLING_SPEED::VERY_LOW_SPEED, ADC_SAMPLING_SPEED::LOW_SPEED,
ADC_SAMPLING_SPEED::MED_SPEED, ADC_SAMPLING_SPEED::HIGH_SPEED,
ADC_SAMPLING_SPEED::VERY_HIGH_SPEED}

List of possible sampling speeds.

Definition at line 210 of file ADC_util.h.