simulation file + gitignore update
This commit is contained in:
@ -105,7 +105,7 @@ int main(void)
|
||||
led_init(&htim2);
|
||||
ftcan_init(&hcan);
|
||||
/* USER CODE END 2 */
|
||||
|
||||
|
||||
/* Infinite loop */
|
||||
/* USER CODE BEGIN WHILE */
|
||||
while (1)
|
||||
@ -114,7 +114,6 @@ int main(void)
|
||||
|
||||
/* USER CODE BEGIN 3 */
|
||||
adc_loop(&hadc);
|
||||
|
||||
}
|
||||
/* USER CODE END 3 */
|
||||
}
|
||||
@ -206,14 +205,6 @@ static void MX_ADC_Init(void)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
|
||||
/** Configure for the selected ADC regular channel to be converted.
|
||||
*/
|
||||
sConfig.Channel = ADC_CHANNEL_1;
|
||||
if (HAL_ADC_ConfigChannel(&hadc, &sConfig) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
/* USER CODE BEGIN ADC_Init 2 */
|
||||
|
||||
/* USER CODE END ADC_Init 2 */
|
||||
|
||||
@ -99,9 +99,8 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc)
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
/**ADC GPIO Configuration
|
||||
PA0 ------> ADC_IN0
|
||||
PA1 ------> ADC_IN1
|
||||
*/
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1;
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_0;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
@ -134,9 +133,8 @@ void HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc)
|
||||
|
||||
/**ADC GPIO Configuration
|
||||
PA0 ------> ADC_IN0
|
||||
PA1 ------> ADC_IN1
|
||||
*/
|
||||
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_0|GPIO_PIN_1);
|
||||
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_0);
|
||||
|
||||
/* ADC1 interrupt DeInit */
|
||||
HAL_NVIC_DisableIRQ(ADC1_IRQn);
|
||||
|
||||
Reference in New Issue
Block a user