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

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

?? stm32f10x_adc.c

?? ucos2.86版本結合STM板極支持包
?? 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一区二区三区免费野_久草精品视频
亚洲毛片av在线| 欧美一区二区在线观看| 欧洲精品在线观看| 6080亚洲精品一区二区| 欧美精品一区视频| ...xxx性欧美| 日本午夜精品一区二区三区电影| 国产一区在线不卡| 在线观看亚洲一区| 日韩欧美国产1| 亚洲黄色在线视频| 国产乱码一区二区三区| 在线亚洲一区观看| xnxx国产精品| 亚洲午夜激情av| 国产盗摄一区二区| 欧美日韩一区二区三区在线看| 精品久久一区二区三区| 亚洲免费观看视频| 国产一区二区三区观看| 欧美日韩一区在线| 国产精品久久久久桃色tv| 日本最新不卡在线| 色成年激情久久综合| 久久久久久久久免费| 成人av在线资源| 日韩亚洲欧美在线| 一区二区三区欧美视频| 国产河南妇女毛片精品久久久| 欧美在线短视频| 国产欧美日韩不卡| 麻豆成人综合网| 欧美性欧美巨大黑白大战| 中文字幕av不卡| 极品少妇一区二区| 欧美女孩性生活视频| 亚洲女同一区二区| 丁香婷婷综合网| 欧美xxxxx裸体时装秀| 亚洲成人黄色影院| 91麻豆视频网站| 欧美国产日本韩| 国产一区二区三区av电影| 欧美年轻男男videosbes| 一区二区在线观看视频在线观看| 国产999精品久久久久久| 日韩一二三区视频| 日韩黄色一级片| 欧美日韩在线精品一区二区三区激情 | 久久久久久久综合狠狠综合| 水蜜桃久久夜色精品一区的特点| 91麻豆国产自产在线观看| 欧美激情一二三区| 国产综合一区二区| 欧美变态口味重另类| 蜜桃视频一区二区| 日韩一区二区电影网| 日韩国产高清在线| 欧美日韩精品系列| 婷婷成人激情在线网| 欧美视频在线观看一区二区| 一区二区三区在线观看欧美| 91在线观看成人| 亚洲免费观看高清完整版在线观看熊| voyeur盗摄精品| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 欧美一区二区三区在线观看视频| 夜夜精品视频一区二区| 色偷偷成人一区二区三区91| 自拍偷在线精品自拍偷无码专区| av成人动漫在线观看| 国产精品你懂的在线| 成人久久视频在线观看| 国产三级精品三级在线专区| 成人一区二区三区视频在线观看| 国产欧美视频一区二区| 成人性视频免费网站| 欧美激情一区二区三区| 成人开心网精品视频| 亚洲天堂精品视频| 国产精品视频yy9299一区| 国产精品白丝jk黑袜喷水| 久久综合狠狠综合久久激情| 国产在线精品一区二区| 久久久久国产精品麻豆ai换脸| 国产精品1区2区| 国产精品色在线| 99国产精品久久久久久久久久久| 亚洲欧美另类小说视频| 欧美日韩一级二级三级| 久久草av在线| 欧美激情一区二区三区不卡| av动漫一区二区| 亚洲成人动漫精品| 日韩午夜精品视频| 国产成人自拍在线| 亚洲青青青在线视频| 91福利视频在线| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美精品一区二区三区在线| 国产成人三级在线观看| 亚洲精品成人少妇| 555www色欧美视频| 国产在线视视频有精品| 国产精品久久久久久久久动漫| 91丨porny丨在线| 午夜亚洲国产au精品一区二区| 日韩欧美一二三区| 99国产精品一区| 日韩成人一区二区| 国产三级欧美三级| 欧美视频在线播放| 国产综合久久久久影院| 亚洲婷婷国产精品电影人久久| 欧美日韩国产色站一区二区三区| 久久精品国产亚洲一区二区三区| 国产欧美一区视频| 欧美亚洲综合另类| 国产九色sp调教91| 亚洲.国产.中文慕字在线| 久久丝袜美腿综合| 在线国产亚洲欧美| 国产精品影视网| 亚洲一区二三区| 国产偷国产偷精品高清尤物| 在线看国产一区| 韩国欧美国产一区| 亚洲国产中文字幕| 久久精品视频在线看| 欧美日韩精品一二三区| 成人综合激情网| 免费视频最近日韩| 一区二区三区视频在线观看| 久久这里都是精品| 一个色在线综合| 久久综合国产精品| 欧美日韩精品免费| 成人国产精品免费网站| 另类中文字幕网| 一区2区3区在线看| 中文字幕不卡在线| 日韩一级免费观看| 欧美中文一区二区三区| 成人污污视频在线观看| 六月丁香综合在线视频| 亚洲高清三级视频| 中文字幕在线播放不卡一区| 2024国产精品| 4438x亚洲最大成人网| 色婷婷精品大视频在线蜜桃视频| 久久精品二区亚洲w码| 亚洲国产精品久久一线不卡| 国产精品国产三级国产aⅴ入口| 精品国产不卡一区二区三区| 欧美猛男超大videosgay| 91原创在线视频| 东方欧美亚洲色图在线| 国产麻豆精品theporn| 奇米色一区二区三区四区| 1024成人网| 国产精品乱人伦中文| 久久九九久精品国产免费直播| 欧美一级一区二区| 欧美日韩一区二区三区四区五区 | 18欧美乱大交hd1984| 久久无码av三级| 欧美日韩成人在线| 欧美影视一区二区三区| 色丁香久综合在线久综合在线观看| www.综合网.com| 国产成人午夜片在线观看高清观看| 久久99国产精品免费| 日本亚洲电影天堂| 日本欧美韩国一区三区| 亚洲bt欧美bt精品| 亚洲电影一级黄| 亚洲自拍偷拍av| 亚洲成人精品影院| 石原莉奈在线亚洲二区| 天天综合天天做天天综合| 亚洲chinese男男1069| 午夜国产精品影院在线观看| 一个色在线综合| 亚洲一区二区三区国产| 午夜影院久久久| 午夜视频在线观看一区二区| 午夜精品一区二区三区三上悠亚| 亚洲一线二线三线久久久| 亚洲一区二区偷拍精品| 亚洲h在线观看| 日韩中文欧美在线| 狂野欧美性猛交blacked| 韩国av一区二区| 国产福利视频一区二区三区| 成人一区二区三区视频在线观看| 成人激情电影免费在线观看| 91亚洲精品久久久蜜桃网站| 91久久人澡人人添人人爽欧美| 在线欧美一区二区| 亚洲综合图片区|