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

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

?? 75x_adc.c

?? freertosV4.40 是一種small的嵌入式系統。利于嵌入式開好者入門學習嵌入式操作系統。通過對于源碼的學習可以很好的掌握freertos的運行機制。
?? C
?? 第 1 頁 / 共 3 頁
字號:
    return SET;
  }
  else
  {
    /* Return RESET if ADC Conversion is stopped */
    return RESET;
  }
}

/*******************************************************************************
* Function Name  : ADC_Cmd
* Description    : Enables the ADC peripheral or puts it in power down mode.
*                  - NewState: new state of the ADC peripheral. 
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None  
* Return         : None.
*******************************************************************************/
void ADC_Cmd(FunctionalState NewState)
{
  if (NewState == DISABLE)
  {
    /* Enable ADC Power Down Mode */
    ADC->CLR4 |= ADC_PowerDown_Enable;
  }
  else
  {
    /* Disable ADC Power Down Mode */
    ADC->CLR4 &= ADC_PowerDown_Disable;
  }
}

/*******************************************************************************
* Function Name  : ADC_AutoClockOffConfig                                
* Description    : Enables or disables the Auto clock off feature.
*                  - NewState: new state of the Auto clock off feature. This 
*                    parameter can be: ENABLE or DISABLE.  
* Output         : None   
* Return         : None.                                                 
*******************************************************************************/
void ADC_AutoClockOffConfig(FunctionalState NewState)
{
  if (NewState == ENABLE)
  {
    /* Enable ADC Auto Clock Off */
    ADC->CLR4 |= ADC_AutoClockOff_Enable;
  }
  else
  {
    /* Disable ADC Auto Clock Off */
    ADC->CLR4 &= ADC_AutoClockOff_Disable;
  }
}

/*******************************************************************************
* Function Name  : ADC_AnalogWatchdogConfig                                       
* Description    : Configures the analog input channel to be used for the selected
*                  Analog Watchdog and defines its corresponding High and Low 
*                  threshold values.               
* Input          : - ADC_AnalogWatchdog: specifies the analog watchdog which will
*                    be affected to the desired converted channel. This parameter
*                    can be one of the following values: 
*                     - ADC_AnalogWatchdog0: select analog watchdog 0
*                     - ADC_AnalogWatchdog1: select analog watchdog 1
*                     - ADC_AnalogWatchdog2: select analog watchdog 2
*                     - ADC_AnalogWatchdog3: select analog watchdog 3
*                  - ADC_CHANNEL: specifies the channel linked to the selected 
*                    analog watchdog. This parameter can be ADC_CHANNELx where x 
*                    can be (0..15)                    
*                  - LowThreshold: Low Threshold for the selected Analog watchdog
*                  - HighThreshold: High Threshold for the selected Analog watchdog
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_AnalogWatchdogConfig(u16 ADC_AnalogWatchdog, u8 ADC_CHANNEL, 
                              u16 LowThreshold, u16 HighThreshold)
{
  switch (ADC_AnalogWatchdog)
  {
    /* Set the selected channel and their corresponding High and Low thresholds */
    case ADC_AnalogWatchdog0 :
      ADC->TRA0 = (ADC->TRA0 & ADC_AnalogWatchdogChannel_Mask) | ((u16) ADC_CHANNEL<<10);
      ADC->TRA0 = (ADC->TRA0 & ADC_Threshold_Mask) |  HighThreshold;
      ADC->TRB0 = (ADC->TRB0 & ADC_Threshold_Mask) |  LowThreshold;
      break;

    case ADC_AnalogWatchdog1 :
      ADC->TRA1 = (ADC->TRA1 & ADC_AnalogWatchdogChannel_Mask) | ((u16) ADC_CHANNEL<<10);
      ADC->TRA1 = (ADC->TRA1 & ADC_Threshold_Mask) |  HighThreshold;
      ADC->TRB1 = (ADC->TRB1 & ADC_Threshold_Mask) |  LowThreshold;
      break;

    case ADC_AnalogWatchdog2 :
      ADC->TRA2 = (ADC->TRA2 & ADC_AnalogWatchdogChannel_Mask) | ((u16) ADC_CHANNEL<<10);
      ADC->TRA2 = (ADC->TRA2 & ADC_Threshold_Mask) |  HighThreshold;
      ADC->TRB2 = (ADC->TRB2 & ADC_Threshold_Mask) |  LowThreshold;
      break;

    case ADC_AnalogWatchdog3 :
      ADC->TRA3 = (ADC->TRA3 & ADC_AnalogWatchdogChannel_Mask) | ((u16) ADC_CHANNEL<<10);
      ADC->TRA3 = (ADC->TRA3 & ADC_Threshold_Mask) |  HighThreshold;
      ADC->TRB3 = (ADC->TRB3 & ADC_Threshold_Mask) |  LowThreshold;
      break;

    default:
      break; 
  }
}

/*******************************************************************************
* Function Name  : ADC_AnalogWatchdogCmd                                   
* Description    : Enables or disables the selected analog Watchdog.
* Input          : - ADC_AnalogWatchdog: specifies the analog watchdog to be 
*                    enabled or disabled. This parameter can be one of the 
*                    following values: 
*                     - ADC_AnalogWatchdog0: select analog watchdog 0
*                     - ADC_AnalogWatchdog1: select analog watchdog 1
*                     - ADC_AnalogWatchdog2: select analog watchdog 2
*                     - ADC_AnalogWatchdog3: select analog watchdog 3
*                  - NewState: new state of the specified analog watchdog.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None.                                                   
*******************************************************************************/
void ADC_AnalogWatchdogCmd(u16 ADC_AnalogWatchdog, FunctionalState NewState)
{
  if (NewState == ENABLE)
  {
    /* Enable the selected ADC AnalogWatchdogx */
    switch (ADC_AnalogWatchdog)
    {
      case ADC_AnalogWatchdog0 : 
        ADC->TRB0 |= ADC_AnalogWatchdog_Enable;
        break;

      case ADC_AnalogWatchdog1 : 
        ADC->TRB1 |= ADC_AnalogWatchdog_Enable;  
        break;

      case ADC_AnalogWatchdog2 : 
        ADC->TRB2 |= ADC_AnalogWatchdog_Enable;  
        break;

      case ADC_AnalogWatchdog3 : 
        ADC->TRB3 |= ADC_AnalogWatchdog_Enable;  
        break;

      default:
        break; 
    }
  }
  else
  {
    /* Disable the selected ADC AnalogWatchdogx */
    switch (ADC_AnalogWatchdog)
    {
      case ADC_AnalogWatchdog0 : 
        ADC->TRB0 &= ADC_AnalogWatchdog_Disable;  
        break;

      case ADC_AnalogWatchdog1 : 
        ADC->TRB1 &= ADC_AnalogWatchdog_Disable;  
        break;

      case ADC_AnalogWatchdog2 : 
        ADC->TRB2 &= ADC_AnalogWatchdog_Disable;  
        break;

      case ADC_AnalogWatchdog3 : 
        ADC->TRB3 &= ADC_AnalogWatchdog_Disable;  
        break;

      default:
        break; 
    }
  }
}

/*******************************************************************************
* Function Name  : ADC_GetAnalogWatchdogResult
* Description    : Returns the comparison result of the selected analog watchdog.
* Input          : - ADC_AnalogWatchdog: specifies the analog watchdog channel 
*                    which its comparison result will be returned. This parameter
*                    can be one of the following values: 
*                     - ADC_AnalogWatchdog0: select analog watchdog 0
*                     - ADC_AnalogWatchdog1: select analog watchdog 1
*                     - ADC_AnalogWatchdog2: select analog watchdog 2
*                     - ADC_AnalogWatchdog3: select analog watchdog 3
* Output         : None
* Return         : The analog watchdog comparaison result value
*******************************************************************************/
u16 ADC_GetAnalogWatchdogResult(u16 ADC_AnalogWatchdog)
{
  /* Return the selected ADC AnalogWatchdogx comparaison result */
  switch(ADC_AnalogWatchdog)
  {
    case ADC_AnalogWatchdog0 :
      return ((ADC->PBR & ADC_AnalogWatchdog)>>4);

    case ADC_AnalogWatchdog1 :
      return ((ADC->PBR & ADC_AnalogWatchdog)>>6);

    case ADC_AnalogWatchdog2 :
      return ((ADC->PBR & ADC_AnalogWatchdog)>>8);

    case ADC_AnalogWatchdog3 :
      return ((ADC->PBR & ADC_AnalogWatchdog)>>10);

    default : return (0xFF);  /* if a wrong value of ADC_AnalogWatchdog is selected */
  }
}

/*******************************************************************************
* Function Name  : ADC_InjectedConversionConfig
* Description    : Configures the start trigger level for the injected channels 
*                  and the injected analog input channels to be converted. 
* Input          : - ADC_Injec_ExtTrigger: specifies the start trigger level.
*                    This parameter can be one of the following values:
*                         - ADC_Injec_ExtTrigger_Disable : external trigger disabled
*                         - ADC_Injec_ExtTrigger_RisingEdge: external trigger
*                           configured as rising edge of PWM Timer TRGO signal
*                         - ADC_Injec_ExtTrigger_FallingEdge: external trigger 
*                           configured as falling edge of PWM Timer TRGO signal 
*                  - FirstChannel: specifies the first injected channel to be
*                    converted. 
*                    This parameter can be ADC_CHANNELx  where x can be (0..15). 
*                  - ChannelNumber: specifies the Number of the injected channels 
*                    to be converted. This parameter can be a  value from 1 to 16.    
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_InjectedConversionConfig(u16 ADC_Injec_ExtTrigger, u8 FirstChannel, u8 ChannelNumber)
{
  /* Configure the external start injected conversion trigger */
  switch (ADC_Injec_ExtTrigger)
  {
    case ADC_Injec_ExtTrigger_Disable  :
      /* Disable the external trigger and start the injected conversion by software */
      ADC->CLR3 &= ADC_Injec_ExtTrigger_Disable ;
      break;
    case ADC_Injec_ExtTrigger_RisingEdge :
      /* Start injected conversion on rising edge of the external trigger (PWM) */
      ADC->CLR3 |= ADC_Injec_ExtTrigger_RisingEdge;
      break;
    case ADC_Injec_ExtTrigger_FallingEdge :
      /* Start injected conversion on falling edge of the external trigger (PWM) */
      ADC->CLR3 |= ADC_Injec_ExtTrigger_Enable; 
      ADC->CLR3 &= ADC_Injec_ExtTrigger_FallingEdge;
      break;

    default:
      break;
  }
  
  /* Clear first injected channel to be converted JFCH[3:0] bits */
  ADC->CLR3 &= ADC_FirstChannel_Mask;
  /* Set the first injected channel to be converted */
  ADC->CLR3 |= FirstChannel;
  /* Clear number of injected channels to be converted JNCH[3:0] bits */
  ADC->CLR3 &= ADC_ChannelNumber_Mask;  
  /* Set the number of injected channels to be converted */
  ADC->CLR3 |= ((ChannelNumber-1)<<6);
}

/*******************************************************************************
* Function Name  : ADC_StartInjectedConversion
* Description    : Starts by software the conversion of the injected input channels.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_StartInjectedConversion(void)
{
  /* Start the injected ADC Conversion */
  ADC->CLR3 |= ADC_Injec_ConversionStart;
}

/*******************************************************************************
* Function Name  : ADC_GetConversionValue
* Description    : Reads the conversion result from the appropriate data register.
* Input          : - ADC_CHANNEL :specifies the ADC channel which its conversion 
*                    value have to be returned. This parameter can be ADC_CHANNELx
*                    where x can be (0..15) to select channelx  
* Output         : None
* Return         : The returned value holds the conversion result of the selected   
*                  channel.
*******************************************************************************/
u16 ADC_GetConversionValue(u8 ADC_CHANNEL)
{
  /* Return the conversion result of the selected channel */
  return *((u16 *)(ADC_BASE + ((ADC_CHANNEL<<2) + ADC_DataRegisterOffset)));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品在线麻豆| 另类中文字幕网| 国产麻豆成人精品| 欧美日韩免费一区二区三区| 91精品国产综合久久久久久久久久| 国产精品午夜在线| 不卡在线视频中文字幕| 亚洲品质自拍视频| 欧美视频在线播放| 久久精品国产亚洲5555| 国产喷白浆一区二区三区| 99久久夜色精品国产网站| 一区二区三区美女视频| 日韩手机在线导航| 丁香五精品蜜臀久久久久99网站| 日韩毛片高清在线播放| 欧美老肥妇做.爰bbww视频| 久久精品国产**网站演员| 国产视频一区二区在线| 99久久国产免费看| 亚洲国产一区视频| 久久久亚洲精品石原莉奈| www.日本不卡| 亚洲国产视频一区| 精品电影一区二区| 99精品久久只有精品| 香蕉久久一区二区不卡无毒影院| 精品久久久久久最新网址| www.欧美色图| 日韩高清不卡一区二区| 日本一区免费视频| 欧美私模裸体表演在线观看| 精品一区二区精品| 亚洲影视在线观看| 久久蜜桃av一区二区天堂 | 欧美性大战久久久久久久| 麻豆91免费观看| 亚洲欧美日韩一区二区| 欧美成人福利视频| 欧美自拍偷拍一区| 国产在线播放一区二区三区| 亚洲三级小视频| 国产色婷婷亚洲99精品小说| 欧美日韩亚洲另类| 波多野结衣在线aⅴ中文字幕不卡| 亚洲va天堂va国产va久| 国产精品久久一卡二卡| 日韩视频永久免费| 欧美性受xxxx黑人xyx| 成人综合婷婷国产精品久久 | 日韩一区二区三区三四区视频在线观看 | 午夜亚洲福利老司机| 国产日本欧洲亚洲| 日韩一区二区三区在线观看| 色综合激情久久| av成人老司机| 国产成人亚洲综合a∨婷婷图片| 日本强好片久久久久久aaa| 亚洲欧美日韩中文播放| 中文一区二区完整视频在线观看 | 激情综合亚洲精品| 午夜久久电影网| 樱桃视频在线观看一区| 国产精品美女久久久久aⅴ | 欧美日韩国产在线观看| 色综合天天在线| 成a人片国产精品| 国产大陆精品国产| 国产麻豆欧美日韩一区| 精品亚洲aⅴ乱码一区二区三区| 午夜成人免费电影| 香蕉加勒比综合久久| 一区二区高清视频在线观看| 国产精品网站在线播放| 久久久www成人免费无遮挡大片| 欧美一级日韩免费不卡| 欧美日产在线观看| 欧美蜜桃一区二区三区| 色哟哟一区二区在线观看| 波多野结衣在线aⅴ中文字幕不卡| 丰满白嫩尤物一区二区| 粗大黑人巨茎大战欧美成人| 国产在线精品免费| 韩国成人福利片在线播放| 国内精品在线播放| 国产激情精品久久久第一区二区| 丰满放荡岳乱妇91ww| 99这里只有精品| 欧美做爰猛烈大尺度电影无法无天| 色美美综合视频| 欧美日产在线观看| 精品成人一区二区三区四区| 久久久久88色偷偷免费| 国产精品国产自产拍在线| 亚洲精品国产品国语在线app| 一区二区三区四区乱视频| 爽好多水快深点欧美视频| 老司机免费视频一区二区| 国产精品亚洲午夜一区二区三区 | 91香蕉视频黄| 色综合久久综合| 91麻豆精品国产无毒不卡在线观看| 精品国偷自产国产一区| 国产欧美精品一区aⅴ影院| 亚洲日本乱码在线观看| 亚洲一区二区高清| 五月婷婷久久丁香| 国产在线精品一区二区夜色| 国产黄色精品视频| 色成年激情久久综合| 欧美日韩精品欧美日韩精品一| 日韩欧美国产综合一区| 欧美激情综合五月色丁香小说| 亚洲国产综合色| 国产电影一区在线| 欧美视频一二三区| 日韩欧美色电影| 亚洲丝袜美腿综合| 美女在线视频一区| 成人小视频在线| 欧美精品亚洲一区二区在线播放| 久久久久成人黄色影片| 午夜久久福利影院| 成人av在线看| 日韩一区二区三区观看| 国产精品久久久久影院色老大| 五月婷婷综合在线| 97精品电影院| 国产亚洲一二三区| 日韩av电影免费观看高清完整版 | 69av一区二区三区| 中文字幕电影一区| 麻豆精品精品国产自在97香蕉| a级精品国产片在线观看| 精品国产乱码久久久久久1区2区| 一区二区三区在线观看欧美| 国产一区二区三区高清播放| 欧美巨大另类极品videosbest| 国产无一区二区| 黄色日韩网站视频| 欧美剧情电影在线观看完整版免费励志电影 | 国产九九视频一区二区三区| 色婷婷激情综合| 国产精品美女久久久久久| 精品伊人久久久久7777人| 7777女厕盗摄久久久| 夜色激情一区二区| 色综合久久综合网97色综合 | 免费观看日韩av| 欧美日韩一区不卡| 亚洲精品五月天| heyzo一本久久综合| 国产视频一区在线播放| 国产一区在线不卡| 精品国产免费久久| 免费人成精品欧美精品| 欧美网站大全在线观看| 一区二区三区在线观看国产| www.日本不卡| 亚洲欧洲性图库| 成人av动漫网站| 中文字幕精品一区二区精品绿巨人| 国产精品羞羞答答xxdd| 久久久99精品久久| 国产二区国产一区在线观看| 久久九九久精品国产免费直播| 国产在线精品一区二区不卡了| 欧美本精品男人aⅴ天堂| 国内精品伊人久久久久av影院| 精品久久久久久久久久久久久久久 | 亚洲欧美另类综合偷拍| 91香蕉视频mp4| 亚洲综合久久久| 欧美日韩亚州综合| 欧美a级理论片| 精品国精品国产| 国产精品亚洲一区二区三区在线| 国产欧美一区二区在线观看| 成人夜色视频网站在线观看| 中文字幕欧美日本乱码一线二线| 成人亚洲一区二区一| 中文字幕中文乱码欧美一区二区| av午夜精品一区二区三区| 一区二区三区在线观看视频| 欧美日韩亚洲另类| 国产中文字幕精品| 中文字幕成人av| 91精品91久久久中77777| 亚洲一区二区三区四区在线免费观看 | 国产成人免费网站| 国产精品激情偷乱一区二区∴| 色综合色综合色综合色综合色综合 | 国产精品视频看| 91在线国内视频| 亚洲sss视频在线视频| 欧美一级电影网站| 福利一区福利二区| 亚洲国产精品一区二区久久恐怖片 | 国产一区 二区| 最近中文字幕一区二区三区|