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

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

?? stm32f10x_adc.c

?? 萬利開發(fā)板上的lcd例程
?? C
?? 第 1 頁 / 共 4 頁
字號:
  /* Check the parameters */
  assert(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    /* Enable the selected ADC conversion on external event */
    ADCx->CR2 |= CR2_EXTTRIG_Set;
  }
  else
  {
    /* Disable the selected ADC conversion on external event */
    ADCx->CR2 &= CR2_EXTTRIG_Reset;
  }
}

/*******************************************************************************
* Function Name  : ADC_GetConversionValue
* Description    : Returns the last ADCx conversion result data for regular channel.
* Input          : - ADCx: where x can be 1 or 2 to select the ADC peripheral.
* Output         : None
* Return         : The Data conversion value.
*******************************************************************************/
u16 ADC_GetConversionValue(ADC_TypeDef* ADCx)
{
  /* Return the selected ADC conversion value */
  return (u16) ADCx->DR;
}

/*******************************************************************************
* Function Name  : ADC_GetDualModeConversionValue
* Description    : Returns the last ADCs conversion result data in dual mode.
* Output         : None
* Return         : The Data conversion value.
*******************************************************************************/
u32 ADC_GetDualModeConversionValue(void)
{
  /* Return the dual mode conversion value */
  return ADC1->DR;
}

/*******************************************************************************
* Function Name  : ADC_AutoInjectedConvCmd
* Description    : Enables or disables the selected ADC automatic injected group
*                  conversion after regular one.
* Input          : - ADCx: where x can be 1 or 2 to select the ADC peripheral.
*                  - NewState: new state of the selected ADC auto injected
*                    conversion
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_AutoInjectedConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
{
  /* Check the parameters */
  assert(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    /* Enable the selected ADC automatic injected group conversion */
    ADCx->CR1 |= CR1_JAUTO_Set;
  }
  else
  {
    /* Disable the selected ADC automatic injected group conversion */
    ADCx->CR1 &= CR1_JAUTO_Reset;
  }
}

/*******************************************************************************
* Function Name  : ADC_InjectedDiscModeCmd
* Description    : Enables or disables the discontinuous mode for injected group
*                  channel for the specified ADC
* Input          : - ADCx: where x can be 1 or 2 to select the ADC peripheral.
*                  - NewState: new state of the selected ADC discontinuous mode
*                    on injected group channel.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_InjectedDiscModeCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
{
  /* Check the parameters */
  assert(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    /* Enable the selected ADC injected discontinuous mode */
    ADCx->CR1 |= CR1_JDISCEN_Set;
  }
  else
  {
    /* Disable the selected ADC injected discontinuous mode */
    ADCx->CR1 &= CR1_JDISCEN_Reset;
  }
}

/*******************************************************************************
* Function Name  : ADC_ExternalTrigInjectedConvConfig
* Description    : Configures the ADCx external trigger for injected channels conversion.
* Input          : - ADCx: where x can be 1 or 2 to select the ADC peripheral.
*                  - ADC_ExternalTrigInjecConv: specifies the ADC trigger to
*                    start injected conversion. 
*                    This parameter can be one of the following values:
*                       - ADC_ExternalTrigInjecConv_T1_TRGO: Timer1 TRGO event 
*                         selected
*                       - ADC_ExternalTrigInjecConv_T1_CC4: Timer1 capture
*                         compare4 selected
*                       - ADC_ExternalTrigInjecConv_T2_TRGO: Timer2 TRGO event
*                         selected
*                       - ADC_External TrigInjecConv_T2_CC1: Timer2 capture
*                         compare1 selected
*                       - ADC_ExternalTrigInjecConv_T3_CC4: Timer3 capture
*                         compare4 selected
*                       - ADC_ExternalTrigInjecConv_T4_TRGO: Timer4 TRGO event
*                         selected 
*                       - ADC_ExternalTrigInjecConv_Ext_Interrupt15: External
*                         interrupt 15 event selected
*                       - ADC_ExternalTrigInjecConv_None: Injected conversion
*                         started by software and not by external trigger
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_ExternalTrigInjectedConvConfig(ADC_TypeDef* ADCx, u32 ADC_ExternalTrigInjecConv)
{
  u32 tmpreg = 0;

  /* Check the parameters */
  assert(IS_ADC_EXT_INJEC_TRIG(ADC_ExternalTrigInjecConv));

  /* Get the old register value */
  tmpreg = ADCx->CR2;
  /* Clear the old external event selection for injected group */
  tmpreg &= CR2_JEXTSEL_Reset;
  /* Set the external event selection for injected group */
  tmpreg |= ADC_ExternalTrigInjecConv;
  /* Store the new register value */
  ADCx->CR2 = tmpreg;
}

/*******************************************************************************
* Function Name  : ADC_ExternalTrigInjectedConvCmd
* Description    : Enables or disables the ADCx injected channels conversion
*                  through external trigger
* Input          : - ADCx: where x can be 1 or 2 to select the ADC peripheral.
*                  - NewState: new state of the selected ADC external trigger
*                    start of injected conversion.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_ExternalTrigInjectedConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
{
  /* Check the parameters */
  assert(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    /* Enable the selected ADC external event selection for injected group */
    ADCx->CR2 |= CR2_JEXTTRIG_Set;
  }
  else
  {
    /* Disable the selected ADC external event selection for injected group */
    ADCx->CR2 &= CR2_JEXTTRIG_Reset;
  }
}

/*******************************************************************************
* Function Name  : ADC_SoftwareStartInjectedConvCmd
* Description    : Enables or disables the selected ADC start of the injected 
*                  channels conversion.
* Input          : - ADCx: where x can be 1 or 2 to select the ADC peripheral.
*                  - NewState: new state of the selected ADC software start
*                    injected conversion.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_SoftwareStartInjectedConvCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
{
  /* Check the parameters */
  assert(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    /* Enable the selected ADC external event selection for injected group */
    /* Starts the selected ADC injected conversion */
    ADCx->CR2 |= CR2_JEXTTRIG_JSWSTRT_Set;
  }
  else
  {
    /* Stops the selected ADC injected conversion */
    /* Disable the selected ADC external event selection for injected group */
	ADCx->CR2 &= CR2_JEXTTRIG_JSWSTRT_Reset;
  }
}

/*******************************************************************************
* Function Name  : ADC_GetSoftwareStartInjectedConvCmdStatus
* Description    : Gets the selected ADC Software start injected conversion Status.
* Input          : - ADCx: where x can be 1 or 2 to select the ADC peripheral.
* Output         : None
* Return         : The new state of ADC software start injected conversion (SET or RESET).
*******************************************************************************/
FlagStatus ADC_GetSoftwareStartInjectedConvCmdStatus(ADC_TypeDef* ADCx)
{
  FlagStatus bitstatus = RESET;

  /* Check the status of JSWSTRT bit */
  if ((ADCx->CR2 & CR2_JSWSTRT_Set) != (u32)RESET)
  {
    /* JSWSTRT bit is set */
    bitstatus = SET;
  }
  else
  {
    /* JSWSTRT bit is reset */
    bitstatus = RESET;
  }
  /* Return the JSWSTRT bit status */
  return  bitstatus;
}

/*******************************************************************************
* Function Name  : ADC_InjectedChannelConfig
* Description    : Configures for the selected ADC injected channel its corresponding
*                  rank in the sequencer and its sample time.
* Input          : - ADCx: where x can be 1 or 2 to select the ADC peripheral.
*                  - ADC_Channel: the ADC channel to configure. 
*                    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
*                  - Rank: The rank in the injected group sequencer. This parameter
*                    must be between 1 to 4.
*                  - ADC_SampleTime: The sample time value to be set for the
*                    selected channel. 
*                    This parameter can be one of the following values:
*                       - ADC_SampleTime_1Cycles5: Sample time equal to 1.5 cycles
*                       - ADC_SampleTime_7Cycles5: Sample time equal to 7.5 cycles
*                       - ADC_SampleTime_13Cycles5: Sample time equal to 13.5 cycles
*                       - ADC_SampleTime_28Cycles5: Sample time equal to 28.5 cycles	
*                       - ADC_SampleTime_41Cycles5: Sample time equal to 41.5 cycles	
*                       - ADC_SampleTime_55Cycles5: Sample time equal to 55.5 cycles	
*                       - ADC_SampleTime_71Cycles5: Sample time equal to 71.5 cycles	
*                       - ADC_SampleTime_239Cycles5: Sample time equal to 239.5 cycles	
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_InjectedChannelConfig(ADC_TypeDef* ADCx, u8 ADC_Channel, u8 Rank, u8 ADC_SampleTime)
{
  u32 tmpreg1 = 0, tmpreg2 = 0;
  u8 tmpreg3 = 0;

  /* Check the parameters */
  assert(IS_ADC_CHANNEL(ADC_Channel));
  assert(IS_ADC_INJECTED_RANK(Rank));
  assert(IS_ADC_SAMPLE_TIME(ADC_SampleTime));

  /* if ADC_Channel_10 ... ADC_Channel_17 is selected */
  if (ADC_Channel > ADC_Channel_9)
  {
    /* Get the old register value */
    tmpreg1 = ADCx->SMPR1;
    /* Calculate the mask to clear */
    tmpreg2 = (u32)SMPR1_SMP_Set << (3*(ADC_Channel - 10));
    /* Clear the old discontinuous mode channel count */
    tmpreg1 &= ~tmpreg2;
    /* Calculate the mask to set */
    tmpreg2 = (u32)ADC_SampleTime << (3*(ADC_Channel - 10));
    /* Set the discontinuous mode channel count */
    tmpreg1 |= tmpreg2;
    /* Store the new register value */
    ADCx->SMPR1 = tmpreg1;
  }
  else /* ADC_Channel include in ADC_Channel_[0..9] */
  {
    /* Get the old register value */
    tmpreg1 = ADCx->SMPR2;
    /* Calculate the mask to clear */
    tmpreg2 = (u32)SMPR2_SMP_Set << (3 * ADC_Channel);
    /* Clear the old discontinuous mode channel count */
    tmpreg1 &= ~tmpreg2;
    /* Calculate the mask to set */
    tmpreg2 = (u32)ADC_SampleTime << (3 * ADC_Channel);
    /* Set the discontinuous mode channel count */
    tmpreg1 |= tmpreg2;
    /* Store the new register value */
    ADCx->SMPR2 = tmpreg1;
  }

  /* Rank configuration */
  /* Get the old register value */
  tmpreg1 = ADCx->JSQR;
  /* Get JL value: Number = JL+1 */
  tmpreg3 =  (u8)((tmpreg1 & (u32)~JSQR_JL_Reset)>> 20);
  /* Calculate the mask to clear: ((Rank-1)+(4-JL-1)) */
  tmpreg2 = (u32)JSQR_JSQ_Set << (5 * ((Rank + 3) - (tmpreg3 + 1)));
  /* Clear the old JSQx bits for the selected rank */
  tmpreg1 &= ~tmpreg2;
  /* Calculate the mask to set: ((Rank-1)+(4-JL-1)) */
  tmpreg2 = (u32)ADC_Channel << (5 * ((Rank + 3) - (tmpreg3 + 1)));
  /* Set the JSQx bits for the selected rank */
  tmpreg1 |= tmpreg2;
  /* Store the new register value */
  ADCx->JSQR = tmpreg1;
}

/*******************************************************************************
* Function Name  : ADC_InjectedSequencerLengthConfig
* Description    : Configures the sequencer length for injected channels
* Input          : - ADCx: where x can be 1 or 2 to select the ADC peripheral.
*                  - Length: The sequencer length. 
*                    This parameter must be a number between 1 to 4.
* Output         : None
* Return         : None
*******************************************************************************/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久国产精品免费免费搜索| 国产欧美久久久精品影院| 久久国内精品视频| 中文字幕制服丝袜一区二区三区| 91精品久久久久久久91蜜桃| 97se亚洲国产综合自在线不卡| 男人的j进女人的j一区| 亚洲久本草在线中文字幕| 精品国产免费视频| 欧美蜜桃一区二区三区| 成人av免费在线观看| 久久精品国产77777蜜臀| 亚洲va在线va天堂| 亚洲人一二三区| 久久精品欧美日韩| 3d动漫精品啪啪| 欧美色窝79yyyycom| 99久久伊人久久99| 国产一区二区三区黄视频| 日本伊人色综合网| 亚洲一区二区在线播放相泽| 国产大陆a不卡| 青草av.久久免费一区| 一个色在线综合| 亚洲色图清纯唯美| 中文字幕在线不卡国产视频| 久久婷婷国产综合国色天香| 91精品国产一区二区三区| 欧洲av一区二区嗯嗯嗯啊| www.视频一区| 暴力调教一区二区三区| 成人少妇影院yyyy| 懂色av一区二区夜夜嗨| 国产尤物一区二区在线| 韩国成人在线视频| 久久精品999| 国产麻豆精品视频| 国产激情精品久久久第一区二区 | 欧美一区二区三区视频免费| 欧美日韩激情一区| 欧美精品在线一区二区三区| 欧美日韩国产高清一区二区| 欧美三级日韩在线| 91精品久久久久久蜜臀| 欧美一级黄色大片| 欧美成人aa大片| 精品国产乱码久久久久久影片| 日韩美女视频一区二区在线观看| 欧美一区二区三区在线| 久久综合久久综合九色| 久久久久久久久蜜桃| 国产清纯美女被跳蛋高潮一区二区久久w | 久久99精品久久只有精品| 美女视频免费一区| 国产一区二区不卡在线| 国产精品91xxx| 99久久精品免费观看| 欧美在线色视频| 欧美一区二区视频在线观看2020| 欧美不卡一二三| 国产欧美精品一区aⅴ影院| 日韩一区在线播放| 亚洲成a人v欧美综合天堂| 日韩 欧美一区二区三区| 久久99久国产精品黄毛片色诱| 国产精品影视在线观看| 91视视频在线直接观看在线看网页在线看 | 日本91福利区| 国产麻豆精品视频| 91黄色免费观看| 欧美一区二区视频在线观看2022| 久久久久国产精品麻豆| 亚洲女女做受ⅹxx高潮| 麻豆免费看一区二区三区| 国产91精品免费| 欧美日韩一区二区三区四区五区| 欧美大片在线观看| 国产精品久久久久久久久免费相片| 亚洲综合在线电影| 精品一二线国产| 色一情一乱一乱一91av| 日韩一区二区三区在线观看| 国产精品久久久久三级| 午夜精品在线看| 成人精品亚洲人成在线| 91麻豆精品国产91久久久久久久久| 国产欧美精品区一区二区三区 | 欧美mv日韩mv亚洲| 中文字幕一区av| 美女网站色91| 91久久免费观看| 日本一区二区三区dvd视频在线| 一区二区三区丝袜| 国产成人99久久亚洲综合精品| 亚洲影院理伦片| 成人免费看片app下载| 欧美久久一二区| 亚洲欧美成aⅴ人在线观看 | 国产一区二区精品久久| 欧美日韩综合色| 国产精品蜜臀在线观看| 蜜臀av性久久久久蜜臀aⅴ| 色婷婷综合久色| 国产日本一区二区| 精品一二三四在线| 欧美精选在线播放| 一卡二卡三卡日韩欧美| 成人国产精品免费网站| 日韩你懂的在线观看| 亚洲夂夂婷婷色拍ww47| 波多野结衣在线aⅴ中文字幕不卡| 日韩欧美一级二级三级| 偷窥少妇高潮呻吟av久久免费| 91原创在线视频| 国产精品美女视频| 国产成人免费视频网站高清观看视频 | 欧美精品一区视频| 日韩avvvv在线播放| 欧美日韩免费观看一区二区三区 | 99riav久久精品riav| 日本一区二区三区视频视频| 乱中年女人伦av一区二区| 欧美亚洲一区二区在线观看| 亚洲日本成人在线观看| 99国产精品视频免费观看| 欧美韩国日本不卡| 国产高清在线观看免费不卡| 久久伊人蜜桃av一区二区| 久久99精品一区二区三区| 欧美白人最猛性xxxxx69交| 日韩电影在线免费观看| 欧美精品高清视频| 日韩成人dvd| 欧美一级精品在线| 久久精品国产久精国产| 精品久久久久久久人人人人传媒 | 在线一区二区三区四区五区| 亚洲三级在线免费| 色综合一区二区| 亚洲欧美另类久久久精品2019| 91麻豆精品一区二区三区| 亚洲美女屁股眼交3| 色综合中文综合网| 国产成人在线电影| 国产精品麻豆欧美日韩ww| 成人高清伦理免费影院在线观看| 国产精品日日摸夜夜摸av| 99久久国产免费看| 亚洲午夜免费电影| 日韩视频免费观看高清完整版在线观看 | 亚洲综合一区二区| 欧美日韩国产精品成人| 日本成人中文字幕在线视频| 日韩欧美国产wwwww| 国产一区二区中文字幕| 国产精品网站导航| 91久久精品一区二区三区| 亚洲第一会所有码转帖| 精品毛片乱码1区2区3区| 风间由美性色一区二区三区| 亚洲老司机在线| 日韩一卡二卡三卡国产欧美| 国产精品一二三区在线| 亚洲男人的天堂网| 91精品黄色片免费大全| 国产91对白在线观看九色| 夜色激情一区二区| 日韩午夜精品视频| 久久精品夜夜夜夜久久| 91在线一区二区| 全国精品久久少妇| 国产日韩欧美高清在线| 在线看不卡av| 狠狠色丁香婷婷综合| 成人欧美一区二区三区在线播放| 欧美日韩国产综合一区二区| 国产一区二区精品在线观看| 亚洲一区二区视频在线| 欧美mv和日韩mv的网站| 色av综合在线| 国产一区三区三区| 亚洲一区二区三区视频在线播放| 精品精品国产高清a毛片牛牛| 成人av中文字幕| 免费成人av在线| 亚洲精品水蜜桃| 久久色.com| 欧美日韩在线播放三区| 成人一二三区视频| 日本午夜一区二区| 亚洲精品免费视频| 久久久久久免费网| 欧美日韩成人综合天天影院 | 国产成人在线视频网址| 亚瑟在线精品视频| 日韩美女久久久| 国产三级三级三级精品8ⅰ区| 欧美美女激情18p| 色婷婷激情综合| 成人精品鲁一区一区二区|