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

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

?? stm32f10x_tim.c

?? FWLib.rar
?? C
?? 第 1 頁 / 共 5 頁
字號:

  /* Write to TIMx CR1 register */
  TIMx->CR1 = tmpcr1;
}

/*******************************************************************************
* Function Name  : TIM_SelectInputTrigger
* Description    : Selects the Input Trigger source
* Input          : - TIMx: where x can be  1, 2, 3, 4, 5 or 8 to select the TIM 
*                    peripheral.
*                  - TIM_InputTriggerSource: The Input Trigger source.
*                    This parameter can be one of the following values:
*                       - TIM_TS_ITR0: Internal Trigger 0
*                       - TIM_TS_ITR1: Internal Trigger 1
*                       - TIM_TS_ITR2: Internal Trigger 2
*                       - TIM_TS_ITR3: Internal Trigger 3
*                       - TIM_TS_TI1F_ED: TI1 Edge Detector
*                       - TIM_TS_TI1FP1: Filtered Timer Input 1
*                       - TIM_TS_TI2FP2: Filtered Timer Input 2
*                       - TIM_TS_ETRF: External Trigger input
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_SelectInputTrigger(TIM_TypeDef* TIMx, u16 TIM_InputTriggerSource)
{
  u16 tmpsmcr = 0;

  /* Check the parameters */
  assert_param(IS_TIM_123458_PERIPH(TIMx));
  assert_param(IS_TIM_TRIGGER_SELECTION(TIM_InputTriggerSource));

  /* Get the TIMx SMCR register value */
  tmpsmcr = TIMx->SMCR;

  /* Reset the TS Bits */
  tmpsmcr &= SMCR_TS_Mask;

  /* Set the Input Trigger source */
  tmpsmcr |= TIM_InputTriggerSource;

  /* Write to TIMx SMCR */
  TIMx->SMCR = tmpsmcr;
}

/*******************************************************************************
* Function Name  : TIM_EncoderInterfaceConfig
* Description    : Configures the TIMx Encoder Interface.
* Input          : - TIMx: where x can be  1, 2, 3, 4, 5 or 8 to select the TIM 
*                    peripheral.
*                  - TIM_EncoderMode: specifies the TIMx Encoder Mode.
*                    This parameter can be one of the following values:
*                       - TIM_EncoderMode_TI1: Counter counts on TI1FP1 edge
*                         depending on TI2FP2 level.
*                       - TIM_EncoderMode_TI2: Counter counts on TI2FP2 edge
*                         depending on TI1FP1 level.
*                       - TIM_EncoderMode_TI12: Counter counts on both TI1FP1 and
*                         TI2FP2 edges depending on the level of the other input.
*                  - TIM_IC1Polarity: specifies the IC1 Polarity
*                    This parmeter can be one of the following values:
*                        - TIM_ICPolarity_Falling: IC Falling edge.
*                        - TIM_ICPolarity_Rising: IC Rising edge.
*                  - TIM_IC2Polarity: specifies the IC2 Polarity
*                    This parmeter can be one of the following values:
*                        - TIM_ICPolarity_Falling: IC Falling edge.
*                        - TIM_ICPolarity_Rising: IC Rising edge.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_EncoderInterfaceConfig(TIM_TypeDef* TIMx, u16 TIM_EncoderMode,
                                u16 TIM_IC1Polarity, u16 TIM_IC2Polarity)
{
  u16 tmpsmcr = 0;
  u16 tmpccmr1 = 0;
  u16 tmpccer = 0;
    
  /* Check the parameters */
  assert_param(IS_TIM_123458_PERIPH(TIMx));
  assert_param(IS_TIM_ENCODER_MODE(TIM_EncoderMode));
  assert_param(IS_TIM_IC_POLARITY(TIM_IC1Polarity));
  assert_param(IS_TIM_IC_POLARITY(TIM_IC2Polarity));

  /* Get the TIMx SMCR register value */
  tmpsmcr = TIMx->SMCR;

  /* Get the TIMx CCMR1 register value */
  tmpccmr1 = TIMx->CCMR1;

  /* Get the TIMx CCER register value */
  tmpccer = TIMx->CCER;

  /* Set the encoder Mode */
  tmpsmcr &= SMCR_SMS_Mask;
  tmpsmcr |= TIM_EncoderMode;

  /* Select the Capture Compare 1 and the Capture Compare 2 as input */
  tmpccmr1 &= CCMR_CC13S_Mask & CCMR_CC24S_Mask;
  tmpccmr1 |= CCMR_TI13Direct_Set | CCMR_TI24Direct_Set;

  /* Set the TI1 and the TI2 Polarities */
  tmpccer &= CCER_CC1P_Reset & CCER_CC2P_Reset;
  tmpccer |= (TIM_IC1Polarity | (u16)(TIM_IC2Polarity << 4));

  /* Write to TIMx SMCR */
  TIMx->SMCR = tmpsmcr;

  /* Write to TIMx CCMR1 */
  TIMx->CCMR1 = tmpccmr1;

  /* Write to TIMx CCER */
  TIMx->CCER = tmpccer;
}

/*******************************************************************************
* Function Name  : TIM_ForcedOC1Config
* Description    : Forces the TIMx output 1 waveform to active or inactive level.
* Input          : - TIMx: where x can be  1, 2, 3, 4, 5 or 8 to select the TIM 
*                    peripheral.
*                  - TIM_ForcedAction: specifies the forced Action to be set to
*                    the output waveform.
*                    This parameter can be one of the following values:
*                       - TIM_ForcedAction_Active: Force active level on OC1REF
*                       - TIM_ForcedAction_InActive: Force inactive level on
*                         OC1REF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ForcedOC1Config(TIM_TypeDef* TIMx, u16 TIM_ForcedAction)
{
  u16 tmpccmr1 = 0;

  /* Check the parameters */
  assert_param(IS_TIM_123458_PERIPH(TIMx));
  assert_param(IS_TIM_FORCED_ACTION(TIM_ForcedAction));

  tmpccmr1 = TIMx->CCMR1;

  /* Reset the OC1M Bits */
  tmpccmr1 &= CCMR_OC13M_Mask;

  /* Configure The Forced output Mode */
  tmpccmr1 |= TIM_ForcedAction;

  /* Write to TIMx CCMR1 register */
  TIMx->CCMR1 = tmpccmr1;
}

/*******************************************************************************
* Function Name  : TIM_ForcedOC2Config
* Description    : Forces the TIMx output 2 waveform to active or inactive level.
* Input          : - TIMx: where x can be  1, 2, 3, 4, 5 or 8 to select the TIM 
*                    peripheral.
*                  - TIM_ForcedAction: specifies the forced Action to be set to
*                    the output waveform.
*                    This parameter can be one of the following values:
*                       - TIM_ForcedAction_Active: Force active level on OC2REF
*                       - TIM_ForcedAction_InActive: Force inactive level on
*                         OC2REF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ForcedOC2Config(TIM_TypeDef* TIMx, u16 TIM_ForcedAction)
{
  u16 tmpccmr1 = 0;

  /* Check the parameters */
  assert_param(IS_TIM_123458_PERIPH(TIMx));
  assert_param(IS_TIM_FORCED_ACTION(TIM_ForcedAction));

  tmpccmr1 = TIMx->CCMR1;

  /* Reset the OC2M Bits */
  tmpccmr1 &= CCMR_OC24M_Mask;

  /* Configure The Forced output Mode */
  tmpccmr1 |= (u16)(TIM_ForcedAction << 8);

  /* Write to TIMx CCMR1 register */
  TIMx->CCMR1 = tmpccmr1;
}

/*******************************************************************************
* Function Name  : TIM_ForcedOC3Config
* Description    : Forces the TIMx output 3 waveform to active or inactive level.
* Input          : - TIMx: where x can be  1, 2, 3, 4, 5 or 8 to select the TIM 
*                    peripheral.
*                  - TIM_ForcedAction: specifies the forced Action to be set to
*                    the output waveform.
*                    This parameter can be one of the following values:
*                       - TIM_ForcedAction_Active: Force active level on OC3REF
*                       - TIM_ForcedAction_InActive: Force inactive level on
*                         OC3REF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ForcedOC3Config(TIM_TypeDef* TIMx, u16 TIM_ForcedAction)
{
  u16 tmpccmr2 = 0;

  /* Check the parameters */
  assert_param(IS_TIM_123458_PERIPH(TIMx));
  assert_param(IS_TIM_FORCED_ACTION(TIM_ForcedAction));

  tmpccmr2 = TIMx->CCMR2;

  /* Reset the OC1M Bits */
  tmpccmr2 &= CCMR_OC13M_Mask;

  /* Configure The Forced output Mode */
  tmpccmr2 |= TIM_ForcedAction;

  /* Write to TIMx CCMR2 register */
  TIMx->CCMR2 = tmpccmr2;
}

/*******************************************************************************
* Function Name  : TIM_ForcedOC4Config
* Description    : Forces the TIMx output 4 waveform to active or inactive level.
* Input          : - TIMx: where x can be  1, 2, 3, 4, 5 or 8 to select the TIM 
*                    peripheral.
*                  - TIM_ForcedAction: specifies the forced Action to be set to
*                    the output waveform.
*                    This parameter can be one of the following values:
*                       - TIM_ForcedAction_Active: Force active level on OC4REF
*                       - TIM_ForcedAction_InActive: Force inactive level on
*                         OC4REF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ForcedOC4Config(TIM_TypeDef* TIMx, u16 TIM_ForcedAction)
{
  u16 tmpccmr2 = 0;

  /* Check the parameters */
  assert_param(IS_TIM_123458_PERIPH(TIMx));
  assert_param(IS_TIM_FORCED_ACTION(TIM_ForcedAction));
  tmpccmr2 = TIMx->CCMR2;

  /* Reset the OC2M Bits */
  tmpccmr2 &= CCMR_OC24M_Mask;

  /* Configure The Forced output Mode */
  tmpccmr2 |= (u16)(TIM_ForcedAction << 8);

  /* Write to TIMx CCMR2 register */
  TIMx->CCMR2 = tmpccmr2;
}

/*******************************************************************************
* Function Name  : TIM_ARRPreloadConfig
* Description    : Enables or disables TIMx peripheral Preload register on ARR.
* Input          : - TIMx: where x can be  1, 2, 3, 4, 5 or 8 to select the TIM 
*                    peripheral.
*                  - NewState: new state of the TIMx peripheral Preload register
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ARRPreloadConfig(TIM_TypeDef* TIMx, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_TIM_ALL_PERIPH(TIMx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    /* Set the ARR Preload Bit */
    TIMx->CR1 |= CR1_ARPE_Set;
  }
  else
  {
    /* Reset the ARR Preload Bit */
    TIMx->CR1 &= CR1_ARPE_Reset;
  }
}

/*******************************************************************************
* Function Name  : TIM_SelectCOM
* Description    : Selects the TIM peripheral Commutation event.
* Input          :- TIMx: where x can be  1 or 8 to select the TIMx peripheral
*                 - NewState: new state of the Commutation event.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_SelectCOM(TIM_TypeDef* TIMx, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_TIM_18_PERIPH(TIMx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  if (NewState != DISABLE)
  {
    /* Set the COM Bit */
    TIMx->CR2 |= CR2_CCUS_Set;
  }
  else
  {
    /* Reset the COM Bit */
    TIMx->CR2 &= CR2_CCUS_Reset;
  }
}

/*******************************************************************************
* Function Name  : TIM_SelectCCDMA
* Description    : Selects the TIMx peripheral Capture Compare DMA source.
* Input          : - TIMx: where x can be  1, 2, 3, 4, 5 or 8 to select the TIM 
*                    peripheral.
*                  - NewState: new state of the Capture Compare DMA source
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_SelectCCDMA(TIM_TypeDef* TIMx, FunctionalState NewState)
{
  /* Check the parameters */
  assert_pa

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
视频一区欧美精品| 久久精品免费观看| 97国产一区二区| 久久久久久久av麻豆果冻| 奇米888四色在线精品| 欧美日本一区二区在线观看| 亚洲一区二区黄色| 欧美性生活影院| 亚洲国产一区在线观看| 欧美三级午夜理伦三级中视频| 亚洲女厕所小便bbb| 日本高清不卡aⅴ免费网站| 亚洲精品国产第一综合99久久 | 成人爽a毛片一区二区免费| 久久综合久色欧美综合狠狠| 精品一区二区日韩| 久久蜜桃av一区精品变态类天堂 | 日本高清无吗v一区| 一区二区三区精品在线| 欧美亚洲综合久久| 图片区小说区国产精品视频| 91精品免费观看| 韩国精品在线观看| 国产夜色精品一区二区av| 成人av午夜电影| 亚洲免费在线视频一区 二区| 91行情网站电视在线观看高清版| 亚洲最大成人网4388xx| 欧美人与性动xxxx| 激情国产一区二区| 国产精品丝袜黑色高跟| 一本一道久久a久久精品| 亚洲国产精品一区二区www在线| 欧美日韩久久久| 美腿丝袜一区二区三区| 国产亚洲精品aa午夜观看| 成人高清视频在线| 一区二区三区在线视频观看58| 欧美日韩国产成人在线免费| 奇米在线7777在线精品| 国产亚洲一本大道中文在线| 99热精品国产| 日韩中文字幕区一区有砖一区 | 亚洲午夜激情网页| 91精品国产乱码久久蜜臀| 黄色精品一二区| 亚洲欧美怡红院| 欧美丰满美乳xxx高潮www| 精品中文字幕一区二区| 亚洲国产精品成人综合色在线婷婷 | 国产成人精品午夜视频免费| 色综合激情五月| 国产成人小视频| 91精品国产91久久久久久一区二区| 青草av.久久免费一区| 国产欧美精品一区| 色老头久久综合| 久久99久久99精品免视看婷婷| 亚洲国产激情av| 欧美精品vⅰdeose4hd| 国产乱对白刺激视频不卡 | 欧美一区二区黄| 成人一区二区三区在线观看| 亚洲国产日产av| 日本一区二区三区免费乱视频| 欧美在线观看一区二区| 国产自产高清不卡| 夜夜精品视频一区二区| 精品日本一线二线三线不卡| 99在线精品视频| 久久99国产精品久久99| 一二三区精品视频| 久久久亚洲高清| 欧美日韩一卡二卡三卡| 成人激情黄色小说| 麻豆91在线播放| 一区二区三区鲁丝不卡| 国产亲近乱来精品视频| 91精品婷婷国产综合久久| 99久久精品国产观看| 国产一区二区网址| 天天av天天翘天天综合网色鬼国产| 国产无人区一区二区三区| 国产精品卡一卡二卡三| 欧美一区二区视频观看视频| 972aa.com艺术欧美| 国产精品一线二线三线| 日本美女一区二区三区| 亚洲最大成人网4388xx| 国产精品美女久久久久久久久久久 | 日韩一区欧美小说| 久久免费国产精品| 91精品国产91久久久久久最新毛片| 色综合天天做天天爱| 国产一区二区三区精品欧美日韩一区二区三区| 一区二区在线看| 国产精品麻豆久久久| 久久嫩草精品久久久精品| 91精品国产全国免费观看| 欧美午夜电影网| 91麻豆国产香蕉久久精品| 国产99久久久国产精品| 激情五月播播久久久精品| 日韩不卡一区二区三区| 亚洲国产精品久久久久婷婷884| 亚洲欧美自拍偷拍| 中文字幕在线播放不卡一区| 国产夜色精品一区二区av| 久久综合久久鬼色| 日韩欧美视频在线| 91精品国产高清一区二区三区 | 国产91精品精华液一区二区三区 | 亚洲一二三四久久| 亚洲日韩欧美一区二区在线| 日本一区二区久久| 国产欧美日韩另类一区| 久久女同互慰一区二区三区| 精品国产精品网麻豆系列| 日韩一级黄色片| 91精品免费观看| 555夜色666亚洲国产免| 欧美日韩精品一区二区三区蜜桃| 色婷婷精品大在线视频| 色综合久久九月婷婷色综合| 色综合久久综合中文综合网| 99国产精品视频免费观看| 99精品欧美一区| 91免费看片在线观看| 色综合久久久久综合体桃花网| 97精品国产露脸对白| 色综合视频在线观看| 色菇凉天天综合网| 在线视频观看一区| 欧美日韩中文字幕一区二区| 欧美揉bbbbb揉bbbbb| 欧美浪妇xxxx高跟鞋交| 欧美日韩国产三级| 欧美一区二区二区| 精品乱码亚洲一区二区不卡| 亚洲精品在线电影| 国产精品天天摸av网| 亚洲摸摸操操av| 五月婷婷激情综合网| 美女视频黄频大全不卡视频在线播放| 青青草成人在线观看| 国产一区在线不卡| 成人综合婷婷国产精品久久| 国产日韩视频一区二区三区| 国产精品美女一区二区三区| 亚洲女同女同女同女同女同69| 亚洲一区二区欧美日韩| 日韩精品高清不卡| 精品亚洲免费视频| 成人福利电影精品一区二区在线观看 | 久久99精品久久久久久国产越南| 国内精品久久久久影院一蜜桃| 国产一区二区三区精品视频 | 国产精品自拍一区| 成人激情文学综合网| 色天使色偷偷av一区二区| 欧美亚洲国产一区二区三区| 欧美福利一区二区| 国产拍揄自揄精品视频麻豆| 亚洲精品福利视频网站| 日日夜夜精品视频天天综合网| 国产在线观看一区二区| fc2成人免费人成在线观看播放 | 99久久精品国产一区二区三区| 在线精品观看国产| 欧美成人精品高清在线播放| 国产精品网站在线观看| 亚洲国产精品视频| 精品无人码麻豆乱码1区2区| 99精品久久只有精品| 911精品国产一区二区在线| 久久精品在线观看| 一个色在线综合| 国产麻豆精品一区二区| 色屁屁一区二区| 欧美电影免费观看高清完整版在线观看 | 国产精品一卡二卡| 欧美亚洲高清一区| 久久影院视频免费| 夜夜操天天操亚洲| 国产经典欧美精品| 精品视频色一区| 久久精品夜夜夜夜久久| 亚洲国产精品久久人人爱蜜臀 | 国产成人精品一区二区三区网站观看| 91在线观看下载| 欧美r级电影在线观看| 亚洲色图另类专区| 久久成人精品无人区| 91在线视频在线| 精品久久人人做人人爽| 一区二区在线观看视频| 国产精品88888| 欧美精品第1页| 亚洲欧美日本韩国| 国产成人亚洲综合色影视|