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

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

?? stm32f10x_tim.c

?? ucos2.86版本結合STM板極支持包
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*******************************************************************************
* 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(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(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(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(IS_TIM_ENCODER_MODE(TIM_EncoderMode));
  assert(IS_TIM_IC_POLARITY(TIM_IC1Polarity));
  assert(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(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(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(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(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(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(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
* Return         : None
*******************************************************************************/
void TIM_SelectHallSensor(TIM_TypeDef* TIMx, FunctionalState Newstate)
{
  /* Check the parameters */
  assert(IS_FUNCTIONAL_STATE(Newstate));

  if (Newstate != DISABLE)
  {
   

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久97国产精华液好用吗| 亚洲妇女屁股眼交7| 国产精品久久久久天堂| 亚洲色图制服诱惑| 久久成人av少妇免费| 成人激情免费视频| 91精品国产综合久久久久久久| 国产欧美日韩综合| 蜜桃av一区二区三区电影| 色综合久久久久综合99| 欧美精品一区二区三区在线 | 日韩精品每日更新| 春色校园综合激情亚洲| 欧美一级欧美三级在线观看| 亚洲另类中文字| 国产不卡视频在线播放| 日韩精品一区二区三区在线观看| 亚洲美女少妇撒尿| 99综合电影在线视频| 久久人人97超碰com| 免费成人深夜小野草| 欧美性受xxxx黑人xyx性爽| 国产精品午夜在线| 国产黄色91视频| 精品国产污污免费网站入口| 天堂蜜桃一区二区三区 | 中文字幕欧美日本乱码一线二线| 精品亚洲免费视频| 日韩无一区二区| 日韩av网站在线观看| 欧美一级在线免费| 蜜臀a∨国产成人精品| 精品国产麻豆免费人成网站| 美腿丝袜一区二区三区| 日韩欧美一区二区久久婷婷| 青青草97国产精品免费观看| 欧美精品粉嫩高潮一区二区| 天堂一区二区在线免费观看| 日韩一级二级三级精品视频| 蜜臀av性久久久久蜜臀av麻豆| 日韩女优电影在线观看| 国内精品久久久久影院薰衣草| 26uuu国产在线精品一区二区| 精品亚洲欧美一区| 精品999久久久| 日韩不卡一区二区三区| 欧美日本精品一区二区三区| 一区二区三区欧美激情| 972aa.com艺术欧美| 91麻豆精品国产| 蜜臀av性久久久久av蜜臀妖精| 一本一本大道香蕉久在线精品 | 午夜精品久久久久久久| 欧洲国内综合视频| 中文字幕日韩一区二区| 成人激情午夜影院| 中文字幕一区二区5566日韩| av毛片久久久久**hd| 国产精品传媒视频| 不卡在线视频中文字幕| 欧美国产日韩亚洲一区| 成人中文字幕合集| 亚洲天堂成人网| 91在线看国产| 亚洲妇女屁股眼交7| 欧美久久久一区| 天天av天天翘天天综合网色鬼国产| 欧美日韩一区二区在线观看| 国产精品女同一区二区三区| 91免费观看视频在线| 亚洲乱码国产乱码精品精98午夜 | 日韩精品乱码免费| 91在线一区二区| 亚洲一区二区三区四区中文字幕| 欧美主播一区二区三区美女| 日韩二区在线观看| 久久先锋影音av鲁色资源| 狠狠色丁香久久婷婷综合_中| 久久影视一区二区| 9色porny自拍视频一区二区| 亚洲成人一二三| 久久这里只精品最新地址| 99久久精品免费精品国产| 亚洲影院理伦片| 久久综合中文字幕| 91欧美一区二区| 日产欧产美韩系列久久99| 欧美激情在线一区二区| 91国偷自产一区二区三区成为亚洲经典 | 奇米777欧美一区二区| 日韩欧美亚洲国产另类| 国产精品一级在线| 日本亚洲免费观看| 亚洲天堂精品在线观看| 日韩一级在线观看| 91啦中文在线观看| 韩国理伦片一区二区三区在线播放| 欧美精彩视频一区二区三区| 欧美日本精品一区二区三区| 成人夜色视频网站在线观看| 亚洲成人午夜影院| 国产精品免费免费| 欧美一级欧美三级| 在线免费观看一区| 精东粉嫩av免费一区二区三区| 国产精品成人免费| 精品国产伦一区二区三区免费| 欧美午夜精品久久久| 成人精品小蝌蚪| 麻豆精品视频在线| 亚洲r级在线视频| 中文字幕一区二区在线观看| 精品国产免费一区二区三区香蕉 | 国产一区二区三区av电影| 亚洲高清不卡在线观看| 亚洲欧洲日产国产综合网| 在线不卡免费欧美| jiyouzz国产精品久久| 成人免费视频一区| 精品一区二区三区影院在线午夜| 亚洲国产精品自拍| 樱花影视一区二区| 国产精品乱人伦中文| 久久久久免费观看| 精品国产人成亚洲区| 日韩欧美专区在线| 日韩一区二区三区四区五区六区 | 国产精品私人影院| 久久久国产午夜精品| 久久亚洲私人国产精品va媚药| 日韩手机在线导航| 欧美一区欧美二区| 色偷偷一区二区三区| 成人免费视频caoporn| 国产成人自拍网| 国产电影精品久久禁18| 国产精品自在在线| 激情丁香综合五月| 国模大尺度一区二区三区| 久久精品国产一区二区| 麻豆精品久久久| 国内精品不卡在线| 国产一区二区三区综合| 国产91色综合久久免费分享| 精品一区二区三区欧美| 国产自产2019最新不卡| 国产精品一区三区| 成人免费视频播放| 色吧成人激情小说| 日韩一区二区三区在线视频| 精品乱人伦小说| 国产日韩欧美高清在线| 欧美不卡视频一区| 亚洲视频一二三| 亚洲成人久久影院| 日韩avvvv在线播放| 国产精品123| 一道本成人在线| 91精品婷婷国产综合久久性色 | 麻豆91精品视频| 国产99精品视频| 91免费看片在线观看| 日韩欧美你懂的| 久久久国产综合精品女国产盗摄| 国产精品―色哟哟| 亚洲成国产人片在线观看| 蜜臀av性久久久久蜜臀aⅴ流畅 | 国产日韩在线不卡| 国产精品久久看| 亚洲最新视频在线观看| 国产经典欧美精品| 色一情一乱一乱一91av| 欧美一区二区三区电影| 久久品道一品道久久精品| 中文字幕在线免费不卡| 亚瑟在线精品视频| 国产成人av电影在线播放| 91捆绑美女网站| 欧美视频日韩视频在线观看| 精品人伦一区二区色婷婷| 亚洲人成网站色在线观看| 肉丝袜脚交视频一区二区| 国产成人精品在线看| 欧美三级乱人伦电影| 精品国产一二三| 一级中文字幕一区二区| 久久疯狂做爰流白浆xx| 成人黄页毛片网站| 国产农村妇女精品| 午夜视黄欧洲亚洲| 91在线观看免费视频| 亚洲精品一区二区三区精华液| 一区二区三区久久| 国产不卡一区视频| 日韩一区二区三区av| 中文字幕免费一区| 国产综合色精品一区二区三区| 欧美图片一区二区三区| 日本一区二区成人| 九九**精品视频免费播放|