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

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

?? stm32f10x_adc.c

?? STM32USART1串口接收程序(中斷方式)
?? C
?? 第 1 頁 / 共 4 頁
字號:
void ADC_InjectedSequencerLengthConfig(ADC_TypeDef* ADCx, u8 Length)
{
  u32 tmpreg1 = 0;
  u8 tmpreg2 = 0;

  /* Check the parameters */
  assert(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 |= (u32)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 or 2 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(IS_ADC_INJECTED_CHANNEL(ADC_InjectedChannel));
  assert(IS_ADC_OFFSET(Offset));  

  /* Set the selected injected channel data offset */
  *((u32 *)((*(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 or 2 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(IS_ADC_INJECTED_CHANNEL(ADC_InjectedChannel));

  /* Returns the selected injected channel conversion data value */
  return (u16) (*(u32*) (((*(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 or 2 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(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 or 2 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(IS_ADC_THRESHOLD(HighThreshold));
  assert(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 or 2 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(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(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 or 2 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(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 or 2 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(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 or 2 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;
  u8 itmask = 0, enablestatus;

  /* Check the parameters */
  assert(IS_ADC_GET_IT(ADC_IT));

  /* Get the ADC IT index */
  itmask = (u8)(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) != (u8)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          : - 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(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 2007 STMicroelectronics *****END OF FILE****/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一级在线| 制服丝袜亚洲精品中文字幕| 日韩国产高清在线| 国产精品天干天干在线综合| 欧美巨大另类极品videosbest | 中文字幕免费不卡| 91麻豆精品国产91久久久久久| 懂色一区二区三区免费观看| 天天综合网 天天综合色| 中文字幕在线免费不卡| 26uuu亚洲综合色欧美| 欧美人牲a欧美精品| 91网址在线看| 成人午夜视频在线| 狠狠色综合日日| 日韩和欧美的一区| 亚洲一区二区三区四区五区中文| 国产婷婷精品av在线| 欧美电影精品一区二区| 777精品伊人久久久久大香线蕉| 99久久99久久精品免费看蜜桃| 国产综合久久久久久久久久久久| 水野朝阳av一区二区三区| 亚洲色欲色欲www| 国产精品女人毛片| 欧美激情一区二区三区不卡| 久久综合国产精品| 欧美大尺度电影在线| 这里只有精品免费| 欧美日韩国产精品自在自线| 91久久奴性调教| 91免费国产在线观看| aaa欧美日韩| 成人av综合一区| 国产**成人网毛片九色 | 69堂国产成人免费视频| 欧美在线免费观看亚洲| 欧美午夜精品一区二区三区| 色综合激情五月| 色香色香欲天天天影视综合网| 99riav一区二区三区| 91啪亚洲精品| 日本道精品一区二区三区| 色屁屁一区二区| 91久久一区二区| 欧美电影一区二区三区| 欧美一区二区三区公司| 精品国精品国产尤物美女| 精品国产一区二区精华| 国产日韩欧美综合一区| 中文字幕+乱码+中文字幕一区| 欧美激情一区二区三区蜜桃视频| 中文字幕视频一区二区三区久| 亚洲少妇屁股交4| 视频一区二区三区入口| 免费成人你懂的| 懂色av一区二区三区免费观看| 成人午夜视频在线观看| 色综合天天综合狠狠| 欧美性大战久久久久久久蜜臀 | 欧美私人免费视频| 在线不卡免费欧美| 欧美精品一区二区三区很污很色的 | 日韩电影在线观看一区| 久久成人免费日本黄色| 国产成人免费视频精品含羞草妖精| 91精品国产综合久久蜜臀| 日韩精品综合一本久道在线视频| 久久婷婷国产综合国色天香| 国产精品国产自产拍高清av王其| 亚洲精品国产无天堂网2021| 欧美a级一区二区| 风间由美性色一区二区三区| 欧美亚洲国产怡红院影院| 日韩免费在线观看| 亚洲欧洲日韩在线| 日韩中文字幕不卡| 成人午夜在线免费| 亚洲视频每日更新| 日本免费在线视频不卡一不卡二| 国产精一品亚洲二区在线视频| 91在线国内视频| 欧美一级日韩不卡播放免费| 国产精品蜜臀av| 日本不卡123| 91在线视频官网| 精品国产污网站| 玉米视频成人免费看| 国产一区二区h| 欧美视频在线观看一区二区| 国产拍欧美日韩视频二区| 亚洲国产精品久久久男人的天堂| 国产乱码精品一区二区三| 欧美在线999| 久久精品在这里| 首页国产欧美久久| av一区二区不卡| 精品日韩在线观看| 亚洲国产一区视频| av中文字幕亚洲| 久久网这里都是精品| 五月婷婷综合网| 99久久免费视频.com| 久久精品在这里| 麻豆91在线观看| 欧美日本一区二区三区四区| 国产精品传媒在线| 国产一区二区女| 日韩欧美的一区二区| 亚洲综合色视频| 91亚洲大成网污www| 欧美激情一区二区三区四区| 免费观看日韩电影| 777奇米成人网| 亚洲最大成人综合| 91啪亚洲精品| 成人免费视频在线观看| 国产91精品露脸国语对白| 欧美成人精品二区三区99精品| 天堂久久一区二区三区| 91国产精品成人| 亚洲视频一区在线观看| av福利精品导航| 欧美国产在线观看| 国产成人精品免费一区二区| 久久久久久久久岛国免费| 久久国产免费看| 日韩三级在线观看| 日韩电影在线观看网站| 日韩一区二区免费在线电影| 日本中文字幕一区二区视频 | 欧美日韩亚洲综合在线| 久久综合九色综合欧美98| 91国产免费观看| 懂色一区二区三区免费观看| 不卡区在线中文字幕| 国产亚洲精品7777| 国产乱对白刺激视频不卡| 欧美α欧美αv大片| 久久国产精品色| 精品久久久久久久人人人人传媒| 秋霞av亚洲一区二区三| 666欧美在线视频| 经典三级一区二区| 久久亚洲私人国产精品va媚药| 国产一区二区美女诱惑| 337p日本欧洲亚洲大胆精品| 国产成人综合网| 国产日韩精品一区二区三区| 国产精品99久久久久久宅男| 中文字幕高清不卡| 91免费国产在线| 亚洲狠狠爱一区二区三区| 制服丝袜国产精品| 国产精品一区二区三区网站| 国产精品免费人成网站| 99精品视频在线播放观看| 一二三区精品福利视频| 欧美久久久久久蜜桃| 久久精品国产亚洲高清剧情介绍| 久久精品亚洲国产奇米99| av一本久道久久综合久久鬼色| 亚洲一二三区不卡| 日韩欧美国产成人一区二区| 国产成人午夜精品5599 | 亚洲精品中文在线影院| 欧美肥妇free| 国产成人激情av| 亚洲一区二区三区激情| 日韩你懂的在线播放| 成人app网站| 天天射综合影视| xfplay精品久久| 色婷婷激情综合| 狠狠v欧美v日韩v亚洲ⅴ| 1024成人网| 日韩精品一区二区三区视频播放| 国产成人综合自拍| 亚洲成人av电影在线| 久久精品夜色噜噜亚洲a∨| 欧美在线视频你懂得| 国产裸体歌舞团一区二区| 一级精品视频在线观看宜春院 | 国产乱淫av一区二区三区| 中文字幕在线播放不卡一区| 欧美日本一区二区三区四区| 国产91精品精华液一区二区三区| 手机精品视频在线观看| 中文字幕综合网| 精品国产乱码久久久久久图片 | 91精品国产91久久综合桃花| 成人看片黄a免费看在线| 日韩精品欧美精品| 专区另类欧美日韩| 久久久国产精华| 欧美日韩国产高清一区二区| 成人免费观看男女羞羞视频| 青青青爽久久午夜综合久久午夜| 亚洲欧美日韩在线不卡| 久久精品人人做人人爽97|