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

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

?? stm32f10x_tim.c

?? STM32F10x USB Library V1.0
?? C
?? 第 1 頁 / 共 5 頁
字號:

  TIMx->CCMR1 = (u16)tmpccmr1;
}

/*******************************************************************************
* Function Name  : TIM_ClearOC3Ref
* Description    : Clears or safeguards the OCREF3 signal on an external event
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_OCClear: new state of the Output Compare Clear Enable Bit.
*                    This parameter can be one of the following values:
*                       - TIM_OCClear_Enable
*                       - TIM_OCClear_Disable
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ClearOC3Ref(TIM_TypeDef* TIMx, u16 TIM_OCClear)
{
  u32 tmpccmr2 = 0;

  /* Check the parameters */
  assert_param(IS_TIM_OCCLEAR_STATE(TIM_OCClear));

  tmpccmr2 = TIMx->CCMR2;

  /* Reset the OCFE Bit */
  tmpccmr2 &= CCMR_OC13CE_Mask;

  /* Enable or Disable the Output Compare Clear Bit */
  tmpccmr2 |= (u16)(TIM_OCClear);

  TIMx->CCMR2 = (u16)tmpccmr2;
}

/*******************************************************************************
* Function Name  : TIM_ClearOC4Ref
* Description    : Clears or safeguards the OCREF4 signal on an external event
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_OCClear: new state of the Output Compare Clear Enable Bit.
*                    This parameter can be one of the following values:
*                       - TIM_OCClear_Enable
*                       - TIM_OCClear_Disable
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ClearOC4Ref(TIM_TypeDef* TIMx, u16 TIM_OCClear)
{
  u32 tmpccmr2 = 0;

  /* Check the parameters */
  assert_param(IS_TIM_OCCLEAR_STATE(TIM_OCClear));

  tmpccmr2 = TIMx->CCMR2;

  /* Reset the OCFE Bit */
  tmpccmr2 &= CCMR_OC24CE_Mask;

  /* Enable or Disable the Output Compare Clear Bit */
  tmpccmr2 |= (u16)(TIM_OCClear << 8);

  TIMx->CCMR2 = (u16)tmpccmr2;
}

/*******************************************************************************
* Function Name  : TIM_UpdateDisableConfig
* Description    : Enables or Disables the TIMx Update event.
* Input          : - TIMx: where x can be 2, 3 or 4 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_UpdateDisableConfig(TIM_TypeDef* TIMx, FunctionalState Newstate)
{
  u32 tmpcr1 = 0;

  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(Newstate));

  tmpcr1 = TIMx->CR1;

  if (Newstate != DISABLE)
  {
    /* Set the Update Disable Bit */
    tmpcr1 |= CR1_UDIS_Set;
  }
  else
  {
    /* Reset the Update Disable Bit */
    tmpcr1 &= CR1_UDIS_Reset;
  }

  TIMx->CR1 = (u16)tmpcr1;
}

/*******************************************************************************
* Function Name  : TIM_EncoderInterfaceConfig
* Description    : Configures the TIMx Encoder Interface.
* Input          : - TIMx: where x can be 2, 3 or 4 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
*                        - TIM_ICPolarity_Rising
*                  - TIM_IC2Polarity: specifies the IC2 Polarity
*                    This parmeter can be one of the following values:
*                       - TIM_ICPolarity_Falling
*                       - TIM_ICPolarity_Rising
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_EncoderInterfaceConfig(TIM_TypeDef* TIMx, u16 TIM_EncoderMode,
                                u16 TIM_IC1Polarity, u16 TIM_IC2Polarity)
{
  u32 tmpsmcr = 0;
  u32 tmpccmr1 = 0;
  u32 tmpccer = 0;
    
  /* Check the parameters */
  assert_param(IS_TIM_ENCODER_MODE(TIM_EncoderMode));
  assert_param(IS_TIM_IC_POLARITY(TIM_IC1Polarity));
  assert_param(IS_TIM_IC_POLARITY(TIM_IC2Polarity));

  tmpsmcr = TIMx->SMCR;
  tmpccmr1 = TIMx->CCMR1;
  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_Mask & CCER_CC2P_Mask;
  tmpccer |= (TIM_IC1Polarity | (u16)((u16)TIM_IC2Polarity << 4));

  TIMx->SMCR = (u16)tmpsmcr;

  TIMx->CCMR1 = (u16)tmpccmr1;

  TIMx->CCER = (u16)tmpccer;
}

/*******************************************************************************
* Function Name  : TIM_GenerateEvent
* Description    : Configures the TIMx event to be generate by software.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_EventSource: specifies the event source.
*                    This parameter can be one or more of the following values:
*                       - TIM_EventSource_Update: Timer update Event source
*                       - TIM_EventSource_CC1: Timer Capture Compare 1 Event source
*                       - TIM_EventSource_CC2: Timer Capture Compare 2 Event source
*                       - TIM_EventSource_CC3: Timer Capture Compare 3 Event source
*                       - TIM_EventSource_CC4: Timer Capture Compare 4 Event source
*                       - TIM_EventSource_Trigger: Timer Trigger Event source
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_GenerateEvent(TIM_TypeDef* TIMx, u16 TIM_EventSource)
{
  /* Check the parameters */
  assert_param(IS_TIM_EVENT_SOURCE(TIM_EventSource));

  /* Set the event sources */
  TIMx->EGR |= TIM_EventSource;
}

/*******************************************************************************
* Function Name  : TIM_OC1PolarityConfig
* Description    : Configures the TIMx channel 1 polarity.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_OCPolarity: specifies the OC1 Polarity
*                    This parmeter can be one of the following values:
*                       - TIM_OCPolarity_High: Output Compare active high
*                       - TIM_OCPolarity_Low: Output Compare active low
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_OC1PolarityConfig(TIM_TypeDef* TIMx, u16 TIM_OCPolarity)
{
  u32 tmpccer = 0;

  /* Check the parameters */
  assert_param(IS_TIM_OC_POLARITY(TIM_OCPolarity));

  tmpccer = TIMx->CCER;

  /* Set or Reset the CC1P Bit */
  tmpccer &= CCER_CC1P_Mask;
  tmpccer |= TIM_OCPolarity;

  TIMx->CCER = (u16)tmpccer;
}

/*******************************************************************************
* Function Name  : TIM_OC2PolarityConfig
* Description    : Configures the TIMx channel 2 polarity.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_OCPolarity: specifies the OC2 Polarity
*                    This parmeter can be one of the following values:
*                       - TIM_OCPolarity_High: Output Compare active high
*                       - TIM_OCPolarity_Low: Output Compare active low
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_OC2PolarityConfig(TIM_TypeDef* TIMx, u16 TIM_OCPolarity)
{
  u32 tmpccer = 0;

  /* Check the parameters */
  assert_param(IS_TIM_OC_POLARITY(TIM_OCPolarity));

  tmpccer = TIMx->CCER;

  /* Set or Reset the CC2P Bit */
  tmpccer &= CCER_CC2P_Mask;
  tmpccer |= (u16)((u16)TIM_OCPolarity << 4);

  TIMx->CCER = (u16)tmpccer;
}

/*******************************************************************************
* Function Name  : TIM_OC3PolarityConfig
* Description    : Configures the TIMx channel 3 polarity.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_OCPolarity: specifies the OC3 Polarity
*                    This parmeter can be one of the following values:
*                       - TIM_OCPolarity_High: Output Compare active high
*                       - TIM_OCPolarity_Low: Output Compare active low
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_OC3PolarityConfig(TIM_TypeDef* TIMx, u16 TIM_OCPolarity)
{
  u32 tmpccer = 0;

  /* Check the parameters */
  assert_param(IS_TIM_OC_POLARITY(TIM_OCPolarity));

  tmpccer = TIMx->CCER;

  /* Set or Reset the CC3P Bit */
  tmpccer &= CCER_CC3P_Mask;
  tmpccer |= (u16)((u16)TIM_OCPolarity << 8);

  TIMx->CCER = (u16)tmpccer;
}

/*******************************************************************************
* Function Name  : TIM_OC4PolarityConfig
* Description    : Configures the TIMx channel 4 polarity.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_OCPolarity: specifies the OC4 Polarity
*                    This parmeter can be one of the following values:
*                       - TIM_OCPolarity_High: Output Compare active high
*                       - TIM_OCPolarity_Low: Output Compare active low
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_OC4PolarityConfig(TIM_TypeDef* TIMx, u16 TIM_OCPolarity)
{
  u32 tmpccer = 0;

  /* Check the parameters */
  assert_param(IS_TIM_OC_POLARITY(TIM_OCPolarity));

  tmpccer = TIMx->CCER;

  /* Set or Reset the CC4P Bit */
  tmpccer &= CCER_CC4P_Mask;
  tmpccer |= (u16)((u16)TIM_OCPolarity << 12);

  TIMx->CCER = (u16)tmpccer;
}

/*******************************************************************************
* Function Name  : TIM_UpdateRequestConfig
* Description    : Configures the TIMx Update Request Interrupt source.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_UpdateSource: specifies the Update source.
*                    This parameter can be one of the following values:
*                       - TIM_UpdateSource_Regular
*                       - TIM_UpdateSource_Global
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_UpdateRequestConfig(TIM_TypeDef* TIMx, u16 TIM_UpdateSource)
{
  u32 tmpcr1 = 0;

  /* Check the parameters */
  assert_param(IS_TIM_UPDATE_SOURCE(TIM_UpdateSource));

  tmpcr1 = TIMx->CR1;

  if (TIM_UpdateSource == TIM_UpdateSource_Regular)
  {
    /* Set the URS Bit */
    tmpcr1 |= CR1_URS_Set;
  }
  else
  {
    /* Reset the URS Bit */
    tmpcr1 &= CR1_URS_Reset;
  }
  TIMx->CR1 = (u16)tmpcr1;
}

/*******************************************************************************
* Function Name  : TIM_SelectHallSensor
* Description    : Enables or disables the TIMx抯 Hall sensor interface.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - Newstate: new state of the TIMx Hall sensor interface.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Re

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区影院| 成人av网站在线| 日本成人中文字幕在线视频 | 国产一区不卡在线| 国产精品自拍在线| 91丝袜美腿高跟国产极品老师| 91色.com| 精品捆绑美女sm三区| 91精品国产综合久久精品麻豆| 欧美一区二区精品在线| 国产日韩亚洲欧美综合| 亚洲嫩草精品久久| 久久电影国产免费久久电影| av在线不卡电影| 欧美一级黄色录像| √…a在线天堂一区| 午夜av一区二区三区| 国产精品一区二区久久不卡 | 亚洲高清视频在线| 国产激情精品久久久第一区二区| 色综合久久中文综合久久97| 日韩免费视频一区二区| 中文字幕一区二区三区色视频| 三级精品在线观看| 一本大道久久a久久综合婷婷 | 色综合久久天天综合网| 欧美一区二区在线看| 亚洲三级在线观看| 国产精品性做久久久久久| 欧美一区二区精美| 亚洲最新视频在线播放| 94-欧美-setu| 自拍偷拍欧美精品| 成人av网站在线观看| 国产日韩精品一区二区浪潮av| 蜜桃精品在线观看| 91精品国模一区二区三区| 91色视频在线| 日韩一级成人av| 天堂蜜桃一区二区三区| 欧美日韩午夜在线视频| 亚洲成年人影院| 欧美日韩国产在线播放网站| 亚洲一区二区三区美女| 在线观看视频一区二区欧美日韩| 亚洲欧美偷拍三级| 欧美伊人久久久久久久久影院| 亚洲男人的天堂在线观看| 91久久精品网| 日本不卡一二三区黄网| 日韩欧美在线影院| 国产成人午夜精品影院观看视频| 国产婷婷一区二区| 99国产欧美久久久精品| 亚洲精品免费视频| 欧美日韩专区在线| 激情五月婷婷综合网| 中文字幕中文字幕一区二区| 91视频一区二区三区| 日韩福利视频网| 中文字幕av资源一区| 欧美日韩不卡视频| 国产欧美日韩综合精品一区二区| 久久品道一品道久久精品| 亚洲综合一二区| 91精品国产一区二区三区| 狠狠色综合色综合网络| 亚洲美女电影在线| 精品蜜桃在线看| 色激情天天射综合网| 国产真实乱偷精品视频免| 亚洲精品中文在线观看| 久久理论电影网| 欧美高清一级片在线| 91啪九色porn原创视频在线观看| 日韩国产高清在线| 亚洲综合免费观看高清完整版在线| 欧美大胆人体bbbb| 欧美日韩激情一区| 91免费国产在线| 国产精品系列在线播放| 日本三级亚洲精品| 一区二区日韩电影| 亚洲丝袜精品丝袜在线| 国产欧美精品一区aⅴ影院| 精品国产自在久精品国产| 欧美日韩亚洲综合| 欧美色老头old∨ideo| 91免费在线视频观看| 国产盗摄一区二区三区| 国产制服丝袜一区| 国产在线不卡一区| 国产在线播放一区| 国产精品综合网| 国产成人在线视频免费播放| 久久成人av少妇免费| 精品综合久久久久久8888| 日本va欧美va精品发布| 美女视频一区二区| 高清在线不卡av| 丰满岳乱妇一区二区三区| 美女视频黄a大片欧美| 久久丁香综合五月国产三级网站| 久久99热国产| 不卡的电视剧免费网站有什么| 99re成人在线| 欧美日韩免费电影| 精品国产网站在线观看| 中文字幕av一区二区三区高 | 久久综合狠狠综合久久激情| 亚洲精品一区二区在线观看| 欧美激情一区二区三区全黄| 亚洲国产成人私人影院tom| 亚洲欧美偷拍另类a∨色屁股| 亚洲自拍偷拍综合| 激情六月婷婷久久| 91网站在线播放| 91精品国产高清一区二区三区 | 国产欧美视频在线观看| 亚洲精品视频在线看| 久久99精品国产.久久久久久| 国产成人av一区二区三区在线| 91啪亚洲精品| 久久色在线观看| 亚洲国产美女搞黄色| 成人激情文学综合网| 91精品国产综合久久久久久| 国产精品情趣视频| 美国欧美日韩国产在线播放| 91污在线观看| 久久人人超碰精品| 日本中文字幕一区二区视频| 91成人在线精品| 国产精品三级久久久久三级| 免费观看日韩av| 91福利在线免费观看| 国产精品久久午夜| 国产精品一区二区视频| 日韩视频免费观看高清在线视频| 夜夜夜精品看看| 色菇凉天天综合网| 亚洲品质自拍视频| 91色在线porny| 日韩三级免费观看| 亚洲成人一二三| 欧美色中文字幕| 亚洲精品大片www| 91电影在线观看| 一区二区三区四区激情| 99久久精品免费精品国产| 国产欧美精品国产国产专区| 国产成人av电影在线观看| 26uuu亚洲| 成人性生交大合| 亚洲欧洲精品一区二区三区不卡| 成人免费看黄yyy456| 亚洲欧洲另类国产综合| 91麻豆123| 婷婷国产在线综合| 国产人成亚洲第一网站在线播放| 国产91精品精华液一区二区三区| 久久精品在这里| av在线不卡观看免费观看| 亚洲视频一二三| 欧美猛男超大videosgay| 免费看黄色91| 国产婷婷一区二区| 日本电影欧美片| 五月天久久比比资源色| wwwwxxxxx欧美| 91蝌蚪国产九色| 蜜臀精品一区二区三区在线观看| 国产午夜精品美女毛片视频| 色综合久久综合网97色综合| 美腿丝袜亚洲色图| 亚洲欧美偷拍三级| 欧美大片免费久久精品三p| 色综合亚洲欧洲| 狠狠色狠狠色综合系列| 伊人一区二区三区| 久久人人97超碰com| 欧美日韩在线观看一区二区 | 精品国产一区二区三区忘忧草| 国产福利91精品一区| 性感美女极品91精品| 日本一区二区电影| 日韩欧美第一区| 欧美性大战xxxxx久久久| 成人久久视频在线观看| 麻豆成人91精品二区三区| 一区二区三区在线视频播放| 国产日本欧美一区二区| 精品国产伦理网| 91精品国产一区二区人妖| 欧美亚一区二区| 91免费视频观看| 日本乱人伦aⅴ精品| 99久久婷婷国产综合精品电影| 国产a精品视频| 成人免费毛片app|