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

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

?? stm32f10x_adc.c

?? STM32SDCardSourceCodeFATFS.rar
?? 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一区二区三区免费野_久草精品视频
日韩一区在线免费观看| 国产麻豆视频精品| 精品国产制服丝袜高跟| 99久久婷婷国产精品综合| 玖玖九九国产精品| 亚洲国产综合人成综合网站| 亚洲天堂网中文字| 欧美欧美欧美欧美首页| 一本色道a无线码一区v| 成人va在线观看| 国产成人午夜视频| 国产精品一区二区男女羞羞无遮挡| 日本伊人色综合网| 亚洲综合免费观看高清完整版| 国产精品区一区二区三区 | 国产精品色噜噜| 精品福利二区三区| 欧美电影免费观看高清完整版| 欧美日本视频在线| 制服丝袜国产精品| 欧美一级夜夜爽| 欧美一级日韩免费不卡| 五月天一区二区三区| 亚洲乱码国产乱码精品精小说 | 亚洲精品在线电影| 中文幕一区二区三区久久蜜桃| 国产精品的网站| 婷婷久久综合九色国产成人| 免费在线成人网| 成人美女视频在线看| 色婷婷亚洲一区二区三区| 欧美精品丝袜中出| 久久色中文字幕| 一区二区三区蜜桃网| 免费日韩伦理电影| 99久久国产综合精品色伊| 欧美日韩亚洲综合在线| 久久久欧美精品sm网站| 亚洲精品免费一二三区| 麻豆免费看一区二区三区| 粉嫩久久99精品久久久久久夜| 在线精品视频免费播放| 日韩女优av电影在线观看| 国产清纯白嫩初高生在线观看91 | 欧美日本精品一区二区三区| 国产欧美一区二区精品仙草咪| 一区二区三区资源| 国产在线一区二区综合免费视频| 色噜噜狠狠色综合中国| 国产午夜精品一区二区| 日本欧美在线看| 在线精品视频小说1| 亚洲国产经典视频| 欧美a级理论片| 欧美视频在线不卡| 日韩理论片网站| 成人美女视频在线观看18| 精品国精品国产| 日本不卡一二三区黄网| 91成人国产精品| 亚洲丝袜自拍清纯另类| 韩国av一区二区三区| 欧美三级中文字幕在线观看| 中文字幕一区二区三区四区| 国产精品77777竹菊影视小说| 日韩午夜av一区| 亚洲v中文字幕| 在线免费视频一区二区| 一区二区三区精品在线观看| 91丨九色丨黑人外教| √…a在线天堂一区| 国产99一区视频免费| 久久久久久久久岛国免费| 久久99在线观看| 精品国产乱码久久久久久久久| 日韩av不卡在线观看| 7777精品伊人久久久大香线蕉的| 午夜天堂影视香蕉久久| 91精品免费观看| 麻豆91小视频| 久久免费电影网| 国产成人免费视频精品含羞草妖精| 精品福利一二区| 高潮精品一区videoshd| 国产精品妹子av| 色综合久久六月婷婷中文字幕| 亚洲丝袜另类动漫二区| 91福利小视频| 日韩福利视频导航| 精品成人私密视频| 国产不卡免费视频| 亚洲欧美一区二区久久| 欧美日韩国产综合一区二区三区| 偷拍一区二区三区| 精品国产免费一区二区三区香蕉 | 国产精品网站在线播放| 国产.精品.日韩.另类.中文.在线.播放| 337p粉嫩大胆噜噜噜噜噜91av| 国产伦精品一区二区三区免费| 久久美女艺术照精彩视频福利播放| 丁香天五香天堂综合| 亚洲日本韩国一区| 欧美精品日韩精品| 国模一区二区三区白浆 | 91福利视频久久久久| 亚洲国产精品欧美一二99| 日韩一级二级三级精品视频| 国产 日韩 欧美大片| 亚洲一区二三区| 精品福利av导航| 在线观看日韩精品| 精品午夜久久福利影院| 亚洲激情中文1区| 久久精品视频在线看| 91国产精品成人| 国产成人精品www牛牛影视| 亚洲最新视频在线观看| 久久久久久久电影| 在线观看91av| 91视频在线观看| 狠狠色狠狠色综合系列| 一区二区三区波多野结衣在线观看 | 中文字幕av一区二区三区高| 欧美日韩三级一区二区| 成人高清免费观看| 久久国产精品99久久久久久老狼| 亚洲欧美另类图片小说| 精品乱码亚洲一区二区不卡| 91精彩视频在线观看| 国产精品69久久久久水密桃| 日韩av一区二区在线影视| 亚洲视频中文字幕| 欧美激情一区在线| 精品国产乱子伦一区| 精品视频在线看| 91亚洲精品一区二区乱码| 精品一区二区在线免费观看| 亚洲高清视频中文字幕| 亚洲精选视频在线| 中日韩免费视频中文字幕| 精品国产伦一区二区三区观看方式| 欧美猛男gaygay网站| 91福利在线观看| 91福利在线导航| 在线免费观看视频一区| 色视频一区二区| 91色视频在线| 日本道色综合久久| 欧美一a一片一级一片| 99精品国产91久久久久久| www.66久久| 一本大道久久a久久精二百 | 日本午夜一区二区| 亚洲制服丝袜在线| 亚洲免费在线播放| 日韩一区在线免费观看| 亚洲视频免费看| 亚洲综合自拍偷拍| 亚洲成人你懂的| 视频一区二区中文字幕| 日产国产高清一区二区三区| 日产国产高清一区二区三区| 日本最新不卡在线| 狠狠狠色丁香婷婷综合激情| 国产成人8x视频一区二区| 成人午夜在线免费| 91浏览器在线视频| 欧美精品在线一区二区| 欧美成人精品3d动漫h| 欧美tickling挠脚心丨vk| 337p日本欧洲亚洲大胆色噜噜| 久久九九99视频| 亚洲欧美偷拍卡通变态| 亚洲一二三专区| 另类中文字幕网| 成人午夜碰碰视频| 色婷婷综合久久| 日韩欧美综合在线| 国产精品午夜电影| 亚洲二区在线观看| 国产在线视频一区二区| 成人av电影免费在线播放| 色老汉一区二区三区| 日韩色视频在线观看| 国产午夜精品福利| 夜夜嗨av一区二区三区网页| 精品在线观看视频| 91浏览器打开| 亚洲精品一区二区三区影院| 亚洲少妇30p| 国产麻豆精品在线| 精品视频免费在线| 久久精子c满五个校花| 亚洲最大的成人av| 国产精品一区久久久久| 欧美视频中文一区二区三区在线观看| 久久久久久久久久久久久久久99| 夜夜嗨av一区二区三区| 国产精品中文字幕一区二区三区| 在线看不卡av|