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

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

?? stm32f10x_adc.c

?? 萬利開發板上的lcd例程
?? 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| 国产亚洲自拍一区| 五月婷婷综合激情| 国产精品一二二区| 欧美精品色一区二区三区| 国产精品麻豆网站| 国内精品免费**视频| 欧美日韩一区二区三区四区 | 欧美一区二区三区在线观看视频| 国产欧美一二三区| 日韩不卡免费视频| 欧美日韩日日夜夜| 亚洲靠逼com| 丁香婷婷综合激情五月色| 日韩一区二区三区在线观看| 一区二区视频在线看| jlzzjlzz欧美大全| 国产欧美日韩精品在线| 蜜臀久久久99精品久久久久久| 日本韩国视频一区二区| 中文字幕一区二区三区四区 | wwwwxxxxx欧美| 美腿丝袜亚洲一区| 91精选在线观看| 午夜精品久久一牛影视| 欧美在线制服丝袜| 亚洲成av人片在线观看| 欧美中文字幕久久| 亚洲国产欧美在线| 在线免费观看日本欧美| 亚洲一级在线观看| 欧美日韩成人一区| 水野朝阳av一区二区三区| 欧美日韩国产在线播放网站| 亚洲成人资源网| 欧美日韩免费观看一区三区| 亚洲国产综合色| 欧美视频在线一区| 日韩av一级片| 精品99久久久久久| 国产ts人妖一区二区| 国产日韩欧美一区二区三区乱码| 国产成人精品在线看| 中文字幕制服丝袜成人av| 99国产精品久久久| 亚洲午夜影视影院在线观看| 欧美乱熟臀69xxxxxx| 狂野欧美性猛交blacked| 精品国产一区二区三区久久久蜜月| 久草精品在线观看| 国产精品沙发午睡系列990531| 一本在线高清不卡dvd| 亚洲一本大道在线| 精品免费一区二区三区| 成人亚洲精品久久久久软件| 亚洲三级在线观看| 免费观看在线综合| 欧美精品粉嫩高潮一区二区| 另类小说综合欧美亚洲| 国产精品剧情在线亚洲| 欧美日韩黄色影视| 国产高清在线精品| 亚洲一二三专区| 久久一区二区视频| 欧美网站大全在线观看| 久久99久久精品欧美| 亚洲欧美综合另类在线卡通| 欧美肥妇bbw| www.日韩av| 另类调教123区| 亚洲人成人一区二区在线观看| 91精品啪在线观看国产60岁| 成人午夜免费av| 日韩高清电影一区| 亚洲欧美电影一区二区| 精品国产乱码久久久久久免费| 北条麻妃国产九九精品视频| 免费看欧美女人艹b| 一区二区三区在线视频播放| 精品国产乱码91久久久久久网站| 在线观看视频一区二区| 国产福利一区二区三区视频在线| 亚洲自拍另类综合| 国产精品免费视频观看| 欧美大片国产精品| 欧美婷婷六月丁香综合色| 不卡的av在线播放| 精品一区二区免费在线观看| 亚洲精品欧美综合四区| 国产女人aaa级久久久级| 欧美一级免费大片| 欧美日韩一区二区三区免费看| 丁香啪啪综合成人亚洲小说 | 亚洲自拍偷拍网站| 国产女人18毛片水真多成人如厕| 91麻豆精品91久久久久同性| 欧洲一区二区三区在线| 不卡一区在线观看| 国产成人在线视频免费播放| 久久se精品一区二区| 首页国产欧美久久| 亚洲在线视频免费观看| 又紧又大又爽精品一区二区| 亚洲欧洲精品一区二区三区 | 99国产精品久| 成人综合在线网站| 国产成人av电影在线观看| 国模娜娜一区二区三区| 九九**精品视频免费播放| 蜜桃传媒麻豆第一区在线观看| 亚洲444eee在线观看| 亚洲成人综合视频| 日韩精品一二三| 日韩精品一级中文字幕精品视频免费观看| 色狠狠av一区二区三区| 色呦呦日韩精品| 日本韩国欧美国产| 91蜜桃网址入口| 欧美亚一区二区| 欧美日韩高清一区| 欧美一区二区免费观在线| 欧美大片拔萝卜| 久久综合网色—综合色88| 国产欧美一区二区三区在线看蜜臀 | 欧美成人aa大片| 精品国产伦一区二区三区观看方式 | 国产精品久久久久婷婷二区次| 国产日本欧美一区二区| 中文字幕一区二区三中文字幕| 国产精品国产三级国产普通话蜜臀| 国产精品福利av| 亚洲成人av电影在线| 日本在线观看不卡视频| 另类中文字幕网| 成人激情综合网站| 91国产免费看| 日韩一二三区视频| 中文字幕国产一区| 亚洲国产一区二区三区| 免费不卡在线观看| 粉嫩嫩av羞羞动漫久久久| 色婷婷av一区二区三区gif| 欧美丰满嫩嫩电影| 精品少妇一区二区三区视频免付费| 久久久www免费人成精品| 最新国产成人在线观看| 亚洲国产综合色| 国产成人免费视频一区| 欧美午夜精品电影| 精品美女一区二区三区| **性色生活片久久毛片| 男人的天堂久久精品| av亚洲精华国产精华精华| 欧美午夜精品理论片a级按摩| 日韩美一区二区三区| 一区二区三区在线观看欧美| 精品一区二区三区av| 欧美亚洲图片小说| 久久综合中文字幕| 五月婷婷激情综合| 成人avav影音| 精品国精品国产| 亚洲国产综合人成综合网站| 粉嫩嫩av羞羞动漫久久久| 在线成人午夜影院| 亚洲视频在线观看三级| 国产综合久久久久影院| 欧美日本精品一区二区三区| 国产欧美日韩在线观看| 久久成人免费网站| 欧美日韩小视频| 亚洲欧美综合色| 国产激情一区二区三区四区| 欧美日韩成人综合| 亚洲精品国产无套在线观| 国产精品中文有码| 日韩欧美国产午夜精品| 亚洲高清一区二区三区| 成人美女视频在线观看| 久久综合999| 美女mm1313爽爽久久久蜜臀| 欧美日韩一级二级三级| 一区二区三国产精华液| av电影在线观看一区| 久久精品亚洲麻豆av一区二区| 免费人成黄页网站在线一区二区| 欧美日韩国产系列| 亚洲图片欧美色图| 在线视频你懂得一区| 亚洲欧洲国产日韩| 国产91精品入口| 国产欧美日韩麻豆91| 国产激情精品久久久第一区二区 | 国产精品羞羞答答xxdd | 在线不卡一区二区| 亚洲va欧美va天堂v国产综合| 色欧美日韩亚洲| 亚洲在线观看免费|