latest version
This commit is contained in:
10
Core/Src/adc.c
Executable file → Normal file
10
Core/Src/adc.c
Executable file → Normal file
@@ -84,13 +84,13 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef* adcHandle)
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||
/**ADC1 GPIO Configuration
|
||||
PA6 ------> ADC1_IN6
|
||||
PA3 ------> ADC1_IN3
|
||||
PB0 ------> ADC1_IN8
|
||||
PB1 ------> ADC1_IN9
|
||||
*/
|
||||
GPIO_InitStruct.Pin = ADC_CC1_Pin;
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_3;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||
HAL_GPIO_Init(ADC_CC1_GPIO_Port, &GPIO_InitStruct);
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
GPIO_InitStruct.Pin = ADC_NTC1_Pin|ADC_NTC2_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||
@@ -114,11 +114,11 @@ void HAL_ADC_MspDeInit(ADC_HandleTypeDef* adcHandle)
|
||||
__HAL_RCC_ADC1_CLK_DISABLE();
|
||||
|
||||
/**ADC1 GPIO Configuration
|
||||
PA6 ------> ADC1_IN6
|
||||
PA3 ------> ADC1_IN3
|
||||
PB0 ------> ADC1_IN8
|
||||
PB1 ------> ADC1_IN9
|
||||
*/
|
||||
HAL_GPIO_DeInit(ADC_CC1_GPIO_Port, ADC_CC1_Pin);
|
||||
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_3);
|
||||
|
||||
HAL_GPIO_DeInit(GPIOB, ADC_NTC1_Pin|ADC_NTC2_Pin);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user