| Nano100BN Series BSP V3.03.002 The Board Support Package for Nano100BN Series

Macros
ADC Exported Constants
NANO100 Device Driver » ADC Driver

## Macros
#define | ADC_CH_0_MASK (1UL << 0)
#define | ADC_CH_1_MASK (1UL << 1)
#define | ADC_CH_2_MASK (1UL << 2)
#define | ADC_CH_3_MASK (1UL << 3)
#define | ADC_CH_4_MASK (1UL << 4)
#define | ADC_CH_5_MASK (1UL << 5)
#define | ADC_CH_6_MASK (1UL << 6)
#define | ADC_CH_7_MASK (1UL << 7)
#define | ADC_CH_8_MASK (1UL << 8)
#define | ADC_CH_9_MASK (1UL << 9)
#define | ADC_CH_10_MASK (1UL << 10)
#define | ADC_CH_11_MASK (1UL << 11)
#define | ADC_CH_12_MASK (1UL << 12)
#define | ADC_CH_13_MASK (1UL << 13)
#define | ADC_CH_14_MASK (1UL << 14)
#define | ADC_CH_15_MASK (1UL << 15)
#define | ADC_CH_16_MASK (1UL << 16)
#define | ADC_CH_17_MASK (1UL << 17)
#define | ADC_CHEN_Msk (0x3FFFF)
#define | ADC_PDMADATA_AD_PDMA_Msk (0xFFF)
#define | ADC_CMP_LESS_THAN (0UL)
#define | ADC_CMP_GREATER_OR_EQUAL_TO (ADC_CMPR_CMPCOND_Msk)
#define | ADC_TRIGGER_BY_EXT_PIN (0UL)
#define | ADC_LOW_LEVEL_TRIGGER (0UL << ADC_CR_TRGCOND_Pos)
#define | ADC_HIGH_LEVEL_TRIGGER (1UL << ADC_CR_TRGCOND_Pos)
#define | ADC_FALLING_EDGE_TRIGGER (2UL << ADC_CR_TRGCOND_Pos)
#define | ADC_RISING_EDGE_TRIGGER (3UL << ADC_CR_TRGCOND_Pos)
#define | ADC_ADF_INT (ADC_SR_ADF_Msk)
#define | ADC_CMP0_INT (ADC_SR_CMPF0_Msk)
#define | ADC_CMP1_INT (ADC_SR_CMPF1_Msk)
#define | ADC_INPUT_MODE_SINGLE_END (0UL << ADC_CR_DIFF_Pos)
#define | ADC_INPUT_MODE_DIFFERENTIAL (1UL << ADC_CR_DIFF_Pos)
#define | ADC_OPERATION_MODE_SINGLE (0UL << ADC_CR_ADMD_Pos)
#define | ADC_OPERATION_MODE_SINGLE_CYCLE (2UL << ADC_CR_ADMD_Pos)
#define | ADC_OPERATION_MODE_CONTINUOUS (3UL << ADC_CR_ADMD_Pos)
#define | ADC_DMODE_OUT_FORMAT_UNSIGNED (0UL << ADC_CR_DIFF_Pos)
#define | ADC_DMODE_OUT_FORMAT_2COMPLEMENT (1UL << ADC_CR_DIFF_Pos)
#define | ADC_RESSEL_6_BIT (0UL << ADC_CR_RESSEL_Pos)
#define | ADC_RESSEL_8_BIT (1UL << ADC_CR_RESSEL_Pos)
#define | ADC_RESSEL_10_BIT (2UL << ADC_CR_RESSEL_Pos)
#define | ADC_RESSEL_12_BIT (3UL << ADC_CR_RESSEL_Pos)
#define | ADC_REFSEL_POWER (0UL << ADC_CR_REFSEL_Pos)
#define | ADC_REFSEL_INT_VREF (1UL << ADC_CR_REFSEL_Pos)
#define | ADC_REFSEL_VREF (2UL << ADC_CR_REFSEL_Pos)

## Detailed Description

## Macro Definition Documentation

## ◆ ADC_ADF_INT

#define ADC_ADF_INT (ADC_SR_ADF_Msk)

ADC convert complete interrupt

Definition at line 60 of file adc.h.

## ◆ ADC_CH_0_MASK

#define ADC_CH_0_MASK (1UL << 0)

ADC channel 0 mask

Definition at line 33 of file adc.h.

## ◆ ADC_CH_10_MASK

#define ADC_CH_10_MASK (1UL << 10)

ADC channel 10 mask

Definition at line 43 of file adc.h.

## ◆ ADC_CH_11_MASK

#define ADC_CH_11_MASK (1UL << 11)

ADC channel 11 mask

Definition at line 44 of file adc.h.

## ◆ ADC_CH_12_MASK

#define ADC_CH_12_MASK (1UL << 12)

ADC channel 12 mask

Definition at line 45 of file adc.h.

## ◆ ADC_CH_13_MASK

#define ADC_CH_13_MASK (1UL << 13)

ADC channel 13 mask

Definition at line 46 of file adc.h.

## ◆ ADC_CH_14_MASK

#define ADC_CH_14_MASK (1UL << 14)

ADC channel 14 mask

Definition at line 47 of file adc.h.

## ◆ ADC_CH_15_MASK

#define ADC_CH_15_MASK (1UL << 15)

ADC channel 15 mask

Definition at line 48 of file adc.h.

## ◆ ADC_CH_16_MASK

#define ADC_CH_16_MASK (1UL << 16)

ADC channel 16 mask

Definition at line 49 of file adc.h.

## ◆ ADC_CH_17_MASK

#define ADC_CH_17_MASK (1UL << 17)

ADC channel 17 mask

Definition at line 50 of file adc.h.

## ◆ ADC_CH_1_MASK

#define ADC_CH_1_MASK (1UL << 1)

ADC channel 1 mask

Definition at line 34 of file adc.h.

## ◆ ADC_CH_2_MASK

#define ADC_CH_2_MASK (1UL << 2)

ADC channel 2 mask

Definition at line 35 of file adc.h.

## ◆ ADC_CH_3_MASK

#define ADC_CH_3_MASK (1UL << 3)

ADC channel 3 mask

Definition at line 36 of file adc.h.

## ◆ ADC_CH_4_MASK

#define ADC_CH_4_MASK (1UL << 4)

ADC channel 4 mask

Definition at line 37 of file adc.h.

## ◆ ADC_CH_5_MASK

#define ADC_CH_5_MASK (1UL << 5)

ADC channel 5 mask

Definition at line 38 of file adc.h.

## ◆ ADC_CH_6_MASK

#define ADC_CH_6_MASK (1UL << 6)

ADC channel 6 mask

Definition at line 39 of file adc.h.

## ◆ ADC_CH_7_MASK

#define ADC_CH_7_MASK (1UL << 7)

ADC channel 7 mask

Definition at line 40 of file adc.h.

## ◆ ADC_CH_8_MASK

#define ADC_CH_8_MASK (1UL << 8)

ADC channel 8 mask

Definition at line 41 of file adc.h.

## ◆ ADC_CH_9_MASK

#define ADC_CH_9_MASK (1UL << 9)

ADC channel 9 mask

Definition at line 42 of file adc.h.

## ◆ ADC_CHEN_Msk

#define ADC_CHEN_Msk (0x3FFFF)

ADC channel 0 ~ 17 mask

Definition at line 51 of file adc.h.

## ◆ ADC_CMP0_INT

#define ADC_CMP0_INT (ADC_SR_CMPF0_Msk)

ADC comparator 0 interrupt

Definition at line 61 of file adc.h.

## ◆ ADC_CMP1_INT

#define ADC_CMP1_INT (ADC_SR_CMPF1_Msk)

ADC comparator 1 interrupt

Definition at line 62 of file adc.h.

## ◆ ADC_CMP_GREATER_OR_EQUAL_TO

#define ADC_CMP_GREATER_OR_EQUAL_TO (ADC_CMPR_CMPCOND_Msk)

ADC compare condition greater or equal to

Definition at line 54 of file adc.h.

## ◆ ADC_CMP_LESS_THAN

#define ADC_CMP_LESS_THAN (0UL)

ADC compare condition less than

Definition at line 53 of file adc.h.

## ◆ ADC_DMODE_OUT_FORMAT_2COMPLEMENT

#define ADC_DMODE_OUT_FORMAT_2COMPLEMENT (1UL << ADC_CR_DIFF_Pos)

ADC differential mode output format with 2's complement

Definition at line 69 of file adc.h.

## ◆ ADC_DMODE_OUT_FORMAT_UNSIGNED

#define ADC_DMODE_OUT_FORMAT_UNSIGNED (0UL << ADC_CR_DIFF_Pos)

ADC differential mode output format with unsigned

Definition at line 68 of file adc.h.

## ◆ ADC_FALLING_EDGE_TRIGGER

#define ADC_FALLING_EDGE_TRIGGER (2UL << ADC_CR_TRGCOND_Pos)

External pin falling edge trigger ADC

Definition at line 58 of file adc.h.

## ◆ ADC_HIGH_LEVEL_TRIGGER

#define ADC_HIGH_LEVEL_TRIGGER (1UL << ADC_CR_TRGCOND_Pos)

External pin high level trigger ADC

Definition at line 57 of file adc.h.

## ◆ ADC_INPUT_MODE_DIFFERENTIAL

#define ADC_INPUT_MODE_DIFFERENTIAL (1UL << ADC_CR_DIFF_Pos)

ADC input mode set to differential

Definition at line 64 of file adc.h.

## ◆ ADC_INPUT_MODE_SINGLE_END

#define ADC_INPUT_MODE_SINGLE_END (0UL << ADC_CR_DIFF_Pos)

ADC input mode set to single end

Definition at line 63 of file adc.h.

## ◆ ADC_LOW_LEVEL_TRIGGER

#define ADC_LOW_LEVEL_TRIGGER (0UL << ADC_CR_TRGCOND_Pos)

External pin low level trigger ADC

Definition at line 56 of file adc.h.

## ◆ ADC_OPERATION_MODE_CONTINUOUS

#define ADC_OPERATION_MODE_CONTINUOUS (3UL << ADC_CR_ADMD_Pos)

ADC operation mode set to continuous scan

Definition at line 67 of file adc.h.

## ◆ ADC_OPERATION_MODE_SINGLE

#define ADC_OPERATION_MODE_SINGLE (0UL << ADC_CR_ADMD_Pos)

ADC operation mode set to single conversion

Definition at line 65 of file adc.h.

## ◆ ADC_OPERATION_MODE_SINGLE_CYCLE

#define ADC_OPERATION_MODE_SINGLE_CYCLE (2UL << ADC_CR_ADMD_Pos)

ADC operation mode set to single cycle scan

Definition at line 66 of file adc.h.

## ◆ ADC_PDMADATA_AD_PDMA_Msk

#define ADC_PDMADATA_AD_PDMA_Msk (0xFFF)

ADC PDMA current transfer data

Definition at line 52 of file adc.h.

## ◆ ADC_REFSEL_INT_VREF

#define ADC_REFSEL_INT_VREF (1UL << ADC_CR_REFSEL_Pos)

ADC reference voltage source selection set to Int_VREF

Definition at line 75 of file adc.h.

## ◆ ADC_REFSEL_POWER

#define ADC_REFSEL_POWER (0UL << ADC_CR_REFSEL_Pos)

ADC reference voltage source selection set to power

Definition at line 74 of file adc.h.

## ◆ ADC_REFSEL_VREF

#define ADC_REFSEL_VREF (2UL << ADC_CR_REFSEL_Pos)

ADC reference voltage source selection set to VREF

Definition at line 76 of file adc.h.

## ◆ ADC_RESSEL_10_BIT

#define ADC_RESSEL_10_BIT (2UL << ADC_CR_RESSEL_Pos)

ADC resolution selection set to 10 bit

Definition at line 72 of file adc.h.

## ◆ ADC_RESSEL_12_BIT

#define ADC_RESSEL_12_BIT (3UL << ADC_CR_RESSEL_Pos)

ADC resolution selection set to 12 bit

Definition at line 73 of file adc.h.

## ◆ ADC_RESSEL_6_BIT

#define ADC_RESSEL_6_BIT (0UL << ADC_CR_RESSEL_Pos)

ADC resolution selection set to 6 bit

Definition at line 70 of file adc.h.

## ◆ ADC_RESSEL_8_BIT

#define ADC_RESSEL_8_BIT (1UL << ADC_CR_RESSEL_Pos)

ADC resolution selection set to 8 bit

Definition at line 71 of file adc.h.

## ◆ ADC_RISING_EDGE_TRIGGER

#define ADC_RISING_EDGE_TRIGGER (3UL << ADC_CR_TRGCOND_Pos)

External pin rising edge trigger ADC

Definition at line 59 of file adc.h.

## ◆ ADC_TRIGGER_BY_EXT_PIN

#define ADC_TRIGGER_BY_EXT_PIN (0UL)

ADC trigger by STADC (P3.2) pin

Definition at line 55 of file adc.h.