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

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

?? stm32f10x_adc.c

?? STM32F RFID通訊源代碼(支持雙向發(fā)送接收)
?? C
?? 第 1 頁 / 共 4 頁
字號:

/*******************************************************************************
* Function Name  : ADC_ExternalTrigConvCmd
* Description    : Enables or disables the ADCx 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 conversion.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void ADC_ExternalTrigConvCmd(ADC_TypeDef* ADCx, FunctionalState 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 ADC 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 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)
{
  if (NewState != DISABLE)
  {
    /* Enable the selected ADC automatic injected group conversion */
    ADCx->CR1 |= CR1_AUTOJ_Set;
  }
  else
  {
    /* Disable the selected ADC automatic injected group conversion */
    ADCx->CR1 &= CR1_AUTOJ_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)
{
  if (NewState != DISABLE)
  {
    /* Enable the selected ADC injected discontinuous mode */
    ADCx->CR1 |= CR1_DISCENJ_Set;
  }
  else
  {
    /* Disable the selected ADC injected discontinuous mode */
    ADCx->CR1 &= CR1_DISCENJ_Reset;
  }
}

/*******************************************************************************
* Function Name  : ADC_ExternalTrigInjectedConvConfig
* Description    : Configures the 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_ExternalTrigInjecConv_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;

  /* Get the old register value */
  tmpreg = ADCx->CR2;
  /* Clear the old external event selection for injected group */
  tmpreg &= CR2_EXTSELJ_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)
{
  if (NewState != DISABLE)
  {
    /* Enable the selected ADC external event selection for injected group */
    ADCx->CR2 |= CR2_EXTTRIGJ_Set;
  }
  else
  {
    /* Disable the selected ADC external event selection for injected group */
    ADCx->CR2 &= CR2_EXTTRIGJ_Reset;
  }
}

/*******************************************************************************
* Function Name  : ADC_SoftwareStartInjectedConvCmd
* Description    : Enables or disables the 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)
{
  if (NewState != DISABLE)
  {
    /* Starts the selected ADC injected conversion */
    ADCx->CR2 |= CR2_SWSTRTJ_Set;
  }
  else
  {
    /* Stops the selected ADC injected conversion */
    ADCx->CR2 &= CR2_SWSTRTJ_Reset;
  }
}

/*******************************************************************************
* Function Name  : ADC_GetSoftwareStartInjectedConvCmdStatus
* Description    : Gets the 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 SWSTRTJ bit */
  if ((ADCx->CR2 & CR2_SWSTRTJ_Set) != RESET)
  {
    /* SWSTRT bit is set */
    bitstatus = SET;
  }
  else
  {
    /* SWSTRT bit is reset */
    bitstatus = RESET;
  }
  /* Return the SWSTRT 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_Channel0: ADC Channel0 selected
*                       - ADC_Channel1: ADC Channel1 selected
*                       - ADC_Channel2: ADC Channel2 selected
*                       - ADC_Channel3: ADC Channel3 selected
*                       - ADC_Channel4: ADC Channel4 selected
*                       - ADC_Channel5: ADC Channel5 selected
*                       - ADC_Channel6: ADC Channel6 selected
*                       - ADC_Channel7: ADC Channel7 selected
*                       - ADC_Channel8: ADC Channel8 selected
*                       - ADC_Channel9: ADC Channel9 selected
*                       - ADC_Channel10: ADC Channel10 selected
*                       - ADC_Channel11: ADC Channel11 selected
*                       - ADC_Channel12: ADC Channel12 selected
*                       - ADC_Channel13: ADC Channel13 selected
*                       - ADC_Channel14: ADC Channel14 selected
*                       - ADC_Channel15: ADC Channel15 selected
*                       - ADC_Channel16: ADC Channel16 selected
*                       - ADC_Channel17: 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;

  /* if ADC_Channel10 ... ADC_Channel17 is selected */
  if (ADC_Channel > ADC_Channel9)
  {
    /* Get the old register value */
    tmpreg1 = ADCx->SMPR1;
    /* Calculate the mask to clear */
    tmpreg2 = SMPR1_SMP_Set << (3*(ADC_Channel - 10));
    /* Clear the old discontinuous mode channel count */
    tmpreg1 &= ~tmpreg2;
    /* Calculate the mask to set */
    tmpreg2 = 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 = SMPR2_SMP_Set << (3 * ADC_Channel);
    /* Clear the old discontinuous mode channel count */
    tmpreg1 &= ~tmpreg2;
    /* Calculate the mask to set */
    tmpreg2 = 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->SQJR;
  /* Calculate the mask to clear */
  tmpreg2 = SQJR_SQJ_Set << (5 * (Rank - 1));
  /* Clear the old SQJx bits for the selected rank */
  tmpreg1 &= ~tmpreg2;
  /* Calculate the mask to set */
  tmpreg2 = ADC_Channel << (5 * (Rank - 1));
  /* Set the SQJx bits for the selected rank */
  tmpreg1 |= tmpreg2;
  /* Store the new register value */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产色综合久久| 欧美xxxxxxxx| 欧美四级电影网| 欧美xxxxx裸体时装秀| 亚洲午夜免费视频| 国产成人av网站| 日韩一级视频免费观看在线| 综合久久综合久久| 国产精品小仙女| 日韩精品一区二区三区中文精品 | 色婷婷久久一区二区三区麻豆| 欧美一区二区三区在线| 一区二区成人在线| 91免费国产在线观看| 国产欧美一区在线| 国产在线播精品第三| 亚洲免费资源在线播放| 秋霞电影一区二区| 欧美男女性生活在线直播观看| 成人欧美一区二区三区小说| 国产精品一区二区免费不卡 | 欧美一级艳片视频免费观看| 一区二区三区产品免费精品久久75| 国产成人av电影在线播放| 欧美成人a在线| 久久精品久久综合| 欧美一区二区三区免费在线看| 亚洲黄色尤物视频| 欧洲精品一区二区| 亚洲蜜臀av乱码久久精品| 99re热这里只有精品免费视频| 国产午夜亚洲精品理论片色戒 | 尤物在线观看一区| 一本久久精品一区二区| 亚洲欧美国产三级| 欧美三电影在线| 午夜视频在线观看一区二区| 欧美日韩国产高清一区二区| 香蕉成人啪国产精品视频综合网| 欧美日韩欧美一区二区| 日韩精品一区第一页| 日韩午夜小视频| 狠狠色伊人亚洲综合成人| 久久久久久**毛片大全| 成人av网在线| 亚洲伊人伊色伊影伊综合网 | 99r国产精品| 亚洲最快最全在线视频| 5月丁香婷婷综合| 青草国产精品久久久久久| 欧美α欧美αv大片| 国产精一区二区三区| 中文字幕一区在线观看视频| 欧美在线观看一二区| 日韩在线卡一卡二| 欧美成人乱码一区二区三区| 国产成人在线视频网站| 亚洲六月丁香色婷婷综合久久| 欧美日韩视频在线观看一区二区三区| 日本成人在线视频网站| 久久久99精品免费观看不卡| 91亚洲大成网污www| 日韩电影在线免费看| 国产亚洲精品7777| 久久精品夜色噜噜亚洲a∨| 91精品国产91综合久久蜜臀| 亚洲欧洲韩国日本视频| 精品视频资源站| 国产一区二区三区免费播放| 亚洲图片欧美激情| 欧美一级夜夜爽| jlzzjlzz亚洲日本少妇| 日韩—二三区免费观看av| 国产精品情趣视频| 日韩欧美激情一区| 色狠狠一区二区| 国内国产精品久久| 亚洲线精品一区二区三区| 久久久久久久久久看片| 88在线观看91蜜桃国自产| 91在线高清观看| 国产精品99久久久久久久vr | 不卡影院免费观看| 美女尤物国产一区| 一区二区三区欧美在线观看| 国产日本欧美一区二区| 日韩一级二级三级| 欧美色视频一区| 一本色道**综合亚洲精品蜜桃冫| 狠狠色综合播放一区二区| 亚洲不卡av一区二区三区| 中文字幕在线不卡一区二区三区| 337p粉嫩大胆噜噜噜噜噜91av | 成人在线视频一区二区| 青娱乐精品视频| 亚洲一区二区三区美女| 日韩一区在线看| 国产日产欧美精品一区二区三区| 日韩三级视频在线观看| 在线观看日韩电影| 91免费看片在线观看| av电影一区二区| 成人免费高清在线观看| 国产成人免费视频网站| 黄页视频在线91| 国产一本一道久久香蕉| 国产一区二区三区久久久 | 在线不卡的av| 欧美性色综合网| 欧美午夜一区二区三区免费大片| 91在线视频网址| 色综合久久六月婷婷中文字幕| 成人国产精品免费| av一二三不卡影片| av亚洲精华国产精华精| 99久久伊人精品| 色婷婷av一区二区三区大白胸| 91视视频在线观看入口直接观看www | 99精品黄色片免费大全| 成人精品免费看| 99久久99久久精品国产片果冻| www.视频一区| 色又黄又爽网站www久久| 欧美亚洲综合网| 91精品国产麻豆| 欧美电影免费观看高清完整版在线 | 日韩一级二级三级精品视频| 欧美一区二区三区的| 精品美女被调教视频大全网站| 精品国产伦理网| 国产欧美精品一区二区三区四区| 国产精品女主播av| 亚洲一区二区av电影| 蜜臀a∨国产成人精品| 国产很黄免费观看久久| 色婷婷综合中文久久一本| 欧美伦理电影网| 久久综合精品国产一区二区三区 | 欧美一区午夜精品| 亚洲精品在线电影| 亚洲视频小说图片| 日韩在线卡一卡二| 国产精品一区二区三区四区| 成人激情免费电影网址| 欧美日韩亚洲国产综合| 久久先锋资源网| 亚洲精品你懂的| 精品一区二区三区av| 99久久99久久精品免费看蜜桃| 欧美欧美欧美欧美首页| 久久久亚洲精品石原莉奈| 自拍偷拍国产亚洲| 奇米四色…亚洲| 91蜜桃在线免费视频| 日韩欧美的一区| 中文字幕亚洲区| 久久99精品久久久久久国产越南| 91在线视频免费观看| 日韩一区二区三区在线| 专区另类欧美日韩| 久久爱www久久做| 欧美视频一区在线观看| 国产欧美日韩麻豆91| 日韩av网站免费在线| 91浏览器打开| 国产欧美精品区一区二区三区| 丝袜美腿高跟呻吟高潮一区| 成人午夜在线播放| 日韩一二在线观看| 亚洲综合视频在线观看| 91视视频在线观看入口直接观看www| 欧美一区二区三区四区高清| 亚洲欧洲精品一区二区三区| 老司机午夜精品| 精品视频1区2区| 亚洲视频免费看| 成人一级黄色片| 久久综合九色综合97婷婷| 一区二区三区产品免费精品久久75 | 成人h动漫精品| 久久综合一区二区| 蜜桃一区二区三区在线| 欧美日韩大陆一区二区| 亚洲精品国产无套在线观| 成人国产精品免费观看动漫| 欧美成人一区二区三区在线观看| 亚洲国产日日夜夜| 在线欧美小视频| 最好看的中文字幕久久| zzijzzij亚洲日本少妇熟睡| ww久久中文字幕| 久久电影国产免费久久电影| 日韩精品在线网站| 日韩国产精品久久久| 宅男噜噜噜66一区二区66| 亚洲成人动漫一区| 欧美老年两性高潮| 婷婷久久综合九色综合绿巨人| 91丨porny丨国产| 亚洲美腿欧美偷拍|