fw_bridge/Src/main.c
/**
  * @brief ADC1 Initialization Function
  * @param None
  * @retval None
  */
@brief ADC1 Initialization Function
@param None
@retval None
@brief ADC1 Initialization Function @param None @retval None
static void MX_ADC1_Init(void)
{
  ADC_ChannelConfTypeDef sConfig = {0};
  hadc1.Instance = ADC1;
  hadc1.Init.ScanConvMode = ADC_SCAN_DISABLE;
  hadc1.Init.ContinuousConvMode = DISABLE;
  hadc1.Init.DiscontinuousConvMode = DISABLE;
  hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;
  hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT;
  hadc1.Init.NbrOfConversion = 1;
  if (HAL_ADC_Init(&hadc1) != HAL_OK)
  {
    Error_Handler();
  }
  sConfig.Channel = ADC_CHANNEL_VREFINT;
  sConfig.Rank = ADC_REGULAR_RANK_1;
  sConfig.SamplingTime = ADC_SAMPLETIME_1CYCLE_5;
  if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
  {
    Error_Handler();
  }
}
static void MX_ADC1_Init ( void ) { ADC_ChannelConfTypeDef sConfig = { 0 } ; hadc1 . Instance = ADC1 ; hadc1 . Init . ScanConvMode = ADC_SCAN_DISABLE ; hadc1 . Init . ContinuousConvMode = DISABLE ; hadc1 . Init . DiscontinuousConvMode = DISABLE ; hadc1 . Init . ExternalTrigConv = ADC_SOFTWARE_START ; hadc1 . Init . DataAlign = ADC_DATAALIGN_RIGHT ; hadc1 . Init . NbrOfConversion = 1 ; if ( HAL_ADC_Init ( & hadc1 ) != HAL_OK ) { Error_Handler ( ) ; } sConfig . Channel = ADC_CHANNEL_VREFINT ; sConfig . Rank = ADC_REGULAR_RANK_1 ; sConfig . SamplingTime = ADC_SAMPLETIME_1CYCLE_5 ; if ( HAL_ADC_ConfigChannel ( & hadc1 , & sConfig ) != HAL_OK ) { Error_Handler ( ) ; } }
@brief ADC1 Initialization Function
 @param None
 @retval None
@brief ADC1 Initialization Function @param None @retval None
/* USER CODE BEGIN ADC1_Init 0 */ /* USER CODE END ADC1_Init 0 */ /* USER CODE BEGIN ADC1_Init 1 */ /* USER CODE END ADC1_Init 1 */ /**Common config 
  */ /**Configure Regular Channel 
  */ /* USER CODE BEGIN ADC1_Init 2 */ /* USER CODE END ADC1_Init 2 */