25#if defined(HAL_ADC_MODULE_ENABLED) && VSF_HAL_USE_ADC == ENABLED
33#define HAL_ADC_STATE_RESET 0x00000000U
34#define HAL_ADC_STATE_READY 0x00000001U
35#define HAL_ADC_STATE_BUSY_INTERNAL 0x00000002U
36#define HAL_ADC_STATE_TIMEOUT 0x00000004U
37#define HAL_ADC_STATE_ERROR_INTERNAL 0x00000010U
38#define HAL_ADC_STATE_ERROR_CONFIG 0x00000020U
39#define HAL_ADC_STATE_ERROR_DMA 0x00000040U
40#define HAL_ADC_STATE_REG_BUSY 0x00000100U
41#define HAL_ADC_STATE_REG_EOC 0x00000200U
42#define HAL_ADC_STATE_REG_OVR 0x00000400U
43#define HAL_ADC_STATE_INJ_BUSY 0x00001000U
44#define HAL_ADC_STATE_INJ_EOC 0x00002000U
45#define HAL_ADC_STATE_AWD1 0x00010000U
46#define HAL_ADC_STATE_AWD2 0x00020000U
47#define HAL_ADC_STATE_AWD3 0x00040000U
48#define HAL_ADC_STATE_MULTIMODE_SLAVE 0x00100000U
50#define HAL_ADC_ERROR_NONE 0x00U
51#define HAL_ADC_ERROR_INTERNAL 0x01U
52#define HAL_ADC_ERROR_OVR 0x02U
53#define HAL_ADC_ERROR_DMA 0x04U
54#if (USE_HAL_ADC_REGISTER_CALLBACKS == 1)
55# define HAL_ADC_ERROR_INVALID_CALLBACK (0x10U)
83} ADC_ChannelConfTypeDef;
92} ADC_AnalogWDGConfTypeDef;
94#if (USE_HAL_ADC_REGISTER_CALLBACKS == 1)
95typedef struct __ADC_HandleTypeDef
100 ADC_TypeDef *Instance;
101 ADC_InitTypeDef
Init;
102 volatile uint32_t NbrOfCurrentConversionRank;
103 DMA_HandleTypeDef *DMA_Handle;
107#if (USE_HAL_ADC_REGISTER_CALLBACKS == 1)
108 void (*ConvCpltCallback)(
struct __ADC_HandleTypeDef *hadc);
109 void (*ConvHalfCpltCallback)(
struct __ADC_HandleTypeDef *hadc);
110 void (*LevelOutOfWindowCallback)(
struct __ADC_HandleTypeDef *hadc);
111 void (*ErrorCallback)(
struct __ADC_HandleTypeDef *hadc);
112 void (*InjectedConvCpltCallback)(
struct __ADC_HandleTypeDef *hadc);
113 void (*MspInitCallback)(
struct __ADC_HandleTypeDef *hadc);
114 void (*MspDeInitCallback)(
struct __ADC_HandleTypeDef *hadc);
118#if (USE_HAL_ADC_REGISTER_CALLBACKS == 1)
120 HAL_ADC_CONVERSION_COMPLETE_CB_ID = 0x00U,
121 HAL_ADC_CONVERSION_HALF_CB_ID = 0x01U,
122 HAL_ADC_LEVEL_OUT_OF_WINDOW_1_CB_ID = 0x02U,
123 HAL_ADC_ERROR_CB_ID = 0x03U,
124 HAL_ADC_INJ_CONVERSION_COMPLETE_CB_ID = 0x04U,
125 HAL_ADC_MSPINIT_CB_ID = 0x05U,
126 HAL_ADC_MSPDEINIT_CB_ID = 0x06U,
127} HAL_ADC_CallbackIDTypeDef;
128typedef void (*pADC_CallbackTypeDef)(ADC_HandleTypeDef *hadc);
141} ADC_InjectionConfTypeDef;
147} ADC_MultiModeTypeDef;
157#if (USE_HAL_ADC_REGISTER_CALLBACKS == 1)
159 HAL_ADC_CallbackIDTypeDef CallbackID,
160 pADC_CallbackTypeDef pCallback);
162 ADC_HandleTypeDef *hadc, HAL_ADC_CallbackIDTypeDef CallbackID);
183 ADC_ChannelConfTypeDef *sConfig);
185 ADC_HandleTypeDef *hadc, ADC_AnalogWDGConfTypeDef *AnalogWDGConfig);
203 ADC_HandleTypeDef *hadc, ADC_InjectionConfTypeDef *sConfigInjected);
205 ADC_HandleTypeDef *hadc, ADC_MultiModeTypeDef *multimode);
struct @516 Channel
Channel.
vsf_err_t(* Init)(vsf_adc_cfg_t *pCfg)
Definition adc_interface.h:38
unsigned uint32_t
Definition stdint.h:9
FunctionalState
Definition sthal.h:55
HAL_StatusTypeDef HAL_ADC_PollForEvent(ADC_HandleTypeDef *hadc, uint32_t EventType, uint32_t Timeout)
Definition sthal_adc.c:195
HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:43
HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:179
HAL_StatusTypeDef HAL_ADC_Stop(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:184
void HAL_ADC_IRQHandler(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:211
HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:33
void HAL_ADC_MspDeInit(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:174
uint32_t HAL_ADC_GetError(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:270
uint32_t HAL_ADC_GetValue(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:224
HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef *hadc, ADC_InjectionConfTypeDef *sConfigInjected)
Definition sthal_adc.c:329
uint32_t HAL_ADCEx_MultiModeGetValue(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:318
HAL_StatusTypeDef HAL_ADCEx_InjectedPollForConversion(ADC_HandleTypeDef *hadc, uint32_t Timeout)
Definition sthal_adc.c:290
HAL_StatusTypeDef HAL_ADCEx_MultiModeStop_DMA(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:313
uint32_t HAL_ADCEx_InjectedGetValue(ADC_HandleTypeDef *hadc, uint32_t InjectedRank)
Definition sthal_adc.c:301
HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef *hadc, uint32_t *pData, uint32_t Length)
Definition sthal_adc.c:213
uint32_t HAL_ADC_GetState(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:265
void HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:242
HAL_StatusTypeDef HAL_ADCEx_InjectedStop(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:285
void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:168
HAL_StatusTypeDef HAL_ADCEx_InjectedStart(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:275
HAL_StatusTypeDef HAL_ADCEx_MultiModeStart_DMA(ADC_HandleTypeDef *hadc, uint32_t *pData, uint32_t Length)
Definition sthal_adc.c:307
HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef *hadc, ADC_MultiModeTypeDef *multimode)
Definition sthal_adc.c:335
HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef *hadc, ADC_ChannelConfTypeDef *sConfig)
Definition sthal_adc.c:253
void HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:236
HAL_StatusTypeDef HAL_ADC_PollForConversion(ADC_HandleTypeDef *hadc, uint32_t Timeout)
Definition sthal_adc.c:189
void HAL_ADC_ErrorCallback(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:248
HAL_StatusTypeDef HAL_ADCEx_InjectedStop_IT(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:296
HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:219
HAL_StatusTypeDef HAL_ADC_Stop_IT(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:206
HAL_StatusTypeDef HAL_ADC_Start_IT(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:201
HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef *hadc, ADC_AnalogWDGConfTypeDef *AnalogWDGConfig)
Definition sthal_adc.c:259
void HAL_ADCEx_InjectedConvCpltCallback(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:324
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:230
HAL_StatusTypeDef HAL_ADCEx_InjectedStart_IT(ADC_HandleTypeDef *hadc)
Definition sthal_adc.c:280
HAL_StatusTypeDef
Definition sthal_def.h:61
HAL_LockTypeDef
Definition sthal_def.h:68
Definition vsf_template_adc.h:709