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

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

?? stm32f10x_adc.c

?? 基于STM32的數(shù)碼相冊(cè).rar
?? C
?? 第 1 頁 / 共 4 頁
字號(hào):
* Function Name  : ADC_InjectedSequencerLengthConfig
* Description    : Configures the sequencer length for injected channels
* Input          : - ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
*                  - Length: The sequencer length. 
*                    This parameter must be a number between 1 to 4.
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_InjectedSequencerLengthConfig(ADC_TypeDef* ADCx, u8 Length)
{
  u32 tmpreg1 = 0;
  u32 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;
}

/*******************************************************************************
* Function Name  : ADC_SetInjectedOffset
* Description    : Set the injected channels conversion value offset
* Input          : - ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
*                  - ADC_InjectedChannel: the ADC injected channel to set its
*                    offset. 
*                    This parameter can be one of the following values:
*                       - ADC_InjectedChannel_1: Injected Channel1 selected
*                       - ADC_InjectedChannel_2: Injected Channel2 selected
*                       - ADC_InjectedChannel_3: Injected Channel3 selected
*                       - ADC_InjectedChannel_4: Injected Channel4 selected
*                  - Offset: the offset value for the selected ADC injected channel
*                    This parameter must be a 12bit value.
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_SetInjectedOffset(ADC_TypeDef* ADCx, u8 ADC_InjectedChannel, u16 Offset)
{
  /* Check the parameters */
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_INJECTED_CHANNEL(ADC_InjectedChannel));
  assert_param(IS_ADC_OFFSET(Offset));  

  /* Set the selected injected channel data offset */
  *((vu32 *)((*(u32*)&ADCx) + ADC_InjectedChannel)) = (u32)Offset;
}

/*******************************************************************************
* Function Name  : ADC_GetInjectedConversionValue
* Description    : Returns the ADC injected channel conversion result
* Input          : - ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
*                  - ADC_InjectedChannel: the converted ADC injected channel.
*                    This parameter can be one of the following values:
*                       - ADC_InjectedChannel_1: Injected Channel1 selected
*                       - ADC_InjectedChannel_2: Injected Channel2 selected
*                       - ADC_InjectedChannel_3: Injected Channel3 selected
*                       - ADC_InjectedChannel_4: Injected Channel4 selected
* Output         : None
* Return         : The Data conversion value.
*******************************************************************************/
u16 ADC_GetInjectedConversionValue(ADC_TypeDef* ADCx, u8 ADC_InjectedChannel)
{
  /* Check the parameters */
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_INJECTED_CHANNEL(ADC_InjectedChannel));

  /* Returns the selected injected channel conversion data value */
  return (u16) (*(vu32*) (((*(u32*)&ADCx) + ADC_InjectedChannel + JDR_Offset)));
}

/*******************************************************************************
* Function Name  : ADC_AnalogWatchdogCmd
* Description    : Enables or disables the analog watchdog on single/all regular
*                  or injected channels
* Input          : - ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
*                  - ADC_AnalogWatchdog: the ADC analog watchdog configuration.
*                    This parameter can be one of the following values:
*                       - ADC_AnalogWatchdog_SingleRegEnable: Analog watchdog on
*                         a single regular channel
*                       - ADC_AnalogWatchdog_SingleInjecEnable: Analog watchdog on
*                         a single injected channel
*                       - ADC_AnalogWatchdog_SingleRegOrInjecEnable: Analog 
*                         watchdog on a single regular or injected channel
*                       - ADC_AnalogWatchdog_AllRegEnable: Analog watchdog on
*                         all regular channel
*                       - ADC_AnalogWatchdog_AllInjecEnable: Analog watchdog on
*                         all injected channel
*                       - ADC_AnalogWatchdog_AllRegAllInjecEnable: Analog watchdog
*                         on all regular and injected channels
*                       - ADC_AnalogWatchdog_None: No channel guarded by the
*                         analog watchdog
* Output         : None
* Return         : None	  
*******************************************************************************/
void ADC_AnalogWatchdogCmd(ADC_TypeDef* ADCx, u32 ADC_AnalogWatchdog)
{
  u32 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;
}

/*******************************************************************************
* Function Name  : ADC_AnalogWatchdogThresholdsConfig
* Description    : Configures the high and low thresholds of the analog watchdog.
* Input          : - ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
*                  - HighThreshold: the ADC analog watchdog High threshold value.
*                    This parameter must be a 12bit value.
*                  - LowThreshold: the ADC analog watchdog Low threshold value.
*                    This parameter must be a 12bit value.
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_AnalogWatchdogThresholdsConfig(ADC_TypeDef* ADCx, u16 HighThreshold,
                                        u16 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;
}

/*******************************************************************************
* Function Name  : ADC_AnalogWatchdogSingleChannelConfig
* Description    : Configures the analog watchdog guarded single channel
* Input          : - ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
*                  - ADC_Channel: the ADC channel to configure for the analog
*                    watchdog. 
*                    This parameter can be one of the following values:
*                       - ADC_Channel_0: ADC Channel0 selected
*                       - ADC_Channel_1: ADC Channel1 selected
*                       - ADC_Channel_2: ADC Channel2 selected
*                       - ADC_Channel_3: ADC Channel3 selected
*                       - ADC_Channel_4: ADC Channel4 selected
*                       - ADC_Channel_5: ADC Channel5 selected
*                       - ADC_Channel_6: ADC Channel6 selected
*                       - ADC_Channel_7: ADC Channel7 selected
*                       - ADC_Channel_8: ADC Channel8 selected
*                       - ADC_Channel_9: ADC Channel9 selected
*                       - ADC_Channel_10: ADC Channel10 selected
*                       - ADC_Channel_11: ADC Channel11 selected
*                       - ADC_Channel_12: ADC Channel12 selected
*                       - ADC_Channel_13: ADC Channel13 selected
*                       - ADC_Channel_14: ADC Channel14 selected
*                       - ADC_Channel_15: ADC Channel15 selected
*                       - ADC_Channel_16: ADC Channel16 selected
*                       - ADC_Channel_17: ADC Channel17 selected
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_AnalogWatchdogSingleChannelConfig(ADC_TypeDef* ADCx, u8 ADC_Channel)
{
  u32 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;
}

/*******************************************************************************
* Function Name  : ADC_TempSensorVrefintCmd
* Description    : Enables or disables the temperature sensor and Vrefint channel.
* Input          : - NewState: new state of the temperature sensor.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : 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;
  }
}

/*******************************************************************************
* Function Name  : ADC_GetFlagStatus
* Description    : Checks whether the specified ADC flag is set or not.
* Input          : - ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
*                  - ADC_FLAG: specifies the flag to check. 
*                    This parameter can be one of the following values:
*                       - ADC_FLAG_AWD: Analog watchdog flag
*                       - ADC_FLAG_EOC: End of conversion flag
*                       - ADC_FLAG_JEOC: End of injected group conversion flag
*                       - ADC_FLAG_JSTRT: Start of injected group conversion flag
*                       - ADC_FLAG_STRT: Start of regular group conversion flag
* Output         : None
* Return         : The new state of ADC_FLAG (SET or RESET).
*******************************************************************************/
FlagStatus ADC_GetFlagStatus(ADC_TypeDef* ADCx, u8 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) != (u8)RESET)
  {
    /* ADC_FLAG is set */
    bitstatus = SET;
  }
  else
  {
    /* ADC_FLAG is reset */
    bitstatus = RESET;
  }

  /* Return the ADC_FLAG status */
  return  bitstatus;
}

/*******************************************************************************
* Function Name  : ADC_ClearFlag
* Description    : Clears the ADCx's pending flags.
* Input          : - ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
*                  - ADC_FLAG: specifies the flag to clear. 
*                    This parameter can be any combination of the following values:
*                       - ADC_FLAG_AWD: Analog watchdog flag
*                       - ADC_FLAG_EOC: End of conversion flag
*                       - ADC_FLAG_JEOC: End of injected group conversion flag
*                       - ADC_FLAG_JSTRT: Start of injected group conversion flag
*                       - ADC_FLAG_STRT: Start of regular group conversion flag
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_ClearFlag(ADC_TypeDef* ADCx, u8 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 = ~(u32)ADC_FLAG;
}

/*******************************************************************************
* Function Name  : ADC_GetITStatus
* Description    : Checks whether the specified ADC interrupt has occurred or not.
* Input          : - ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
*                  - ADC_IT: specifies the ADC interrupt source to check. 
*                    This parameter can be one of the following values:
*                       - ADC_IT_EOC: End of conversion interrupt mask
*                       - ADC_IT_AWD: Analog watchdog interrupt mask
*                       - ADC_IT_JEOC: End of injected conversion interrupt mask
* Output         : None
* Return         : The new state of ADC_IT (SET or RESET).
*******************************************************************************/
ITStatus ADC_GetITStatus(ADC_TypeDef* ADCx, u16 ADC_IT)
{
  ITStatus bitstatus = RESET;
  u32 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 & (u8)ADC_IT) ;

  /* Check the status of the specified ADC interrupt */
  if (((ADCx->SR & itmask) != (u32)RESET) && enablestatus)
  {
    /* ADC_IT is set */
    bitstatus = SET;
  }
  else
  {
    /* ADC_IT is reset */
    bitstatus = RESET;
  }

  /* Return the ADC_IT status */
  return  bitstatus;
}

/*******************************************************************************
* Function Name  : ADC_ClearITPendingBit
* Description    : Clears the ADCx抯 interrupt pending bits.
* Input          : - ADCx: where x can be 1, 2 or 3 to select the ADC peripheral.
*                  - ADC_IT: specifies the ADC interrupt pending bit to clear.
*                    This parameter can be any combination of the following values:
*                       - ADC_IT_EOC: End of conversion interrupt mask
*                       - ADC_IT_AWD: Analog watchdog interrupt mask
*                       - ADC_IT_JEOC: End of injected conversion interrupt mask
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_ClearITPendingBit(ADC_TypeDef* ADCx, u16 ADC_IT)
{
  u8 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 = (u8)(ADC_IT >> 8);

  /* Clear the selected ADC interrupt pending bits */
  ADCx->SR = ~(u32)itmask;
}

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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看日韩国产| 欧美一级黄色片| 精品视频全国免费看| 欧美情侣在线播放| 国产日韩欧美综合一区| 亚洲免费观看高清完整版在线观看熊| 一区二区三区久久| 精品一区二区三区日韩| 色欲综合视频天天天| 欧美一级二级三级乱码| 国产精品久久久久7777按摩 | 国产91精品欧美| 欧美午夜精品免费| 日韩视频免费观看高清完整版在线观看 | 久久一区二区三区四区| 国产精品乱子久久久久| 日韩精品欧美精品| 成人av影院在线| 欧美日韩精品一区二区三区| 久久久午夜精品理论片中文字幕| 一区二区三区国产精品| 精品在线一区二区| 91福利社在线观看| 久久婷婷国产综合精品青草| 亚洲精品自拍动漫在线| 久久99精品一区二区三区三区| 99re热这里只有精品免费视频 | 久久精品国产77777蜜臀| 成人av中文字幕| 日韩一区二区三区精品视频| 亚洲男人的天堂一区二区| 在线视频你懂得一区| 欧美成人乱码一区二区三区| 欧美亚洲一区三区| 日本一区二区三区四区在线视频| 午夜成人免费视频| 99久久精品国产毛片| 精品国产91九色蝌蚪| 亚洲第一二三四区| 99视频超级精品| 久久五月婷婷丁香社区| 日本一道高清亚洲日美韩| 99re在线视频这里只有精品| 久久这里只有精品6| 婷婷开心激情综合| 色哟哟国产精品| 国产精品午夜电影| 激情综合色综合久久综合| 欧美日韩精品一区二区三区蜜桃 | 国内精品国产三级国产a久久| 欧美午夜精品一区二区三区| 日韩理论在线观看| 国产成人精品综合在线观看 | 欧美一级二级三级蜜桃| 蜜乳av一区二区| 欧美亚洲国产一区二区三区va| 国产精品天天摸av网| 韩国中文字幕2020精品| 91麻豆精品国产91久久久更新时间| 一区二区日韩av| 91毛片在线观看| 国产精品久久二区二区| 成人av在线播放网址| 中文av一区二区| 国产91色综合久久免费分享| 国产欧美一区二区精品忘忧草| 精品一区二区在线观看| 26uuu国产一区二区三区| 九色|91porny| 久久久久久**毛片大全| 狠狠色狠狠色综合| 久久无码av三级| 91搞黄在线观看| 亚洲女女做受ⅹxx高潮| 欧美自拍丝袜亚洲| 亚洲国产成人av好男人在线观看| 欧美午夜理伦三级在线观看| 亚洲福利国产精品| 在线不卡的av| 美女性感视频久久| 精品久久久久久久人人人人传媒| 国产一区二区不卡| 中国av一区二区三区| 亚洲婷婷综合久久一本伊一区| 国产精品影音先锋| 国产欧美综合在线观看第十页| 国产精品系列在线观看| 国产精品免费视频观看| 色哟哟日韩精品| 亚洲狠狠爱一区二区三区| 欧美精品色一区二区三区| 免费观看在线色综合| 久久久99精品免费观看不卡| 成人免费电影视频| 樱花影视一区二区| 8x8x8国产精品| 精品亚洲国产成人av制服丝袜| 久久先锋资源网| 97se亚洲国产综合自在线不卡 | 一本一道久久a久久精品综合蜜臀 一本一道综合狠狠老 | 天天色综合成人网| 精品久久久影院| 成人av在线播放网址| 亚洲成人黄色影院| 欧美精品一区男女天堂| 99久久婷婷国产综合精品电影| 亚洲夂夂婷婷色拍ww47 | 国产黄色精品视频| 精品国产91久久久久久久妲己| 国精产品一区一区三区mba视频 | 91成人看片片| 日本在线不卡视频| 国产精品系列在线| 欧美精品在线视频| 高清成人免费视频| 一个色妞综合视频在线观看| 日韩三级在线免费观看| 99视频国产精品| 美女诱惑一区二区| 亚洲日本韩国一区| 精品国产一区二区三区久久久蜜月 | 亚洲精品一线二线三线 | 亚洲va欧美va人人爽| 26uuu色噜噜精品一区| 在线亚洲一区二区| 蜜桃久久久久久久| 亚洲免费在线观看| 日韩精品中文字幕一区| 色综合激情久久| 国产一区二区三区在线看麻豆| 亚洲精品第1页| 国产色婷婷亚洲99精品小说| 欧美日韩国产美| av在线不卡网| 精品亚洲免费视频| 亚洲成av人片一区二区梦乃| 免费成人在线观看视频| 国产精品卡一卡二卡三| 91精品国产综合久久精品性色| thepron国产精品| 九九精品视频在线看| 亚洲福利视频一区| 亚洲欧洲av色图| 久久综合九色综合97婷婷女人| 欧美日本韩国一区二区三区视频| 成人动漫精品一区二区| 国产一区激情在线| 石原莉奈在线亚洲二区| 亚洲男人天堂一区| 国产欧美精品国产国产专区| 欧美一区二区三区视频在线观看 | 免费欧美日韩国产三级电影| 亚洲伦理在线精品| 国产精品美女久久久久高潮| 久久综合九色综合97_久久久| 欧美人动与zoxxxx乱| 在线观看日韩一区| 91理论电影在线观看| 国产成人在线看| 精品夜夜嗨av一区二区三区| 男人的天堂久久精品| 亚洲成人午夜影院| 一二三四区精品视频| 日韩一区日韩二区| 国产精品久久久久久久久免费相片 | 麻豆高清免费国产一区| 日韩高清在线不卡| 午夜精品久久一牛影视| 一区二区欧美视频| 亚洲欧美另类在线| 亚洲视频免费观看| 最新欧美精品一区二区三区| 欧美激情一区二区三区| 国产午夜一区二区三区| 久久香蕉国产线看观看99| 久久尤物电影视频在线观看| 欧美tickling挠脚心丨vk| 欧美不卡激情三级在线观看| 精品久久久三级丝袜| 欧美第一区第二区| 精品福利av导航| 久久亚洲免费视频| 国产偷国产偷精品高清尤物| 日本一区二区视频在线观看| 欧美—级在线免费片| 国产精品国产a| 中文字幕一区二区不卡| 亚洲欧美一区二区三区久本道91| 日韩伦理av电影| 一区二区三区不卡视频| 爽爽淫人综合网网站| 首页国产欧美久久| 琪琪久久久久日韩精品| 麻豆精品视频在线观看| 国内精品国产成人| 粉嫩欧美一区二区三区高清影视| 成人av免费在线| 欧美亚洲日本一区| 91精品国产综合久久精品app| 日韩欧美国产一区二区三区 |