ADC 5.0

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Macros Pages
Classes | Macros
ADC_Module.h File Reference
`#include <Arduino.h>`

Go to the source code of this file.

## Classes
class | ADC_Module
struct | ADC_Module::ADC_Config
| Store the config of the adc. More...

## Macros
#define | ADC_CFG1_ADICLK_MASK_1 (1<<1)
#define | ADC_CFG1_ADICLK_MASK_0 (1<<0)
#define | ADC_CFG1_ADIV_MASK_1 (1<<6)
#define | ADC_CFG1_ADIV_MASK_0 (1<<5)
#define | ADC_VERY_LOW_SPEED 0
#define | ADC_LOW_SPEED 1
#define | ADC_MED_SPEED 2
#define | ADC_HIGH_SPEED_16BITS 3
#define | ADC_HIGH_SPEED 4
#define | ADC_VERY_HIGH_SPEED 5
#define | ADC_ADACK_2_4 16
#define | ADC_ADACK_4_0 17
#define | ADC_ADACK_5_2 18
#define | ADC_ADACK_6_2 19
#define | ADC_SC1A_CHANNELS (0x1F)
#define | ADC_SC1A_PIN_INVALID (0x1F)
#define | ADC_MAX_PIN (44)
#define | ADC_SC1A_PIN_MUX (0x80)
#define | ADC_SC1A_PIN_DIFF (0x40)
#define | ADC_SC1A_PIN_PGA (0x80)
#define | ADC_REF_DEFAULT 0
#define | ADC_REF_ALT 1
#define | ADC_ERROR_DIFF_VALUE (-70000)
#define | ADC_ERROR_VALUE ADC_ERROR_DIFF_VALUE
#define | ADC_ERROR_ALL 0x3FF
#define | ADC_ERROR_CLEAR 0x0
#define | ADC_ERROR_OTHER (1<<0)
#define | ADC_ERROR_CALIB (1<<1)
#define | ADC_ERROR_WRONG_PIN (1<<2)
#define | ADC_ERROR_ANALOG_READ (1<<3)
#define | ADC_ERROR_COMPARISON (1<<4)
#define | ADC_ERROR_ANALOG_DIFF_READ (1<<5)
#define | ADC_ERROR_CONT (1<<6)
#define | ADC_ERROR_CONT_DIFF (1<<7)
#define | ADC_ERROR_WRONG_ADC (0<<8)
#define | ADC_ERROR_SYNCH (1<<9)
#define | ADC_TEMP_SENSOR 38
#define | ADC_VREF_OUT 39
#define | ADC_BANDGAP 41
#define | ADC_VREFH 42
#define | ADC_VREFL 43
#define | ADC_debug 0
#define | ADC_SC1A_COCO_BIT (7)
#define | ADC_SC1A_AIEN_BIT (6)
#define | ADC_SC1_DIFF_BIT (5)
#define | ADC_CFG1_ADLPC_BIT (7)
#define | ADC_CFG1_ADIV1_BIT (6)
#define | ADC_CFG1_ADIV0_BIT (5)
#define | ADC_CFG1_ADLSMP_BIT (4)
#define | ADC_CFG1_MODE1_BIT (3)
#define | ADC_CFG1_MODE0_BIT (2)
#define | ADC_CFG1_ADICLK1_BIT (1)
#define | ADC_CFG1_ADICLK0_BIT (0)
#define | ADC_CFG2_MUXSEL_BIT (4)
#define | ADC_CFG2_ADACKEN_BIT (3)
#define | ADC_CFG2_ADHSC_BIT (2)
#define | ADC_CFG2_ADLSTS1_BIT (1)
#define | ADC_CFG2_ADLSTS0_BIT (0)
#define | ADC_SC2_ADACT_BIT (7)
#define | ADC_SC2_ACFE_BIT (5)
#define | ADC_SC2_ACFGT_BIT (4)
#define | ADC_SC2_ACREN_BIT (3)
#define | ADC_SC2_DMAEN_BIT (2)
#define | ADC_SC2_REFSEL0_BIT (0)
#define | ADC_SC3_CAL_BIT (7)
#define | ADC_SC3_CALF_BIT (6)
#define | ADC_SC3_ADCO_BIT (3)
#define | ADC_SC3_AVGE_BIT (2)
#define | ADC_SC3_AVGS1_BIT (1)
#define | ADC_SC3_AVGS0_BIT (0)
#define | ADC_PGA_PGAEN_BIT (23)

## Macro Definition Documentation

#define ADC_ADACK_2_4 16

#define ADC_ADACK_4_0 17

#define ADC_ADACK_5_2 18

#define ADC_ADACK_6_2 19

#define ADC_BANDGAP 41

#define ADC_CFG1_ADICLK0_BIT (0)

#define ADC_CFG1_ADICLK1_BIT (1)

#define ADC_CFG1_ADICLK_MASK_0 (1<<0)

#define ADC_CFG1_ADICLK_MASK_1 (1<<1)

#define ADC_CFG1_ADIV0_BIT (5)

#define ADC_CFG1_ADIV1_BIT (6)

#define ADC_CFG1_ADIV_MASK_0 (1<<5)

#define ADC_CFG1_ADIV_MASK_1 (1<<6)

#define ADC_CFG1_ADLPC_BIT (7)

#define ADC_CFG1_ADLSMP_BIT (4)

#define ADC_CFG1_MODE0_BIT (2)

#define ADC_CFG1_MODE1_BIT (3)

#define ADC_CFG2_ADACKEN_BIT (3)

#define ADC_CFG2_ADHSC_BIT (2)

#define ADC_CFG2_ADLSTS0_BIT (0)

#define ADC_CFG2_ADLSTS1_BIT (1)

#define ADC_CFG2_MUXSEL_BIT (4)

#define ADC_debug 0

#define ADC_ERROR_ALL 0x3FF

#define ADC_ERROR_ANALOG_DIFF_READ (1<<5)

#define ADC_ERROR_ANALOG_READ (1<<3)

#define ADC_ERROR_CALIB (1<<1)

#define ADC_ERROR_CLEAR 0x0

#define ADC_ERROR_COMPARISON (1<<4)

#define ADC_ERROR_CONT (1<<6)

#define ADC_ERROR_CONT_DIFF (1<<7)

#define ADC_ERROR_DIFF_VALUE (-70000)

#define ADC_ERROR_OTHER (1<<0)

#define ADC_ERROR_SYNCH (1<<9)

#define ADC_ERROR_VALUE ADC_ERROR_DIFF_VALUE

#define ADC_ERROR_WRONG_ADC (0<<8)

#define ADC_ERROR_WRONG_PIN (1<<2)

#define ADC_HIGH_SPEED 4

#define ADC_HIGH_SPEED_16BITS 3

#define ADC_LOW_SPEED 1

#define ADC_MAX_PIN (44)

#define ADC_MED_SPEED 2

#define ADC_PGA_PGAEN_BIT (23)

#define ADC_REF_ALT 1

#define ADC_REF_DEFAULT 0

#define ADC_SC1_DIFF_BIT (5)

#define ADC_SC1A_AIEN_BIT (6)

#define ADC_SC1A_CHANNELS (0x1F)

#define ADC_SC1A_COCO_BIT (7)

#define ADC_SC1A_PIN_DIFF (0x40)

#define ADC_SC1A_PIN_INVALID (0x1F)

#define ADC_SC1A_PIN_MUX (0x80)

#define ADC_SC1A_PIN_PGA (0x80)

#define ADC_SC2_ACFE_BIT (5)

#define ADC_SC2_ACFGT_BIT (4)

#define ADC_SC2_ACREN_BIT (3)

#define ADC_SC2_ADACT_BIT (7)

#define ADC_SC2_DMAEN_BIT (2)

#define ADC_SC2_REFSEL0_BIT (0)

#define ADC_SC3_ADCO_BIT (3)

#define ADC_SC3_AVGE_BIT (2)

#define ADC_SC3_AVGS0_BIT (0)

#define ADC_SC3_AVGS1_BIT (1)

#define ADC_SC3_CAL_BIT (7)

#define ADC_SC3_CALF_BIT (6)

#define ADC_TEMP_SENSOR 38

#define ADC_VERY_HIGH_SPEED 5

#define ADC_VERY_LOW_SPEED 0

#define ADC_VREF_OUT 39

#define ADC_VREFH 42

#define ADC_VREFL 43