ADC: settings_defines.h File Reference

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

Classes | Namespaces | Macros | Enumerations
settings_defines.h File Reference
`#include <Arduino.h>`

Go to the source code of this file.

## Classes
struct | ADC_settings::ADC_REGS_t

## Namespaces
| ADC_settings
| Board-dependent settings.
| ADC_Error
| Handle ADC errors.

## Macros
#define | ADC_TEENSY_3_0
#define | ADC_NUM_ADCS (1)
#define | ADC_USE_DMA (1)
#define | ADC_USE_PGA (0)
#define | ADC_USE_PDB (1)
#define | ADC_USE_QUAD_TIMER (1)
#define | ADC_USE_INTERNAL_VREF (1)
#define | ADC_MAX_PIN (43)
#define | ADC_DIFF_PAIRS (2)
#define | ADC0_START (*(ADC_REGS_t *)0x4003B000)
#define | ADC1_START (*(ADC_REGS_t *)0x400BB000)
#define | ADC_MHz (1000000)
#define | ADC_MIN_FREQ (1*ADC_MHz)
#define | ADC_MAX_FREQ (18*ADC_MHz)
#define | ADC_MIN_FREQ_16BITS (2*ADC_MHz)
#define | ADC_MAX_FREQ_16BITS (12*ADC_MHz)
#define | ADC_LIB_CFG1_ADIV(n) (((n) & 0x03) << 5)
#define | ADC_LIB_CFG1_ADICLK(n) (((n) & 0x03) << 0)
#define | ADC_F_BUS F_BUS
#define | ADC_SC1A_CHANNELS (0x1F)
#define | ADC_SC1A_PIN_INVALID (0x1F)
#define | ADC_SC1A_PIN_MUX (0x80)
#define | ADC_SC1A_PIN_DIFF (0x40)
#define | ADC_SC1A_PIN_PGA (0x80)
#define | ADC_ERROR_DIFF_VALUE (-70000)
#define | ADC_ERROR_VALUE ADC_ERROR_DIFF_VALUE

## Enumerations
enum | ADC_settings::ADC_REFERENCE : uint8_t { ADC_settings::ADC_REFERENCE::REF_3V3 = static_cast<uint8_t>(ADC_REF_SOURCE::REF_DEFAULT), ADC_settings::ADC_REFERENCE::REF_1V2 = static_cast<uint8_t>(ADC_REF_SOURCE::REF_ALT), ADC_settings::ADC_REFERENCE::REF_EXT = static_cast<uint8_t>(ADC_REF_SOURCE::REF_DEFAULT), ADC_settings::ADC_REFERENCE::NONE = static_cast<uint8_t>(ADC_REF_SOURCE::REF_NONE) }
| Voltage reference for the ADC. More...
enum | ADC_settings::ADC_INTERNAL_SOURCE : uint8_t { ADC_settings::ADC_INTERNAL_SOURCE::TEMP_SENSOR = 38, ADC_settings::ADC_INTERNAL_SOURCE::VREF_OUT = 39, ADC_settings::ADC_INTERNAL_SOURCE::BANDGAP = 41, ADC_settings::ADC_INTERNAL_SOURCE::VREFH = 42, ADC_settings::ADC_INTERNAL_SOURCE::VREFL = 43 }
enum | ADC_settings::ADC_CONVERSION_SPEED : uint8_t { ADC_settings::ADC_CONVERSION_SPEED::VERY_LOW_SPEED, ADC_settings::ADC_CONVERSION_SPEED::LOW_SPEED, ADC_settings::ADC_CONVERSION_SPEED::MED_SPEED, ADC_settings::ADC_CONVERSION_SPEED::HIGH_SPEED_16BITS, ADC_settings::ADC_CONVERSION_SPEED::HIGH_SPEED, ADC_settings::ADC_CONVERSION_SPEED::VERY_HIGH_SPEED, ADC_settings::ADC_CONVERSION_SPEED::ADACK_2_4, ADC_settings::ADC_CONVERSION_SPEED::ADACK_4_0, ADC_settings::ADC_CONVERSION_SPEED::ADACK_5_2, ADC_settings::ADC_CONVERSION_SPEED::ADACK_6_2 }
enum | ADC_settings::ADC_SAMPLING_SPEED : uint8_t { ADC_settings::ADC_SAMPLING_SPEED::VERY_LOW_SPEED, ADC_settings::ADC_SAMPLING_SPEED::LOW_SPEED, ADC_settings::ADC_SAMPLING_SPEED::MED_SPEED, ADC_settings::ADC_SAMPLING_SPEED::HIGH_SPEED, ADC_settings::ADC_SAMPLING_SPEED::VERY_HIGH_SPEED }
enum | ADC_Error::ADC_ERROR : uint16_t { ADC_Error::ADC_ERROR::OTHER = 1<<0, ADC_Error::ADC_ERROR::CALIB = 1<<1, ADC_Error::ADC_ERROR::WRONG_PIN = 1<<2, ADC_Error::ADC_ERROR::ANALOG_READ = 1<<3, ADC_Error::ADC_ERROR::ANALOG_DIFF_READ = 1<<4, ADC_Error::ADC_ERROR::CONT = 1<<5, ADC_Error::ADC_ERROR::CONT_DIFF = 1<<6, ADC_Error::ADC_ERROR::COMPARISON = 1<<7, ADC_Error::ADC_ERROR::WRONG_ADC = 1<<8, ADC_Error::ADC_ERROR::SYNCH = 1<<9, ADC_Error::ADC_ERROR::CLEAR = 0 }
| ADC errors. More...

## Macro Definition Documentation

## ◆ ADC0_START

#define ADC0_START (*(ADC_REGS_t *)0x4003B000)

## ◆ ADC1_START

#define ADC1_START (*(ADC_REGS_t *)0x400BB000)

## ◆ ADC_DIFF_PAIRS

#define ADC_DIFF_PAIRS (2)

## ◆ ADC_ERROR_DIFF_VALUE

#define ADC_ERROR_DIFF_VALUE (-70000)

## ◆ ADC_ERROR_VALUE

#define ADC_ERROR_VALUE ADC_ERROR_DIFF_VALUE

## ◆ ADC_F_BUS

#define ADC_F_BUS F_BUS

## ◆ ADC_LIB_CFG1_ADICLK

#define ADC_LIB_CFG1_ADICLK | ( |  | n | ) | (((n) & 0x03) << 0)

## ◆ ADC_LIB_CFG1_ADIV

#define ADC_LIB_CFG1_ADIV | ( |  | n | ) | (((n) & 0x03) << 5)

## ◆ ADC_MAX_FREQ

#define ADC_MAX_FREQ (18*ADC_MHz)

## ◆ ADC_MAX_FREQ_16BITS

#define ADC_MAX_FREQ_16BITS (12*ADC_MHz)

## ◆ ADC_MAX_PIN

#define ADC_MAX_PIN (43)

## ◆ ADC_MHz

#define ADC_MHz (1000000)

## ◆ ADC_MIN_FREQ

#define ADC_MIN_FREQ (1*ADC_MHz)

## ◆ ADC_MIN_FREQ_16BITS

#define ADC_MIN_FREQ_16BITS (2*ADC_MHz)

## ◆ ADC_NUM_ADCS

#define ADC_NUM_ADCS (1)

## ◆ ADC_SC1A_CHANNELS

#define ADC_SC1A_CHANNELS (0x1F)

## ◆ ADC_SC1A_PIN_DIFF

#define ADC_SC1A_PIN_DIFF (0x40)

## ◆ ADC_SC1A_PIN_INVALID

#define ADC_SC1A_PIN_INVALID (0x1F)

## ◆ ADC_SC1A_PIN_MUX

#define ADC_SC1A_PIN_MUX (0x80)

## ◆ ADC_SC1A_PIN_PGA

#define ADC_SC1A_PIN_PGA (0x80)

## ◆ ADC_TEENSY_3_0

#define ADC_TEENSY_3_0

## ◆ ADC_USE_DMA

#define ADC_USE_DMA (1)

## ◆ ADC_USE_INTERNAL_VREF

#define ADC_USE_INTERNAL_VREF (1)

## ◆ ADC_USE_PDB

#define ADC_USE_PDB (1)

## ◆ ADC_USE_PGA

#define ADC_USE_PGA (0)

## ◆ ADC_USE_QUAD_TIMER

#define ADC_USE_QUAD_TIMER (1)