亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? stm32f10x_adc.c

?? STM32+Grlib
?? C
?? 第 1 頁 / 共 4 頁
字號:
  /* Store the new register value */
  ADCx->JSQR = tmpreg1;
}

/**
  * @brief  Configures the sequencer length for injected channels
  * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
  * @param  Length: The sequencer length. 
  *   This parameter must be a number between 1 to 4.
  * @retval None
  */
void ADC_InjectedSequencerLengthConfig(ADC_TypeDef* ADCx, uint8_t Length)
{
  uint32_t tmpreg1 = 0;
  uint32_t tmpreg2 = 0;
  /* Check the parameters */
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_INJECTED_LENGTH(Length));
  
  /* Get the old register value */
  tmpreg1 = ADCx->JSQR;
  /* Clear the old injected sequnence lenght JL bits */
  tmpreg1 &= JSQR_JL_Reset;
  /* Set the injected sequnence lenght JL bits */
  tmpreg2 = Length - 1; 
  tmpreg1 |= tmpreg2 << 20;
  /* Store the new register value */
  ADCx->JSQR = tmpreg1;
}

/**
  * @brief  Set the injected channels conversion value offset
  * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
  * @param  ADC_InjectedChannel: the ADC injected channel to set its offset. 
  *   This parameter can be one of the following values:
  *     @arg ADC_InjectedChannel_1: Injected Channel1 selected
  *     @arg ADC_InjectedChannel_2: Injected Channel2 selected
  *     @arg ADC_InjectedChannel_3: Injected Channel3 selected
  *     @arg ADC_InjectedChannel_4: Injected Channel4 selected
  * @param  Offset: the offset value for the selected ADC injected channel
  *   This parameter must be a 12bit value.
  * @retval None
  */
void ADC_SetInjectedOffset(ADC_TypeDef* ADCx, uint8_t ADC_InjectedChannel, uint16_t Offset)
{
  __IO uint32_t tmp = 0;
  
  /* Check the parameters */
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_INJECTED_CHANNEL(ADC_InjectedChannel));
  assert_param(IS_ADC_OFFSET(Offset));  
  
  tmp = (uint32_t)ADCx;
  tmp += ADC_InjectedChannel;
  
  /* Set the selected injected channel data offset */
  *(__IO uint32_t *) tmp = (uint32_t)Offset;
}

/**
  * @brief  Returns the ADC injected channel conversion result
  * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
  * @param  ADC_InjectedChannel: the converted ADC injected channel.
  *   This parameter can be one of the following values:
  *     @arg ADC_InjectedChannel_1: Injected Channel1 selected
  *     @arg ADC_InjectedChannel_2: Injected Channel2 selected
  *     @arg ADC_InjectedChannel_3: Injected Channel3 selected
  *     @arg ADC_InjectedChannel_4: Injected Channel4 selected
  * @retval The Data conversion value.
  */
uint16_t ADC_GetInjectedConversionValue(ADC_TypeDef* ADCx, uint8_t ADC_InjectedChannel)
{
  __IO uint32_t tmp = 0;
  
  /* Check the parameters */
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_INJECTED_CHANNEL(ADC_InjectedChannel));

  tmp = (uint32_t)ADCx;
  tmp += ADC_InjectedChannel + JDR_Offset;
  
  /* Returns the selected injected channel conversion data value */
  return (uint16_t) (*(__IO uint32_t*)  tmp);   
}

/**
  * @brief  Enables or disables the analog watchdog on single/all regular
  *         or injected channels
  * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
  * @param  ADC_AnalogWatchdog: the ADC analog watchdog configuration.
  *   This parameter can be one of the following values:
  *     @arg ADC_AnalogWatchdog_SingleRegEnable: Analog watchdog on a single regular channel
  *     @arg ADC_AnalogWatchdog_SingleInjecEnable: Analog watchdog on a single injected channel
  *     @arg ADC_AnalogWatchdog_SingleRegOrInjecEnable: Analog watchdog on a single regular or injected channel
  *     @arg ADC_AnalogWatchdog_AllRegEnable: Analog watchdog on  all regular channel
  *     @arg ADC_AnalogWatchdog_AllInjecEnable: Analog watchdog on  all injected channel
  *     @arg ADC_AnalogWatchdog_AllRegAllInjecEnable: Analog watchdog on all regular and injected channels
  *     @arg ADC_AnalogWatchdog_None: No channel guarded by the analog watchdog
  * @retval None	  
  */
void ADC_AnalogWatchdogCmd(ADC_TypeDef* ADCx, uint32_t ADC_AnalogWatchdog)
{
  uint32_t tmpreg = 0;
  /* Check the parameters */
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_ANALOG_WATCHDOG(ADC_AnalogWatchdog));
  /* Get the old register value */
  tmpreg = ADCx->CR1;
  /* Clear AWDEN, AWDENJ and AWDSGL bits */
  tmpreg &= CR1_AWDMode_Reset;
  /* Set the analog watchdog enable mode */
  tmpreg |= ADC_AnalogWatchdog;
  /* Store the new register value */
  ADCx->CR1 = tmpreg;
}

/**
  * @brief  Configures the high and low thresholds of the analog watchdog.
  * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
  * @param  HighThreshold: the ADC analog watchdog High threshold value.
  *   This parameter must be a 12bit value.
  * @param  LowThreshold: the ADC analog watchdog Low threshold value.
  *   This parameter must be a 12bit value.
  * @retval None
  */
void ADC_AnalogWatchdogThresholdsConfig(ADC_TypeDef* ADCx, uint16_t HighThreshold,
                                        uint16_t LowThreshold)
{
  /* Check the parameters */
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_THRESHOLD(HighThreshold));
  assert_param(IS_ADC_THRESHOLD(LowThreshold));
  /* Set the ADCx high threshold */
  ADCx->HTR = HighThreshold;
  /* Set the ADCx low threshold */
  ADCx->LTR = LowThreshold;
}

/**
  * @brief  Configures the analog watchdog guarded single channel
  * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
  * @param  ADC_Channel: the ADC channel to configure for the analog watchdog. 
  *   This parameter can be one of the following values:
  *     @arg ADC_Channel_0: ADC Channel0 selected
  *     @arg ADC_Channel_1: ADC Channel1 selected
  *     @arg ADC_Channel_2: ADC Channel2 selected
  *     @arg ADC_Channel_3: ADC Channel3 selected
  *     @arg ADC_Channel_4: ADC Channel4 selected
  *     @arg ADC_Channel_5: ADC Channel5 selected
  *     @arg ADC_Channel_6: ADC Channel6 selected
  *     @arg ADC_Channel_7: ADC Channel7 selected
  *     @arg ADC_Channel_8: ADC Channel8 selected
  *     @arg ADC_Channel_9: ADC Channel9 selected
  *     @arg ADC_Channel_10: ADC Channel10 selected
  *     @arg ADC_Channel_11: ADC Channel11 selected
  *     @arg ADC_Channel_12: ADC Channel12 selected
  *     @arg ADC_Channel_13: ADC Channel13 selected
  *     @arg ADC_Channel_14: ADC Channel14 selected
  *     @arg ADC_Channel_15: ADC Channel15 selected
  *     @arg ADC_Channel_16: ADC Channel16 selected
  *     @arg ADC_Channel_17: ADC Channel17 selected
  * @retval None
  */
void ADC_AnalogWatchdogSingleChannelConfig(ADC_TypeDef* ADCx, uint8_t ADC_Channel)
{
  uint32_t tmpreg = 0;
  /* Check the parameters */
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_CHANNEL(ADC_Channel));
  /* Get the old register value */
  tmpreg = ADCx->CR1;
  /* Clear the Analog watchdog channel select bits */
  tmpreg &= CR1_AWDCH_Reset;
  /* Set the Analog watchdog channel */
  tmpreg |= ADC_Channel;
  /* Store the new register value */
  ADCx->CR1 = tmpreg;
}

/**
  * @brief  Enables or disables the temperature sensor and Vrefint channel.
  * @param  NewState: new state of the temperature sensor.
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void ADC_TempSensorVrefintCmd(FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  if (NewState != DISABLE)
  {
    /* Enable the temperature sensor and Vrefint channel*/
    ADC1->CR2 |= CR2_TSVREFE_Set;
  }
  else
  {
    /* Disable the temperature sensor and Vrefint channel*/
    ADC1->CR2 &= CR2_TSVREFE_Reset;
  }
}

/**
  * @brief  Checks whether the specified ADC flag is set or not.
  * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
  * @param  ADC_FLAG: specifies the flag to check. 
  *   This parameter can be one of the following values:
  *     @arg ADC_FLAG_AWD: Analog watchdog flag
  *     @arg ADC_FLAG_EOC: End of conversion flag
  *     @arg ADC_FLAG_JEOC: End of injected group conversion flag
  *     @arg ADC_FLAG_JSTRT: Start of injected group conversion flag
  *     @arg ADC_FLAG_STRT: Start of regular group conversion flag
  * @retval The new state of ADC_FLAG (SET or RESET).
  */
FlagStatus ADC_GetFlagStatus(ADC_TypeDef* ADCx, uint8_t ADC_FLAG)
{
  FlagStatus bitstatus = RESET;
  /* Check the parameters */
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_GET_FLAG(ADC_FLAG));
  /* Check the status of the specified ADC flag */
  if ((ADCx->SR & ADC_FLAG) != (uint8_t)RESET)
  {
    /* ADC_FLAG is set */
    bitstatus = SET;
  }
  else
  {
    /* ADC_FLAG is reset */
    bitstatus = RESET;
  }
  /* Return the ADC_FLAG status */
  return  bitstatus;
}

/**
  * @brief  Clears the ADCx's pending flags.
  * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
  * @param  ADC_FLAG: specifies the flag to clear. 
  *   This parameter can be any combination of the following values:
  *     @arg ADC_FLAG_AWD: Analog watchdog flag
  *     @arg ADC_FLAG_EOC: End of conversion flag
  *     @arg ADC_FLAG_JEOC: End of injected group conversion flag
  *     @arg ADC_FLAG_JSTRT: Start of injected group conversion flag
  *     @arg ADC_FLAG_STRT: Start of regular group conversion flag
  * @retval None
  */
void ADC_ClearFlag(ADC_TypeDef* ADCx, uint8_t ADC_FLAG)
{
  /* Check the parameters */
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_CLEAR_FLAG(ADC_FLAG));
  /* Clear the selected ADC flags */
  ADCx->SR = ~(uint32_t)ADC_FLAG;
}

/**
  * @brief  Checks whether the specified ADC interrupt has occurred or not.
  * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
  * @param  ADC_IT: specifies the ADC interrupt source to check. 
  *   This parameter can be one of the following values:
  *     @arg ADC_IT_EOC: End of conversion interrupt mask
  *     @arg ADC_IT_AWD: Analog watchdog interrupt mask
  *     @arg ADC_IT_JEOC: End of injected conversion interrupt mask
  * @retval The new state of ADC_IT (SET or RESET).
  */
ITStatus ADC_GetITStatus(ADC_TypeDef* ADCx, uint16_t ADC_IT)
{
  ITStatus bitstatus = RESET;
  uint32_t itmask = 0, enablestatus = 0;
  /* Check the parameters */
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_GET_IT(ADC_IT));
  /* Get the ADC IT index */
  itmask = ADC_IT >> 8;
  /* Get the ADC_IT enable bit status */
  enablestatus = (ADCx->CR1 & (uint8_t)ADC_IT) ;
  /* Check the status of the specified ADC interrupt */
  if (((ADCx->SR & itmask) != (uint32_t)RESET) && enablestatus)
  {
    /* ADC_IT is set */
    bitstatus = SET;
  }
  else
  {
    /* ADC_IT is reset */
    bitstatus = RESET;
  }
  /* Return the ADC_IT status */
  return  bitstatus;
}

/**
  * @brief  Clears the ADCx's interrupt pending bits.
  * @param  ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
  * @param  ADC_IT: specifies the ADC interrupt pending bit to clear.
  *   This parameter can be any combination of the following values:
  *     @arg ADC_IT_EOC: End of conversion interrupt mask
  *     @arg ADC_IT_AWD: Analog watchdog interrupt mask
  *     @arg ADC_IT_JEOC: End of injected conversion interrupt mask
  * @retval None
  */
void ADC_ClearITPendingBit(ADC_TypeDef* ADCx, uint16_t ADC_IT)
{
  uint8_t itmask = 0;
  /* Check the parameters */
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_IT(ADC_IT));
  /* Get the ADC IT index */
  itmask = (uint8_t)(ADC_IT >> 8);
  /* Clear the selected ADC interrupt pending bits */
  ADCx->SR = ~(uint32_t)itmask;
}

/**
  * @}
  */

/**
  * @}
  */

/**
  * @}
  */

/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产三级欧美三级日产三级99| 97se狠狠狠综合亚洲狠狠| 欧美三级视频在线| 亚洲一级在线观看| 欧美日韩国产一区| 日韩精品一级二级 | 国产精品91一区二区| 国产亚洲综合色| 99久久精品免费精品国产| 亚洲欧洲一区二区三区| 欧美在线观看你懂的| 青青草成人在线观看| 精品国产精品网麻豆系列 | 国产成都精品91一区二区三| 国产片一区二区| 日本丰满少妇一区二区三区| 午夜电影一区二区三区| 久久亚洲精品小早川怜子| va亚洲va日韩不卡在线观看| 五月婷婷久久综合| 欧美成人女星排名| 成人av免费在线观看| 亚洲大尺度视频在线观看| 精品成人一区二区三区| 成人免费视频网站在线观看| 亚洲午夜久久久久久久久电影院 | 欧美精三区欧美精三区| 久久精品久久精品| 亚洲欧美另类久久久精品2019| 欧美视频精品在线| 国产一区二区精品久久99| 亚洲日本护士毛茸茸| 欧美日韩国产中文| 成人手机电影网| 午夜精品一区二区三区三上悠亚| 久久久久国产精品麻豆| 在线看一区二区| 国产ts人妖一区二区| 亚洲va韩国va欧美va| 久久久精品欧美丰满| 欧美日本在线播放| 成人av在线影院| 老司机免费视频一区二区三区| 国产精品视频一区二区三区不卡| 7777精品伊人久久久大香线蕉经典版下载| 国产精品中文字幕一区二区三区| 亚洲成年人网站在线观看| 国产欧美日韩视频在线观看| 91精品国产综合久久久久久久久久| 国产精品香蕉一区二区三区| 亚洲国产裸拍裸体视频在线观看乱了| www激情久久| 欧美综合欧美视频| 国产mv日韩mv欧美| 免费在线成人网| 亚洲小说春色综合另类电影| 国产精品五月天| 精品免费视频.| 在线播放中文一区| 91免费看视频| va亚洲va日韩不卡在线观看| 国产一区二区三区精品欧美日韩一区二区三区 | 久久久电影一区二区三区| 欧美色网站导航| 91在线国产观看| 国产成人自拍高清视频在线免费播放| 免费的成人av| 日韩综合小视频| 性做久久久久久免费观看| 一区二区三区精品| 亚洲图片自拍偷拍| 一区二区三区在线观看国产| 国产精品高清亚洲| 中文字幕精品一区| 亚洲国产精华液网站w| 欧美mv日韩mv国产网站| 7777精品伊人久久久大香线蕉经典版下载 | 国产精品美女久久久久久| 久久九九99视频| 久久久精品天堂| 国产日韩精品一区二区三区在线| 26uuu精品一区二区| 欧美精品一区二区久久婷婷| 欧美一区二区三区系列电影| 欧美日韩第一区日日骚| 欧美精品aⅴ在线视频| 欧美日本一区二区在线观看| 欧美高清视频不卡网| 在线电影国产精品| 欧美成va人片在线观看| 精品少妇一区二区三区日产乱码| 日韩欧美你懂的| 久久综合五月天婷婷伊人| 精品国产精品网麻豆系列| 国产亚洲自拍一区| 国产精品每日更新在线播放网址 | 6080日韩午夜伦伦午夜伦| 欧美日韩国产另类不卡| 欧美疯狂性受xxxxx喷水图片| 欧美日韩国产美女| 精品日产卡一卡二卡麻豆| 26uuu亚洲综合色| 久久精品人人做人人爽人人| 综合亚洲深深色噜噜狠狠网站| 亚洲三级免费观看| 午夜精品国产更新| 韩日精品视频一区| 99久久综合精品| 欧美无人高清视频在线观看| 欧美妇女性影城| 国产日韩成人精品| 亚洲综合偷拍欧美一区色| 日本视频在线一区| 国产高清成人在线| 91色婷婷久久久久合中文| 91精品免费观看| 日本一区二区成人在线| 亚洲国产另类av| 福利电影一区二区| 91高清视频在线| 欧美一区二区三区免费在线看| 国产色产综合色产在线视频| 亚洲资源在线观看| 国产精品一二三四五| 色婷婷精品大在线视频 | 激情六月婷婷久久| 91麻豆免费观看| 26uuu另类欧美亚洲曰本| 一区二区三区中文字幕电影| 久久成人综合网| 欧美色图片你懂的| 久久久五月婷婷| 日本女优在线视频一区二区| 成人爱爱电影网址| 日韩精品中文字幕一区| 亚洲女厕所小便bbb| 国产伦精品一区二区三区视频青涩 | 久久不见久久见免费视频7| 99精品欧美一区| 久久久久久久久久久久久女国产乱| 亚洲免费av高清| 高清在线成人网| 777久久久精品| 亚洲影院理伦片| 风间由美一区二区av101| 欧美大胆一级视频| 亚洲一区二区不卡免费| 成人sese在线| 久久久国产精品麻豆| 蜜臀99久久精品久久久久久软件| 91老师国产黑色丝袜在线| 国产三级精品视频| 久久99国产精品久久99 | 天天色天天操综合| 91一区二区三区在线观看| 国产丝袜在线精品| 国内成人精品2018免费看| 欧美精品vⅰdeose4hd| 亚洲一区二区欧美| 色哟哟国产精品免费观看| 中文字幕欧美三区| 国产美女一区二区| 久久只精品国产| 久久精品国产免费| 51久久夜色精品国产麻豆| 九九精品一区二区| 日韩一区二区不卡| 日韩精品视频网站| 欧美精品久久久久久久久老牛影院| 亚洲日本电影在线| 91丨porny丨首页| 综合在线观看色| 色狠狠综合天天综合综合| 亚洲图片另类小说| 色欧美乱欧美15图片| 一区二区三区四区在线免费观看| 91麻豆免费看片| 一区二区三区国产| 欧美三级在线看| 日韩国产一二三区| 日韩三级免费观看| 国产在线看一区| 国产午夜精品在线观看| 成人小视频在线| 18欧美亚洲精品| 欧美视频在线播放| 蜜桃av噜噜一区| 国产欧美一区二区精品婷婷 | 日本视频在线一区| 26uuu成人网一区二区三区| 国产福利精品一区二区| 亚洲欧洲精品一区二区三区| 在线日韩av片| 午夜精品一区二区三区三上悠亚| 69堂精品视频| 国产一区免费电影| 亚洲嫩草精品久久| 欧美日韩视频在线观看一区二区三区| 人禽交欧美网站| 中文字幕欧美国产|