MG32L003 Standard Peripherals Firmware Library

宏定义 | 函数
mg32l003_adc.c 文件参考

This file provides all the ADC firmware functions. 更多...

`#include "mg32l003_adc.h"`
`#include "mg32l003_rcc.h"`

## 宏定义
#define | CR0_CONFIG_CLEAR_Msk (ADC_CR0_SAM_Msk | ADC_CR0_SEL_Msk | ADC_CR0_CLKSEL_Msk)
#define | CR1_CONFIG_CLEAR_Msk (ADC_CR1_RACC_EN_Msk | ADC_CR1_TRIGS0_Msk | ADC_CR1_TRIGS1_Msk)
#define | CR2_CONFIG_CLEAR_Msk (ADC_CR2_CIRCLE_MODE_Msk | ADC_CR2_ADCCNT_Msk | ADC_CR2_CHEN_Msk)

## 函数
void | ADC_DeInit (void)
| Deinitializes the ADC peripheral registers to their default reset values. 更多...
void | ADC_Init (ADC_InitTypeDef *ADC_InitStruct)
| Initializes the ADC peripheral according to the specified parameters in the ADC_InitStruct. 更多...
void | ADC_StructInit (ADC_InitTypeDef *ADC_InitStruct)
| Fills each ADC_InitStruct member with its default value. 更多...
void | ADC_Cmd (FunctionalState NewState)
| Enables or disables the ADC peripheral. 更多...
void | ADC_ITConfig (uint32_t ADC_IT, FunctionalState NewState)
| Enables or disables the specified ADC interrupts. 更多...
void | ADC_SoftwareStartConvCmd (FunctionalState NewState)
| Enables or disables the selected ADC software start conversion. 更多...
FlagStatus | ADC_GetSoftwareStartConvStatus (void)
| Gets the selected ADC Software start conversion Status. 更多...
uint16_t | ADC_GetConversionValue (uint32_t Channel)
| Returns the last ADC conversion result data for regular channel. 更多...
uint32_t | ADC_GetAccValue (void)
| Gets ADC accumulation conversion result. 更多...
ITStatus | ADC_GetITStatus (uint16_t ADC_IT)
| Checks whether the specified ADC interrupt is set or not. 更多...
FlagStatus | ADC_GetFlagStatus (uint16_t ADC_FLAG)
| Checks whether the specified ADC flag is set or not. 更多...
void | ADC_ClearITPendingBit (uint16_t ADC_IT)
| Clears the ADC pending interrupt bits. 更多...
void | ADC_ClearFlag (uint16_t ADC_FLAG)
| Clears the ADC pending interrupt flags. 更多...
FlagStatus | ADC_GetRawFlagStatus (uint16_t ADC_FLAG)
| Checks whether the specified ADC flag is set or not. 更多...
void | ADC_ThresholdsConfig (uint16_t LowThreshold, uint16_t HighThreshold)
| Configures the high and low thresholds of the analog watchdog. 更多...
void | ADC_ThresholdsCompareCmd (uint16_t Threshold_Config, FunctionalState NewState)
| Enables or disables the thresholds to compare with the function of analog watchdog. 更多...

## 详细描述

This file provides all the ADC firmware functions.

作者
  megawin Application Team

版本
  V0.0.5

日期
  13-August-2024