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

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

?? stm32f10x_tim.c

?? 基于STM32的 模擬時序
?? 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一区二区三区免费野_久草精品视频
在线亚洲一区二区| 972aa.com艺术欧美| 国产精品丝袜在线| 在线精品亚洲一区二区不卡| 久久99精品久久久久婷婷| 中文字幕一区二区三区视频| 6080亚洲精品一区二区| 国产成人午夜视频| 亚洲曰韩产成在线| 久久精品视频免费| 91精品国产丝袜白色高跟鞋| 91丨porny丨国产入口| 精品一区二区三区久久| 亚洲永久精品大片| 国产精品久久久久婷婷二区次| 3d动漫精品啪啪| 99re热这里只有精品免费视频| 国产综合色在线视频区| 天堂一区二区在线免费观看| 亚洲婷婷国产精品电影人久久| 亚洲精品一区二区三区四区高清| 欧美三级在线看| 91丨porny丨国产入口| 成人免费视频视频在线观看免费 | 成人亚洲精品久久久久软件| 图片区小说区国产精品视频| 亚洲日本韩国一区| 国产精品伦一区二区三级视频| 欧美tickling挠脚心丨vk| 欧美精选午夜久久久乱码6080| 色综合视频在线观看| 国产成人精品一区二区三区网站观看| 免费看日韩精品| 亚洲第四色夜色| 一区二区三区av电影| 亚洲免费观看高清完整版在线 | 一区二区三区精品视频在线| 国产精品天天看| 国产日韩欧美在线一区| 久久久久久久久久美女| 久久婷婷国产综合精品青草| 欧美mv日韩mv亚洲| 精品久久久久99| 精品乱人伦小说| 精品国产区一区| 2023国产精华国产精品| 精品国产91亚洲一区二区三区婷婷| 欧美一区日韩一区| 欧美电影免费观看高清完整版| 日韩亚洲欧美中文三级| 日韩精品一区二区三区swag| 久久免费偷拍视频| 欧美韩国日本一区| 中文字幕一区二区5566日韩| 亚洲欧洲国产日本综合| 亚洲乱码日产精品bd| 亚洲综合色自拍一区| 亚洲第一在线综合网站| 奇米影视7777精品一区二区| 青草av.久久免费一区| 韩国毛片一区二区三区| 国产麻豆精品95视频| 成人午夜看片网址| 色综合久久久网| 欧美剧在线免费观看网站| 日韩三级精品电影久久久| 久久久一区二区三区| 中文字幕一区二| 视频一区欧美精品| 寂寞少妇一区二区三区| 99免费精品视频| 欧美日韩精品二区第二页| 欧美成人午夜电影| 亚洲日本电影在线| 视频一区二区欧美| 国产精品2024| 91国内精品野花午夜精品| 欧美精品第一页| 国产区在线观看成人精品| 亚洲人成亚洲人成在线观看图片| 三级不卡在线观看| 风间由美一区二区av101| 欧美自拍丝袜亚洲| 久久奇米777| 亚洲精品成a人| 久久99国产乱子伦精品免费| 一本久久a久久免费精品不卡| 7777精品久久久大香线蕉| 国产精品无人区| 奇米精品一区二区三区在线观看| 成人一区在线观看| 欧美一区二区在线视频| 国产精品福利电影一区二区三区四区| 午夜精品久久久久久久99水蜜桃 | 久久精品亚洲精品国产欧美kt∨| 亚洲免费伊人电影| 韩国欧美一区二区| 欧美日韩不卡一区二区| 中文字幕av一区 二区| 天天综合网 天天综合色| 成人中文字幕合集| 欧美videos中文字幕| 一区二区在线观看不卡| 国产精品亚洲а∨天堂免在线| 91黄色小视频| 亚洲国产经典视频| 麻豆精品新av中文字幕| 91亚洲精品久久久蜜桃网站| 久久综合色8888| 水野朝阳av一区二区三区| 日本韩国精品在线| 欧美国产一区二区在线观看| 理论电影国产精品| 欧美日韩色一区| 亚洲天堂a在线| 国产精品一卡二卡| 日韩精品一区二区三区在线| 亚洲国产精品嫩草影院| 91丨九色丨蝌蚪丨老版| 国产三级精品在线| 韩国三级在线一区| 精品国产伦理网| 日本伊人色综合网| 欧美色区777第一页| 亚洲激情综合网| 99久久婷婷国产综合精品| 国产女人水真多18毛片18精品视频 | 777a∨成人精品桃花网| 亚洲成精国产精品女| 一本色道久久综合亚洲精品按摩| 欧美国产一区在线| 成人免费毛片高清视频| 国产色产综合色产在线视频| 久久爱另类一区二区小说| 欧美一区二区三区四区高清 | 国产精品视频在线看| 国产福利一区二区三区| 精品国产成人系列| 精品一区二区三区香蕉蜜桃 | 91蜜桃网址入口| 日韩一区日韩二区| 91在线精品一区二区| 亚洲欧美偷拍另类a∨色屁股| 99久久99久久综合| 亚洲精品国产第一综合99久久| 日本高清视频一区二区| 亚洲国产精品麻豆| 91麻豆精品国产91| 久久精品国产色蜜蜜麻豆| 日韩三级在线观看| 国产一区二区三区国产| 国产拍揄自揄精品视频麻豆| 国产69精品久久久久毛片| 国产精品色婷婷| 色综合久久天天| 亚洲一级二级三级在线免费观看| 欧美私人免费视频| 日韩成人av影视| 国产亚洲综合在线| 97成人超碰视| 午夜日韩在线观看| 精品理论电影在线| 99久久伊人精品| 五月激情综合网| 久久久精品2019中文字幕之3| 高清不卡一二三区| 一区二区三区在线免费| 91精品婷婷国产综合久久 | 蜜桃视频一区二区| 国产人伦精品一区二区| 日本福利一区二区| 美女视频免费一区| 国产精品久99| 欧美日本视频在线| 国产成人精品1024| 亚洲国产aⅴ天堂久久| 精品国产sm最大网站免费看| 不卡电影一区二区三区| 午夜电影久久久| 欧美国产日产图区| 67194成人在线观看| 成人网男人的天堂| 亚洲香蕉伊在人在线观| 久久奇米777| 欧美日韩日日摸| 国产91丝袜在线观看| 一区二区三区欧美在线观看| 精品久久久久久最新网址| 一本大道久久精品懂色aⅴ| 青青青爽久久午夜综合久久午夜| 中文字幕一区二区三区不卡在线| 91精品免费观看| 99精品视频在线观看| 日本中文字幕一区| 亚洲蜜臀av乱码久久精品| 337p日本欧洲亚洲大胆精品 | 国产在线精品视频| 亚洲一区二区三区在线| 国产人成一区二区三区影院| 欧美精品三级在线观看|