Prusa MINI Firmware overview
ADC_Exported_Functions_Group1
Collaboration diagram for ADC_Exported_Functions_Group1:

Functions

HAL_StatusTypeDef HAL_ADC_Init (ADC_HandleTypeDef *hadc)
 
HAL_StatusTypeDef HAL_ADC_DeInit (ADC_HandleTypeDef *hadc)
 
void HAL_ADC_MspInit (ADC_HandleTypeDef *hadc)
 ADC MSP Initialization This function configures the hardware resources used in this example. More...
 
void HAL_ADC_MspDeInit (ADC_HandleTypeDef *hadc)
 ADC MSP De-Initialization This function freeze the hardware resources used in this example. More...
 

Detailed Description

Function Documentation

◆ HAL_ADC_Init()

HAL_StatusTypeDef HAL_ADC_Init ( ADC_HandleTypeDef hadc)
Here is the caller graph for this function:

◆ HAL_ADC_DeInit()

HAL_StatusTypeDef HAL_ADC_DeInit ( ADC_HandleTypeDef hadc)

◆ HAL_ADC_MspInit()

void HAL_ADC_MspInit ( ADC_HandleTypeDef hadc)

ADC MSP Initialization This function configures the hardware resources used in this example.

Parameters
hadcADC handle pointer
Return values
None

ADC1 GPIO Configuration PC0 ---—> ADC1_IN10 PA3 ---—> ADC1_IN3 PA4 ---—> ADC1_IN4 PA5 ---—> ADC1_IN5 PA6 ---—> ADC1_IN6

116  {
117 
118  GPIO_InitTypeDef GPIO_InitStruct = { 0 };
119  if (hadc->Instance == ADC1) {
120  /* USER CODE BEGIN ADC1_MspInit 0 */
121 
122  /* USER CODE END ADC1_MspInit 0 */
123  /* Peripheral clock enable */
125 
128  /**ADC1 GPIO Configuration
129  PC0 ------> ADC1_IN10
130  PA3 ------> ADC1_IN3
131  PA4 ------> ADC1_IN4
132  PA5 ------> ADC1_IN5
133  PA6 ------> ADC1_IN6
134  */
135  GPIO_InitStruct.Pin = THERM_0_Pin;
136  GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
137  GPIO_InitStruct.Pull = GPIO_NOPULL;
138  HAL_GPIO_Init(THERM_0_GPIO_Port, &GPIO_InitStruct);
139 
141  GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
142  GPIO_InitStruct.Pull = GPIO_NOPULL;
143  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
144 
145  /* USER CODE BEGIN ADC1_MspInit 1 */
146 
147  /* USER CODE END ADC1_MspInit 1 */
148  }
149 }
Here is the call graph for this function:

◆ HAL_ADC_MspDeInit()

void HAL_ADC_MspDeInit ( ADC_HandleTypeDef hadc)

ADC MSP De-Initialization This function freeze the hardware resources used in this example.

Parameters
hadcADC handle pointer
Return values
None

ADC1 GPIO Configuration PC0 ---—> ADC1_IN10 PA3 ---—> ADC1_IN3 PA4 ---—> ADC1_IN4 PA5 ---—> ADC1_IN5 PA6 ---—> ADC1_IN6

158  {
159 
160  if (hadc->Instance == ADC1) {
161  /* USER CODE BEGIN ADC1_MspDeInit 0 */
162 
163  /* USER CODE END ADC1_MspDeInit 0 */
164  /* Peripheral clock disable */
166 
167  /**ADC1 GPIO Configuration
168  PC0 ------> ADC1_IN10
169  PA3 ------> ADC1_IN3
170  PA4 ------> ADC1_IN4
171  PA5 ------> ADC1_IN5
172  PA6 ------> ADC1_IN6
173  */
175 
177 
178  /* USER CODE BEGIN ADC1_MspDeInit 1 */
179 
180  /* USER CODE END ADC1_MspDeInit 1 */
181  }
182 }
Here is the call graph for this function:
ADC_HandleTypeDef::Instance
ADC_TypeDef * Instance
Definition: stm32f4xx_hal_adc.h:210
THERM_1_Pin
#define THERM_1_Pin
Definition: main.h:103
GPIO_InitTypeDef::Mode
uint32_t Mode
Definition: stm32f4xx_hal_gpio.h:68
THERM_2_Pin
#define THERM_2_Pin
Definition: main.h:105
THERM_0_Pin
#define THERM_0_Pin
Definition: main.h:97
GPIO_MODE_ANALOG
#define GPIO_MODE_ANALOG
Definition: stm32f4xx_hal_gpio.h:141
GPIO_InitTypeDef::Pull
uint32_t Pull
Definition: stm32f4xx_hal_gpio.h:71
HAL_GPIO_DeInit
void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin)
HAL_GPIO_Init
void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
GPIO_NOPULL
#define GPIO_NOPULL
Definition: stm32f4xx_hal_gpio.h:170
THERM_0_GPIO_Port
#define THERM_0_GPIO_Port
Definition: main.h:98
__HAL_RCC_GPIOC_CLK_ENABLE
#define __HAL_RCC_GPIOC_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:416
GPIO_InitTypeDef::Pin
uint32_t Pin
Definition: stm32f4xx_hal_gpio.h:65
__HAL_RCC_ADC1_CLK_DISABLE
#define __HAL_RCC_ADC1_CLK_DISABLE()
Definition: stm32f4xx_hal_rcc.h:640
THERM_PINDA_Pin
#define THERM_PINDA_Pin
Definition: main.h:107
HW_IDENTIFY_Pin
#define HW_IDENTIFY_Pin
Definition: main.h:101
__HAL_RCC_GPIOA_CLK_ENABLE
#define __HAL_RCC_GPIOA_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:402
GPIO_InitTypeDef
GPIO Init structure definition.
Definition: stm32f4xx_hal_gpio.h:63
__HAL_RCC_ADC1_CLK_ENABLE
#define __HAL_RCC_ADC1_CLK_ENABLE()
Definition: stm32f4xx_hal_rcc.h:601