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

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

?? stm32f10x_adc.c

?? 用最新的32位微控制寫的原裝LCD+LED程序
?? 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
*******************************************************************************/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品国产三级国产aⅴ中文| 久久99九九99精品| 久久久亚洲国产美女国产盗摄| 日本丶国产丶欧美色综合| 成人18精品视频| 偷偷要91色婷婷| 久久亚洲免费视频| 色综合激情久久| 色综合中文字幕| 精品一区二区三区免费毛片爱| 国产欧美日韩在线| 欧美剧情片在线观看| 制服丝袜成人动漫| av一二三不卡影片| 一本大道久久a久久精品综合| 美女视频一区二区三区| 亚洲欧洲一区二区在线播放| 综合分类小说区另类春色亚洲小说欧美 | 久久精品男人的天堂| 在线观看一区日韩| 国产精品一区二区91| 成人听书哪个软件好| 99精品国产视频| 国产精一区二区三区| 成人做爰69片免费看网站| 日一区二区三区| 一区二区三区精品久久久| 午夜激情一区二区| 国产做a爰片久久毛片| 91丨九色porny丨蝌蚪| 国内外精品视频| 人人精品人人爱| 国产精华液一区二区三区| 日韩成人一区二区三区在线观看| 久久99精品久久久久久国产越南 | 亚洲午夜日本在线观看| 天天色图综合网| 午夜久久福利影院| 中文字幕中文字幕中文字幕亚洲无线| 日韩亚洲欧美在线观看| 国产精品天天看| 日本一区二区在线不卡| 天天操天天色综合| www.欧美日韩| 精品国产污网站| 亚洲一线二线三线久久久| 国产中文字幕一区| 欧美挠脚心视频网站| 欧美日韩一区二区欧美激情| 久久久国际精品| 久久久久久久久蜜桃| 精品久久一区二区| 久久人人爽爽爽人久久久| 亚洲综合视频在线观看| 亚洲午夜激情av| 成人av午夜电影| 精品国产乱码久久久久久图片| 亚洲精品ww久久久久久p站| 成人黄色电影在线 | 日韩精品中午字幕| 亚洲一区二区三区自拍| 9久草视频在线视频精品| 久久―日本道色综合久久| 国产精品麻豆99久久久久久| 国产精品视频一二三区| 久久福利视频一区二区| 91精品国产综合久久精品app| 亚洲精品视频观看| 日韩不卡在线观看日韩不卡视频| 在线看日本不卡| 日韩欧美精品三级| 国产精品网曝门| 成人一级视频在线观看| 精品va天堂亚洲国产| 久久精品国产久精国产爱| 制服丝袜日韩国产| 免费一级欧美片在线观看| 欧美丰满嫩嫩电影| 日韩不卡一区二区三区| 懂色av噜噜一区二区三区av| 成人理论电影网| 欧美激情综合五月色丁香 | 国产精品视频免费看| 国产91精品一区二区麻豆网站 | 亚洲国产wwwccc36天堂| 久久99精品国产麻豆不卡| 欧美videos中文字幕| 亚洲欧美另类图片小说| 色呦呦国产精品| 精品国产伦一区二区三区观看方式 | 色婷婷久久久亚洲一区二区三区| 欧美日韩久久一区| 日本伊人精品一区二区三区观看方式 | 麻豆国产精品视频| 久久嫩草精品久久久精品一| 风间由美中文字幕在线看视频国产欧美 | 欧美一区三区二区| 中文字幕一区二区三区在线不卡| 99热这里都是精品| 亚洲国产视频a| 欧美v国产在线一区二区三区| 国产麻豆9l精品三级站| 亚洲人成网站影音先锋播放| 日本道在线观看一区二区| 麻豆91精品91久久久的内涵| 91视频免费看| 婷婷一区二区三区| 日本二三区不卡| 自拍偷在线精品自拍偷无码专区| 91国内精品野花午夜精品| 精品午夜久久福利影院| 国产精品久久久久一区二区三区| 麻豆高清免费国产一区| 国产亚洲欧洲997久久综合 | 久久精品国产免费| 亚洲少妇30p| 精品久久久久久无| 一本一本久久a久久精品综合麻豆| 久久尤物电影视频在线观看| 日本久久电影网| 久久精品72免费观看| 一区二区三区视频在线看| www国产成人免费观看视频 深夜成人网| 亚洲综合成人在线视频| 国产午夜精品久久久久久免费视| 免费在线观看一区二区三区| 国产精品久久夜| 精品国产乱码久久久久久图片| 日韩av网站免费在线| 91麻豆精品91久久久久久清纯| 国产99久久久国产精品潘金网站| 欧美精品一区二区高清在线观看| 91精品办公室少妇高潮对白| 国内精品国产成人| 日韩激情一二三区| 亚洲精品国久久99热| 中文字幕欧美国产| www.在线欧美| 黄页视频在线91| 国产精品日产欧美久久久久| 日韩三级电影网址| 欧美日韩三级视频| 欧美日韩一区国产| 91在线视频播放| 亚洲一区二区美女| 一区二区三区波多野结衣在线观看| 国产欧美一区二区精品性色| 亚洲精品一区二区三区在线观看| 欧美精品v国产精品v日韩精品 | 色视频一区二区| 播五月开心婷婷综合| 一级中文字幕一区二区| 中文天堂在线一区| 久久精品视频一区二区三区| a美女胸又www黄视频久久| 亚洲一区二区三区精品在线| 4438亚洲最大| 欧美日本在线观看| 91精品午夜视频| 欧美精品自拍偷拍动漫精品| 欧美日产在线观看| 在线电影国产精品| 日韩亚洲欧美高清| 91丨九色丨黑人外教| 蜜臀久久99精品久久久久久9| 日韩不卡免费视频| 国产一区二区在线影院| 国产成+人+日韩+欧美+亚洲| 玉米视频成人免费看| 一个色在线综合| 国产午夜精品福利| 欧美一区二区三区色| 99国产精品久久久久久久久久久| 性做久久久久久久免费看| 亚洲第一搞黄网站| 国产精品丝袜91| 亚洲福利视频导航| 久色婷婷小香蕉久久| 风间由美一区二区av101| 99国产精品久| 欧美一区二区三区男人的天堂| 色综合久久久久网| 国产99久久久国产精品免费看 | 欧美精品一区二区三区蜜桃 | 在线这里只有精品| 国产69精品久久久久777| 99国产精品视频免费观看| 欧美日韩精品免费观看视频| 久久综合999| 亚洲影院久久精品| 国产精品亚洲第一区在线暖暖韩国| 91原创在线视频| 正在播放一区二区| 国产精品毛片无遮挡高清| 久久先锋影音av| 一区二区三区精品视频| 国产精品一二三四区| 韩国三级中文字幕hd久久精品| jizzjizzjizz欧美| 欧美一区二区三区免费视频|