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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? stm32f10x_tim.c

?? ucosII移植到STM32處理器上的源碼
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):

  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

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人欧美edvon| 国产亚洲精品bt天堂精选| 国产真实乱对白精彩久久| 1区2区3区国产精品| 欧美一级在线视频| 色婷婷综合久久| 国产91精品精华液一区二区三区| 性久久久久久久| 亚洲欧美色一区| 日本一区二区久久| 亚洲精品一区二区三区蜜桃下载 | 91在线观看地址| 国产一区二区三区| 免费观看成人鲁鲁鲁鲁鲁视频| 亚洲精品乱码久久久久久黑人| 国产精品免费av| 久久久亚洲精华液精华液精华液| 7777精品伊人久久久大香线蕉| 在线日韩国产精品| 91美女在线观看| 99re66热这里只有精品3直播| 国产精品综合一区二区| 久久se精品一区精品二区| 丝袜美腿亚洲色图| 亚洲精品国产一区二区精华液| 中文字幕中文字幕一区| 欧美国产日韩a欧美在线观看 | 日韩精品中午字幕| 在线不卡a资源高清| 欧美日韩精品综合在线| 欧美亚洲动漫制服丝袜| 日本韩国欧美在线| 欧洲一区二区三区在线| 欧美少妇一区二区| 欧美日韩日日夜夜| 欧美绝品在线观看成人午夜影视| 欧美午夜一区二区| 欧美人xxxx| 日韩欧美激情在线| 久久久久久免费网| 国产精品网曝门| 国产精品伦理在线| 中文字幕日本乱码精品影院| 国产精品久久久久久久久免费丝袜 | 亚洲综合999| 亚洲最大成人网4388xx| 亚洲成人综合在线| 日日骚欧美日韩| 久草中文综合在线| 国产69精品久久99不卡| 99re成人精品视频| 欧美少妇xxx| 日韩欧美亚洲一区二区| 日本一区免费视频| 一区二区三区国产精品| 亚洲福利视频一区二区| 日本在线播放一区二区三区| 久久99蜜桃精品| 成人国产精品免费观看视频| 一本久久a久久免费精品不卡| 欧美精品九九99久久| 亚洲精品一区二区三区影院 | 91激情五月电影| 欧美高清一级片在线| 欧美不卡一区二区| 国产精品伦理在线| 亚洲444eee在线观看| 国产一区二区视频在线| 99综合电影在线视频| 欧美日本一区二区三区| 久久精品人人爽人人爽| 亚洲制服丝袜av| 韩国女主播成人在线| 91免费在线视频观看| 欧美一区二区在线播放| 欧美国产精品v| 天堂va蜜桃一区二区三区漫画版| 国产乱子轮精品视频| 日本精品一级二级| 精品国产91乱码一区二区三区| 中文字幕一区二区在线观看| 天堂久久一区二区三区| 成人18精品视频| 91精品在线麻豆| 亚洲欧美日韩中文字幕一区二区三区 | 91麻豆精品91久久久久同性| 中文av一区二区| 亚洲成年人网站在线观看| 大桥未久av一区二区三区中文| 欧美三区在线视频| 欧美激情一区在线| 奇米在线7777在线精品| 91丨porny丨最新| www一区二区| 日韩高清一区在线| 色婷婷狠狠综合| 国产欧美日韩另类一区| 蜜臀av性久久久久av蜜臀妖精| 91色九色蝌蚪| 国产精品伦理一区二区| 久久精品国产免费| 欧美日韩精品三区| 综合精品久久久| 国产高清亚洲一区| 日韩免费性生活视频播放| 亚洲宅男天堂在线观看无病毒| 成人激情av网| 国产日产欧美一区| 黄一区二区三区| 日韩欧美在线影院| 婷婷久久综合九色综合伊人色| 91在线porny国产在线看| 中文字幕二三区不卡| 国产一区二区三区在线观看精品 | 成人av资源在线观看| 久久久久久久久免费| 精品一二三四区| 日韩一区二区在线看| 日韩av中文在线观看| 欧美日韩一本到| 亚洲sss视频在线视频| 欧美性猛片aaaaaaa做受| 一级精品视频在线观看宜春院| 99精品在线免费| 国产精品久久久久永久免费观看 | 亚洲精品乱码久久久久| 91片在线免费观看| 国产精品久久久久影院| 成人av在线观| 亚洲欧洲日本在线| 99久久久无码国产精品| 国产精品女主播av| av在线免费不卡| 亚洲天堂久久久久久久| 99re这里都是精品| 一区二区三区**美女毛片| 欧美综合亚洲图片综合区| 亚洲国产综合视频在线观看| 欧美日韩国产美女| 日韩综合在线视频| 日韩视频在线你懂得| 狠狠色丁香婷综合久久| 久久久www成人免费无遮挡大片| 国产伦精品一区二区三区视频青涩 | 亚洲高清在线精品| 欧美人伦禁忌dvd放荡欲情| 亚洲成精国产精品女| 欧美一区二区三区的| 狠狠色狠狠色综合日日91app| 国产欧美中文在线| 91亚洲精品久久久蜜桃| 亚洲第四色夜色| 日韩欧美在线1卡| 国产在线播精品第三| 国产精品国产三级国产普通话三级 | 99久久精品一区二区| 亚洲一区二区三区中文字幕| 日韩一区二区三区免费观看| 国产精品一线二线三线| 专区另类欧美日韩| 欧美日韩国产高清一区二区三区 | 中文字幕国产一区二区| 欧美精品第一页| 狠狠狠色丁香婷婷综合激情| 中文字幕精品三区| 欧美日韩在线播放一区| 国内精品久久久久影院色| 日韩美女视频一区| 在线电影国产精品| 懂色av一区二区三区免费看| 亚洲欧美乱综合| 精品久久99ma| 99国产麻豆精品| 蜜臀va亚洲va欧美va天堂| 国产精品少妇自拍| 555www色欧美视频| 成人免费视频一区| 日本不卡免费在线视频| 国产精品丝袜在线| 欧美肥妇毛茸茸| 国产91精品久久久久久久网曝门| 亚洲一级二级三级在线免费观看| 26uuu另类欧美| 欧美日韩一区二区三区四区| 国产91高潮流白浆在线麻豆| 午夜精品成人在线| 国产精品久久久久婷婷二区次| 日韩三级在线观看| 欧美亚洲动漫精品| 成人黄色免费短视频| 日韩av一级电影| 亚洲综合图片区| 国产精品另类一区| 欧美一区二区三区在线观看| 91免费观看在线| 丰满少妇久久久久久久| 久久精品国产77777蜜臀| 一区二区三区免费观看| 国产欧美日韩另类一区| 欧美不卡一二三|