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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? stm32f10x_adc.c

?? STM32手持式示波器源代碼
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
  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抯 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 2009 STMicroelectronics *****END OF FILE****/

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产午夜亚洲精品理论片色戒| 国产日韩欧美一区二区三区综合| 一区二区三区中文在线观看| 成人午夜碰碰视频| 国产日韩欧美一区二区三区综合| 国产一区美女在线| 精品剧情v国产在线观看在线| 另类中文字幕网| 日韩女优视频免费观看| 日本午夜精品视频在线观看| 欧美一区午夜视频在线观看| 日本色综合中文字幕| 日韩精品资源二区在线| 国产在线精品一区二区夜色| 精品91自产拍在线观看一区| 国产在线观看免费一区| 中文字幕高清不卡| caoporm超碰国产精品| 亚洲精品国产精品乱码不99| 欧美在线你懂的| 日韩综合小视频| 欧美一区二区在线看| 美女爽到高潮91| 久久综合久久综合久久| 国产成人精品一区二区三区网站观看| 国产午夜一区二区三区| a美女胸又www黄视频久久| 亚洲人成精品久久久久久| 欧美私模裸体表演在线观看| 婷婷国产在线综合| 欧美不卡在线视频| 成人av网站在线观看免费| 日韩美女精品在线| 欧美日韩精品一区视频| 九一九一国产精品| 一区视频在线播放| 欧美日韩在线免费视频| 老色鬼精品视频在线观看播放| 久久男人中文字幕资源站| 99精品偷自拍| 日韩vs国产vs欧美| 国产日韩亚洲欧美综合| 色悠久久久久综合欧美99| 午夜精品免费在线观看| wwwwww.欧美系列| 99久久精品情趣| 日日噜噜夜夜狠狠视频欧美人| 26uuu亚洲婷婷狠狠天堂| www.99精品| 午夜精品久久久久久久久久 | 国产传媒久久文化传媒| 亚洲四区在线观看| 日韩一区二区在线观看视频播放| 国产精品一区二区三区四区| 亚洲欧美日韩在线不卡| 日韩午夜电影在线观看| 成人91在线观看| 日韩精品乱码免费| 欧美韩日一区二区三区| 欧美伦理电影网| 国产成人免费视频网站| 一区二区三区中文字幕| 欧美精品一区二区三区高清aⅴ| 99久久久无码国产精品| 美美哒免费高清在线观看视频一区二区| 国产精品五月天| 宅男在线国产精品| jizzjizzjizz欧美| 免费xxxx性欧美18vr| 亚洲欧洲av在线| 欧美大胆人体bbbb| 在线精品视频一区二区| 国产精品一线二线三线精华| 亚洲国产视频网站| 国产人久久人人人人爽| 欧美老肥妇做.爰bbww| 成人av动漫在线| 蜜桃一区二区三区四区| 一区二区三区四区国产精品| 国产欧美日韩视频一区二区| 欧美久久久久免费| 91蜜桃婷婷狠狠久久综合9色| 久久se这里有精品| 香蕉av福利精品导航| 国产精品免费aⅴ片在线观看| 欧美一区二区三区在| 91美女蜜桃在线| 国产高清久久久久| 久久精品国产亚洲aⅴ| 亚洲三级电影网站| 国产亚洲一区字幕| 日韩免费性生活视频播放| 欧美性一区二区| 成人免费高清视频| 国产自产v一区二区三区c| 日韩不卡免费视频| 亚洲国产日韩a在线播放| 国产精品久久久久国产精品日日| 日韩精品一区二区三区三区免费 | av激情成人网| 国产馆精品极品| 捆绑变态av一区二区三区| 亚洲国产sm捆绑调教视频| 中文字幕字幕中文在线中不卡视频| 久久久久久电影| 欧美不卡123| 日韩三级高清在线| 欧美高清性hdvideosex| 精品视频在线免费看| 91久久精品一区二区三区| 99riav久久精品riav| 高潮精品一区videoshd| 精东粉嫩av免费一区二区三区| 日韩精品国产欧美| 午夜欧美在线一二页| 亚洲成人免费影院| 亚洲va韩国va欧美va| 亚洲第一久久影院| 亚洲一区在线观看网站| 一区二区高清视频在线观看| 亚洲人成电影网站色mp4| 中文字幕在线不卡| 1024国产精品| 亚洲精品中文字幕在线观看| 亚洲欧美aⅴ...| 亚洲激情网站免费观看| 亚洲一区二区免费视频| 亚洲一级二级三级在线免费观看| 亚洲精品乱码久久久久久日本蜜臀| 亚洲素人一区二区| 一区二区高清在线| 亚洲成在线观看| 日一区二区三区| 久久精品国产免费| 国产美女精品人人做人人爽| 国产乱子轮精品视频| 国产99久久久国产精品潘金 | 成人18精品视频| 91丨porny丨国产| 色一区在线观看| 欧美日韩高清一区二区不卡| 91精品视频网| 日韩欧美在线一区二区三区| 欧美xxxx老人做受| 国产片一区二区| 亚洲欧洲无码一区二区三区| 亚洲欧美日韩国产综合在线| 亚洲男同性视频| 亚洲成人你懂的| 久久精品国产99国产| 国产sm精品调教视频网站| 国产成人在线视频网址| 99热在这里有精品免费| 精品视频1区2区| 精品噜噜噜噜久久久久久久久试看 | 精品av久久707| 欧美高清在线精品一区| 亚洲少妇30p| 亚洲国产wwwccc36天堂| 麻豆91在线看| 成人av在线网| 欧美另类变人与禽xxxxx| 欧美精品一区二区三区在线播放| 日本一区二区视频在线观看| 亚洲欧美日本在线| 日本人妖一区二区| 丁香网亚洲国际| 在线视频中文字幕一区二区| 日韩欧美色电影| 国产精品久久毛片av大全日韩| 亚洲一区二区在线视频| 卡一卡二国产精品| 99久久精品一区| 日韩一区二区三区免费观看| 久久久www免费人成精品| 一区二区三区中文字幕在线观看| 另类综合日韩欧美亚洲| 成人高清免费在线播放| 精品视频在线免费看| 久久综合久色欧美综合狠狠| 亚洲精品国产第一综合99久久 | 国产精品996| 一本大道久久a久久精二百| 在线电影院国产精品| 欧美极品美女视频| 午夜精品久久久| 成人免费精品视频| 日韩一区二区三免费高清| 国产精品理论片在线观看| 日本不卡视频在线| 成人av免费在线| 日韩三级av在线播放| 亚洲免费在线播放| 国内外成人在线| 欧美在线综合视频| 久久久蜜桃精品| 香蕉加勒比综合久久| 99久久精品国产一区二区三区| 日韩免费福利电影在线观看| 一区二区三区免费看视频|