All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
ADC: 12-bit SAR Analog-to-Digital Converter Driver

## Overview

The MCUXpresso SDK provides a peripheral driver for the 12-bit Successive Approximation (SAR) Analog-to-Digital Converter (ADC) module of MCUXpresso SDK devices.

# Typical use case

## Polling Configuration

Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/fsl_adc

## Interrupt Configuration

Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/fsl_adc

## Files

file | fsl_adc.h

## Data Structures

struct | adc_config_t
| Define structure for configuring the block. More...
struct | adc_conv_seq_config_t
| Define structure for configuring conversion sequence. More...
struct | adc_result_info_t
| Define structure of keeping conversion result information. More...

## Enumerations

enum

_adc_status_flags {
kADC_ThresholdCompareFlagOnChn0 = 1U << 0U,
kADC_ThresholdCompareFlagOnChn1 = 1U << 1U,
kADC_ThresholdCompareFlagOnChn2 = 1U << 2U,
kADC_ThresholdCompareFlagOnChn3 = 1U << 3U,
kADC_ThresholdCompareFlagOnChn4 = 1U << 4U,
kADC_ThresholdCompareFlagOnChn5 = 1U << 5U,
kADC_ThresholdCompareFlagOnChn6 = 1U << 6U,
kADC_ThresholdCompareFlagOnChn7 = 1U << 7U,
kADC_ThresholdCompareFlagOnChn8 = 1U << 8U,
kADC_ThresholdCompareFlagOnChn9 = 1U << 9U,
kADC_ThresholdCompareFlagOnChn10 = 1U << 10U,
kADC_ThresholdCompareFlagOnChn11 = 1U << 11U,
kADC_OverrunFlagForChn0,
kADC_OverrunFlagForChn1,
kADC_OverrunFlagForChn2,
kADC_OverrunFlagForChn3,
kADC_OverrunFlagForChn4,
kADC_OverrunFlagForChn5,
kADC_OverrunFlagForChn6,
kADC_OverrunFlagForChn7,
kADC_OverrunFlagForChn8,
kADC_OverrunFlagForChn9,
kADC_OverrunFlagForChn10,
kADC_OverrunFlagForChn11,
kADC_GlobalOverrunFlagForSeqA = 1U << 24U,
kADC_GlobalOverrunFlagForSeqB = 1U << 25U,
kADC_ConvSeqAInterruptFlag = 1U << 28U,
kADC_ConvSeqBInterruptFlag = 1U << 29U,
kADC_ThresholdCompareInterruptFlag = 1U << 30U,
kADC_OverrunInterruptFlag = (int)(1U << 31U)
}

| Flags. More...
enum | _adc_interrupt_enable { kADC_ConvSeqAInterruptEnable = ADC_INTEN_SEQA_INTEN_MASK, kADC_ConvSeqBInterruptEnable = ADC_INTEN_SEQB_INTEN_MASK, kADC_OverrunInterruptEnable = ADC_INTEN_OVR_INTEN_MASK }
| Interrupts. More...
enum | adc_trigger_polarity_t { kADC_TriggerPolarityNegativeEdge = 0U, kADC_TriggerPolarityPositiveEdge = 1U }
| Define selection of polarity of selected input trigger for conversion sequence. More...
enum | adc_priority_t { kADC_PriorityLow = 0U, kADC_PriorityHigh = 1U }
| Define selection of conversion sequence's priority. More...
enum | adc_seq_interrupt_mode_t { kADC_InterruptForEachConversion = 0U, kADC_InterruptForEachSequence = 1U }
| Define selection of conversion sequence's interrupt. More...
enum | adc_threshold_compare_status_t { kADC_ThresholdCompareInRange = 0U, kADC_ThresholdCompareBelowRange = 1U, kADC_ThresholdCompareAboveRange = 2U }
| Define status of threshold compare result. More...
enum | adc_threshold_crossing_status_t { kADC_ThresholdCrossingNoDetected = 0U, kADC_ThresholdCrossingDownward = 2U, kADC_ThresholdCrossingUpward = 3U }
| Define status of threshold crossing detection result. More...
enum | adc_threshold_interrupt_mode_t { kADC_ThresholdInterruptDisabled = 0U, kADC_ThresholdInterruptOnOutside = 1U, kADC_ThresholdInterruptOnCrossing = 2U }
| Define interrupt mode for threshold compare event. More...
enum | adc_inforesult_t { kADC_Resolution12bitInfoResultShift = 0U, kADC_Resolution10bitInfoResultShift = 2U, kADC_Resolution8bitInfoResultShift = 4U, kADC_Resolution6bitInfoResultShift = 6U }
| Define the info result mode of different resolution. More...
enum | adc_tempsensor_common_mode_t { kADC_HighNegativeOffsetAdded = 0x0U, kADC_IntermediateNegativeOffsetAdded, kADC_NoOffsetAdded = 0x8U, kADC_LowPositiveOffsetAdded = 0xcU }
| Define common modes for Temerature sensor. More...
enum | adc_second_control_t { kADC_Impedance621Ohm = 0x1U << 9U, kADC_Impedance55kOhm, kADC_Impedance87kOhm = 0x1fU << 9U, kADC_NormalFunctionalMode = 0x0U << 14U, kADC_MultiplexeTestMode = 0x1U << 14U, kADC_ADCInUnityGainMode = 0x2U << 14U }
| Define source impedance modes for GPADC control. More...

## Driver version

#define | FSL_ADC_DRIVER_VERSION (MAKE_VERSION(2, 5, 0))
| ADC driver version 2.5.0. More...

## Initialization and Deinitialization

void | ADC_Init (ADC_Type *base, const adc_config_t *config)
| Initialize the ADC module. More...
void | ADC_Deinit (ADC_Type *base)
| Deinitialize the ADC module. More...
void | ADC_GetDefaultConfig (adc_config_t *config)
| Gets an available pre-defined settings for initial configuration. More...

## Control conversion sequence A.

static void | ADC_EnableConvSeqA (ADC_Type *base, bool enable)
| Enable the conversion sequence A. More...
void | ADC_SetConvSeqAConfig (ADC_Type *base, const adc_conv_seq_config_t *config)
| Configure the conversion sequence A. More...
static void | ADC_DoSoftwareTriggerConvSeqA (ADC_Type *base)
| Do trigger the sequence's conversion by software. More...
static void | ADC_EnableConvSeqABurstMode (ADC_Type *base, bool enable)
| Enable the burst conversion of sequence A. More...
static void | ADC_SetConvSeqAHighPriority (ADC_Type *base)
| Set the high priority for conversion sequence A. More...

## Control conversion sequence B.

static void | ADC_EnableConvSeqB (ADC_Type *base, bool enable)
| Enable the conversion sequence B. More...
void | ADC_SetConvSeqBConfig (ADC_Type *base, const adc_conv_seq_config_t *config)
| Configure the conversion sequence B. More...
static void | ADC_DoSoftwareTriggerConvSeqB (ADC_Type *base)
| Do trigger the sequence's conversion by software. More...
static void | ADC_EnableConvSeqBBurstMode (ADC_Type *base, bool enable)
| Enable the burst conversion of sequence B. More...
static void | ADC_SetConvSeqBHighPriority (ADC_Type *base)
| Set the high priority for conversion sequence B. More...

## Data result.

bool | ADC_GetConvSeqAGlobalConversionResult (ADC_Type *base, adc_result_info_t *info)
| Get the global ADC conversion infomation of sequence A. More...
bool | ADC_GetConvSeqBGlobalConversionResult (ADC_Type *base, adc_result_info_t *info)
| Get the global ADC conversion infomation of sequence B. More...
bool | ADC_GetChannelConversionResult (ADC_Type *base, uint32_t channel, adc_result_info_t *info)
| Get the channel's ADC conversion completed under each conversion sequence. More...

## Threshold function.

static void | ADC_SetThresholdPair0 (ADC_Type *base, uint32_t lowValue, uint32_t highValue)
| Set the threshhold pair 0 with low and high value. More...
static void | ADC_SetThresholdPair1 (ADC_Type *base, uint32_t lowValue, uint32_t highValue)
| Set the threshhold pair 1 with low and high value. More...
static void | ADC_SetChannelWithThresholdPair0 (ADC_Type *base, uint32_t channelMask)
| Set given channels to apply the threshold pare 0. More...
static void | ADC_SetChannelWithThresholdPair1 (ADC_Type *base, uint32_t channelMask)
| Set given channels to apply the threshold pare 1. More...

## Interrupts.

static void | ADC_EnableInterrupts (ADC_Type *base, uint32_t mask)
| Enable interrupts for conversion sequences. More...
static void | ADC_DisableInterrupts (ADC_Type *base, uint32_t mask)
| Disable interrupts for conversion sequence. More...
static void | ADC_EnableThresholdCompareInterrupt (ADC_Type *base, uint32_t channel, adc_threshold_interrupt_mode_t mode)
| Enable the interrupt of threshold compare event for each channel. More...

## Status.

static uint32_t | ADC_GetStatusFlags (ADC_Type *base)
| Get status flags of ADC module. More...
static void | ADC_ClearStatusFlags (ADC_Type *base, uint32_t mask)
| Clear status flags of ADC module. More...

## Data Structure Documentation

struct adc_config_t

### Data Fields

uint32_t | clockDividerNumber
| This field is only available when using kADC_ClockSynchronousMode for "clockMode" field. More...
bool | enableLowPowerMode

    If disable low-power mode, ADC remains activated even when no conversions are

requested. More...

#### Field Documentation

uint32_t adc_config_t::clockDividerNumber

The divider would be plused by 1 based on the value in this field. The available range is in 8 bits.

bool adc_config_t::enableLowPowerMode

If enable low-power mode, The ADC is automatically powered-down when no conversions are taking place.

struct adc_conv_seq_config_t

### Data Fields

uint32_t | channelMask

                  Selects which one or more of the ADC channels will be sampled and converted when this

sequence is launched. More...

uint32_t | triggerMask

                  Selects which one or more of the available hardware trigger sources will cause this

conversion sequence to be initiated. More...

adc_trigger_polarity_t | triggerPolarity
| Select the trigger to launch conversion sequence. More...
bool | enableSyncBypass

                 To enable this feature allows the hardware trigger input to bypass synchronization

flip-flop stages and therefore shorten the time between the trigger input signal and the start of a conversion. More...

bool | enableSingleStep

                 When enabling this feature, a trigger will launch a single conversion on the next

channel in the sequence instead of the default response of launching an entire sequence of conversions. More...

adc_seq_interrupt_mode_t | interruptMode
| Select the interrpt/DMA trigger mode. More...

#### Field Documentation

uint32_t adc_conv_seq_config_t::channelMask

The masked channels would be involved in current conversion sequence, beginning with the lowest-order. The available range is in 12-bit.

uint32_t adc_conv_seq_config_t::triggerMask

The available range is 6-bit.

adc_trigger_polarity_t adc_conv_seq_config_t::triggerPolarity

bool adc_conv_seq_config_t::enableSyncBypass

bool adc_conv_seq_config_t::enableSingleStep

adc_seq_interrupt_mode_t adc_conv_seq_config_t::interruptMode

struct adc_result_info_t

### Data Fields

uint32_t | result
| Keep the conversion data value. More...
adc_threshold_compare_status_t | thresholdCompareStatus
| Keep the threshold compare status. More...
adc_threshold_crossing_status_t | thresholdCorssingStatus
| Keep the threshold crossing status. More...
uint32_t | channelNumber
| Keep the channel number for this conversion. More...
bool | overrunFlag
| Keep the status whether the conversion is overrun or not. More...

#### Field Documentation

uint32_t adc_result_info_t::result

adc_threshold_compare_status_t adc_result_info_t::thresholdCompareStatus

adc_threshold_crossing_status_t adc_result_info_t::thresholdCorssingStatus

uint32_t adc_result_info_t::channelNumber

bool adc_result_info_t::overrunFlag

## Macro Definition Documentation

#define FSL_ADC_DRIVER_VERSION (MAKE_VERSION(2, 5, 0))

## Enumeration Type Documentation

enum _adc_status_flags

Enumerator
kADC_ThresholdCompareFlagOnChn0 | Threshold comparison event on Channel 0.
kADC_ThresholdCompareFlagOnChn1 | Threshold comparison event on Channel 1.
kADC_ThresholdCompareFlagOnChn2 | Threshold comparison event on Channel 2.
kADC_ThresholdCompareFlagOnChn3 | Threshold comparison event on Channel 3.
kADC_ThresholdCompareFlagOnChn4 | Threshold comparison event on Channel 4.
kADC_ThresholdCompareFlagOnChn5 | Threshold comparison event on Channel 5.
kADC_ThresholdCompareFlagOnChn6 | Threshold comparison event on Channel 6.
kADC_ThresholdCompareFlagOnChn7 | Threshold comparison event on Channel 7.
kADC_ThresholdCompareFlagOnChn8 | Threshold comparison event on Channel 8.
kADC_ThresholdCompareFlagOnChn9 | Threshold comparison event on Channel 9.
kADC_ThresholdCompareFlagOnChn10 | Threshold comparison event on Channel 10.
kADC_ThresholdCompareFlagOnChn11 | Threshold comparison event on Channel 11.
kADC_OverrunFlagForChn0 | Mirror the OVERRUN status flag from the result register for ADC channel 0.
kADC_OverrunFlagForChn1 | Mirror the OVERRUN status flag from the result register for ADC channel 1.
kADC_OverrunFlagForChn2 | Mirror the OVERRUN status flag from the result register for ADC channel 2.
kADC_OverrunFlagForChn3 | Mirror the OVERRUN status flag from the result register for ADC channel 3.
kADC_OverrunFlagForChn4 | Mirror the OVERRUN status flag from the result register for ADC channel 4.
kADC_OverrunFlagForChn5 | Mirror the OVERRUN status flag from the result register for ADC channel 5.
kADC_OverrunFlagForChn6 | Mirror the OVERRUN status flag from the result register for ADC channel 6.
kADC_OverrunFlagForChn7 | Mirror the OVERRUN status flag from the result register for ADC channel 7.
kADC_OverrunFlagForChn8 | Mirror the OVERRUN status flag from the result register for ADC channel 8.
kADC_OverrunFlagForChn9 | Mirror the OVERRUN status flag from the result register for ADC channel 9.
kADC_OverrunFlagForChn10 | Mirror the OVERRUN status flag from the result register for ADC channel 10.
kADC_OverrunFlagForChn11 | Mirror the OVERRUN status flag from the result register for ADC channel 11.
kADC_GlobalOverrunFlagForSeqA | Mirror the glabal OVERRUN status flag for conversion sequence A.
kADC_GlobalOverrunFlagForSeqB | Mirror the global OVERRUN status flag for conversion sequence B.
kADC_ConvSeqAInterruptFlag | Sequence A interrupt/DMA trigger.
kADC_ConvSeqBInterruptFlag | Sequence B interrupt/DMA trigger.
kADC_ThresholdCompareInterruptFlag | Threshold comparision interrupt flag.
kADC_OverrunInterruptFlag | Overrun interrupt flag.

enum _adc_interrupt_enable

Note
  Not all the interrupt options are listed here

Enumerator
kADC_ConvSeqAInterruptEnable | Enable interrupt upon completion of each individual conversion in sequence A, or entire sequence.
kADC_ConvSeqBInterruptEnable | Enable interrupt upon completion of each individual conversion in sequence B, or entire sequence.
kADC_OverrunInterruptEnable | Enable the detection of an overrun condition on any of the channel data registers will cause an overrun interrupt/DMA trigger.

enum adc_trigger_polarity_t

Enumerator
kADC_TriggerPolarityNegativeEdge | A negative edge launches the conversion sequence on the trigger(s).
kADC_TriggerPolarityPositiveEdge | A positive edge launches the conversion sequence on the trigger(s).

enum adc_priority_t

Enumerator
kADC_PriorityLow | This sequence would be preempted when another sequence is started.
kADC_PriorityHigh | This sequence would preempt other sequence even when it is started.

enum adc_seq_interrupt_mode_t

Enumerator
kADC_InterruptForEachConversion | The sequence interrupt/DMA trigger will be set at the end of each individual ADC conversion inside this conversion sequence.
kADC_InterruptForEachSequence | The sequence interrupt/DMA trigger will be set when the entire set of this sequence conversions completes.

enum adc_threshold_compare_status_t

Enumerator
kADC_ThresholdCompareInRange | LOW threshold <= conversion value <= HIGH threshold.
kADC_ThresholdCompareBelowRange | conversion value < LOW threshold.
kADC_ThresholdCompareAboveRange | conversion value > HIGH threshold.

enum adc_threshold_crossing_status_t

Enumerator
kADC_ThresholdCrossingNoDetected | No threshold Crossing detected.
kADC_ThresholdCrossingDownward | Downward Threshold Crossing detected.
kADC_ThresholdCrossingUpward | Upward Threshold Crossing Detected.

enum adc_threshold_interrupt_mode_t

Enumerator
kADC_ThresholdInterruptDisabled | Threshold comparison interrupt is disabled.
kADC_ThresholdInterruptOnOutside | Threshold comparison interrupt is enabled on outside threshold.
kADC_ThresholdInterruptOnCrossing | Threshold comparison interrupt is enabled on crossing threshold.

enum adc_inforesult_t

Enumerator
kADC_Resolution12bitInfoResultShift | Info result shift of Resolution12bit.
kADC_Resolution10bitInfoResultShift | Info result shift of Resolution10bit.
kADC_Resolution8bitInfoResultShift | Info result shift of Resolution8bit.
kADC_Resolution6bitInfoResultShift | Info result shift of Resolution6bit.

enum adc_tempsensor_common_mode_t

Enumerator
kADC_HighNegativeOffsetAdded | Temperature sensor common mode: high negative offset added.
kADC_IntermediateNegativeOffsetAdded | Temperature sensor common mode: intermediate negative offset added.
kADC_NoOffsetAdded | Temperature sensor common mode: no offset added.
kADC_LowPositiveOffsetAdded | Temperature sensor common mode: low positive offset added.

enum adc_second_control_t

Enumerator
kADC_Impedance621Ohm | Extand ADC sampling time according to source impedance 1: 0.621 kOhm.
kADC_Impedance55kOhm | Extand ADC sampling time according to source impedance 20 (default): 55 kOhm.
kADC_Impedance87kOhm | Extand ADC sampling time according to source impedance 31: 87 kOhm.
kADC_NormalFunctionalMode | TEST mode: Normal functional mode.
kADC_MultiplexeTestMode | TEST mode: Multiplexer test mode.
kADC_ADCInUnityGainMode | TEST mode: ADC in unity gain mode.

## Function Documentation

void ADC_Init | ( | ADC_Type * | base,
|  | const adc_config_t * | config
| ) |  |

Parameters

  base | ADC peripheral base address.
  config | Pointer to configuration structure, see to adc_config_t.

void ADC_Deinit | ( | ADC_Type * | base | ) |

Parameters

  base | ADC peripheral base address.

void ADC_GetDefaultConfig | ( | adc_config_t * | config | ) |

This function initializes the initial configuration structure with an available settings. The default values are:

* config->clockMode = kADC_ClockSynchronousMode;
* config->clockDividerNumber = 0U;
* config->resolution = kADC_Resolution12bit;
* config->enableBypassCalibration = false;
* config->sampleTimeNumber = 0U;
*

Parameters

  config | Pointer to configuration structure.

static void ADC_EnableConvSeqA | ( | ADC_Type * | base,
|  | bool | enable
| ) |  |

inlinestatic

In order to avoid spuriously triggering the sequence, the trigger to conversion sequence should be ready before the sequence is ready. when the sequence is disabled, the trigger would be ignored. Also, it is suggested to disable the sequence during changing the sequence's setting.

Parameters

  base | ADC peripheral base address.
  enable | Switcher to enable the feature or not.

void ADC_SetConvSeqAConfig | ( | ADC_Type * | base,
|  | const adc_conv_seq_config_t * | config
| ) |  |

Parameters

  base | ADC peripheral base address.
  config | Pointer to configuration structure, see to adc_conv_seq_config_t.

static void ADC_DoSoftwareTriggerConvSeqA | ( | ADC_Type * | base | ) |

inlinestatic

Parameters

  base | ADC peripheral base address.

static void ADC_EnableConvSeqABurstMode | ( | ADC_Type * | base,
|  | bool | enable
| ) |  |

inlinestatic

Enable the burst mode would cause the conversion sequence to be cntinuously cycled through. Other triggers would be ignored while this mode is enabled. Repeated conversions could be halted by disabling this mode. And the sequence currently in process will be completed before cnversions are terminated. Note that a new sequence could begin just before the burst mode is disabled.

Parameters

  base | ADC peripheral base address.
  enable | Switcher to enable this feature.

static void ADC_SetConvSeqAHighPriority | ( | ADC_Type * | base | ) |

inlinestatic

Parameters

  base | ADC peripheral bass address.

static void ADC_EnableConvSeqB | ( | ADC_Type * | base,
|  | bool | enable
| ) |  |

inlinestatic

In order to avoid spuriously triggering the sequence, the trigger to conversion sequence should be ready before the sequence is ready. when the sequence is disabled, the trigger would be ignored. Also, it is suggested to disable the sequence during changing the sequence's setting.

Parameters

  base | ADC peripheral base address.
  enable | Switcher to enable the feature or not.

void ADC_SetConvSeqBConfig | ( | ADC_Type * | base,
|  | const adc_conv_seq_config_t * | config
| ) |  |

Parameters

  base | ADC peripheral base address.
  config | Pointer to configuration structure, see to adc_conv_seq_config_t.

static void ADC_DoSoftwareTriggerConvSeqB | ( | ADC_Type * | base | ) |

inlinestatic

Parameters

  base | ADC peripheral base address.

static void ADC_EnableConvSeqBBurstMode | ( | ADC_Type * | base,
|  | bool | enable
| ) |  |

inlinestatic

Enable the burst mode would cause the conversion sequence to be continuously cycled through. Other triggers would be ignored while this mode is enabled. Repeated conversions could be halted by disabling this mode. And the sequence currently in process will be completed before cnversions are terminated. Note that a new sequence could begin just before the burst mode is disabled.

Parameters

  base | ADC peripheral base address.
  enable | Switcher to enable this feature.

static void ADC_SetConvSeqBHighPriority | ( | ADC_Type * | base | ) |

inlinestatic

Parameters

  base | ADC peripheral bass address.

bool ADC_GetConvSeqAGlobalConversionResult | ( | ADC_Type * | base,
|  | adc_result_info_t * | info
| ) |  |

Parameters

  base | ADC peripheral base address.
  info | Pointer to information structure, see to adc_result_info_t;

Return values

  true | The conversion result is ready.
  false | The conversion result is not ready yet.

bool ADC_GetConvSeqBGlobalConversionResult | ( | ADC_Type * | base,
|  | adc_result_info_t * | info
| ) |  |

Parameters

  base | ADC peripheral base address.
  info | Pointer to information structure, see to adc_result_info_t;

Return values

  true | The conversion result is ready.
  false | The conversion result is not ready yet.

bool ADC_GetChannelConversionResult | ( | ADC_Type * | base,
|  | uint32_t | channel,
|  | adc_result_info_t * | info
| ) |  |

Parameters

  base | ADC peripheral base address.
  channel | The indicated channel number.
  info | Pointer to information structure, see to adc_result_info_t;

Return values

  true | The conversion result is ready.
  false | The conversion result is not ready yet.

static void ADC_SetThresholdPair0 | ( | ADC_Type * | base,
|  | uint32_t | lowValue,
|  | uint32_t | highValue
| ) |  |

inlinestatic

Parameters

  base | ADC peripheral base address.
  lowValue | LOW threshold value.
  highValue | HIGH threshold value.

static void ADC_SetThresholdPair1 | ( | ADC_Type * | base,
|  | uint32_t | lowValue,
|  | uint32_t | highValue
| ) |  |

inlinestatic

Parameters

  base | ADC peripheral base address.
  lowValue | LOW threshold value. The available value is with 12-bit.
  highValue | HIGH threshold value. The available value is with 12-bit.

static void ADC_SetChannelWithThresholdPair0 | ( | ADC_Type * | base,
|  | uint32_t | channelMask
| ) |  |

inlinestatic

Parameters

  base | ADC peripheral base address.
  channelMask | Indicated channels' mask.

static void ADC_SetChannelWithThresholdPair1 | ( | ADC_Type * | base,
|  | uint32_t | channelMask
| ) |  |

inlinestatic

Parameters

  base | ADC peripheral base address.
  channelMask | Indicated channels' mask.

static void ADC_EnableInterrupts | ( | ADC_Type * | base,
|  | uint32_t | mask
| ) |  |

inlinestatic

Parameters

  base | ADC peripheral base address.
  mask | Mask of interrupt mask value for global block except each channal, see to _adc_interrupt_enable.

static void ADC_DisableInterrupts | ( | ADC_Type * | base,
|  | uint32_t | mask
| ) |  |

inlinestatic

Parameters

  base | ADC peripheral base address.
  mask | Mask of interrupt mask value for global block except each channel, see to _adc_interrupt_enable.

static void ADC_EnableThresholdCompareInterrupt | ( | ADC_Type * | base,
|  | uint32_t | channel,
|  | adc_threshold_interrupt_mode_t | mode
| ) |  |

inlinestatic

Parameters

  base | ADC peripheral base address.
  channel | Channel number.
  mode | Interrupt mode for threshold compare event, see to adc_threshold_interrupt_mode_t.

static uint32_t ADC_GetStatusFlags | ( | ADC_Type * | base | ) |

inlinestatic

Parameters

  base | ADC peripheral base address.

Returns
  Mask of status flags of module, see to _adc_status_flags.

static void ADC_ClearStatusFlags | ( | ADC_Type * | base,
|  | uint32_t | mask
| ) |  |

inlinestatic

Parameters

  base | ADC peripheral base address.
  mask | Mask of status flags of module, see to _adc_status_flags.