SHARE
TWEET

Untitled

slotamarcin Oct 23rd, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void ADC_SetActiveChannel(ADC_HandleTypeDef *hadc, uint32_t AdcChannel) {
  2.     ADC_ChannelConfTypeDef sConfig = {0};
  3.     sConfig.Channel = AdcChannel;
  4.     sConfig.Rank = 1;
  5.     sConfig.SamplingTime = ADC_SAMPLETIME_12CYCLES_5;
  6.     if (HAL_ADC_ConfigChannel(hadc, &sConfig) != HAL_OK)
  7.     {
  8.         Error_Handler();
  9.     }
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top