ADC: ADC_util Namespace Reference

ADC 8.0 Analog to Digital Conversor library for the Teensy LC microprocessor

Functions | Variables
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.
const uint8_t | resolutions_list [] = {8, 10, 12, 16}
| List of possible resolutions.
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.

Convert the conversion speed code to text

Parameters

  conv_speed | The conversion speed code

Returns
  the corresponding text

## ◆ getSamplingEnumStr()

const char* ADC_util::getSamplingEnumStr | ( | ADC_SAMPLING_SPEED | samp_speed | ) |

Convert the sampling speed code to text.

Convert the sampling speed code to text

Parameters

  samp_speed | The sampling speed code

Returns
  the corresponding text

## ◆ getStringADCError()

const char* ADC_util::getStringADCError | ( | ADC_ERROR | fail_flag | ) |

Converts the error code to text.

Converts the error code to text.

Parameters

  fail_flag | The error code

Returns
  the corresponding text

## Variable Documentation

## ◆ 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.

## ◆ 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.