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

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

?? stm32f10x_tim.c

?? 提供萬利的板子上能跑的在MDK下的UCOS源代碼
?? 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一区二区三区免费野_久草精品视频
久久婷婷综合激情| 精品国产乱码久久久久久浪潮| 亚洲bdsm女犯bdsm网站| 日韩情涩欧美日韩视频| 色综合咪咪久久| 看电影不卡的网站| 亚洲黄色录像片| 日本一区二区三区久久久久久久久不 | 99视频有精品| 久久综合综合久久综合| 亚洲国产综合人成综合网站| 精品sm在线观看| 欧美精品在线一区二区| 99久久免费精品| 国产福利一区在线| 奇米一区二区三区av| 亚洲美女视频一区| 国产精品免费视频网站| 2021中文字幕一区亚洲| 3atv一区二区三区| 在线观看国产日韩| 91在线免费视频观看| 国产成人亚洲综合a∨婷婷| 大美女一区二区三区| 国产真实精品久久二三区| 蜜桃一区二区三区在线观看| 亚洲一区二区3| 亚洲黄色免费电影| 亚洲免费在线观看视频| 国产精品人成在线观看免费| 精品99一区二区| 日韩欧美一级二级三级久久久| 欧美少妇xxx| 欧美在线不卡视频| 日本韩国欧美国产| 在线精品视频一区二区| 91美女在线观看| 色婷婷久久综合| 一本到高清视频免费精品| 91亚洲大成网污www| a级精品国产片在线观看| av中文字幕不卡| 99国产精品久久| 日本黄色一区二区| 欧美日韩久久久久久| 欧美日韩国产综合一区二区| 欧美在线视频日韩| 欧美日韩高清影院| 91麻豆精品国产91久久久使用方法| 欧美日韩大陆在线| 欧美成人精品福利| www成人在线观看| 国产区在线观看成人精品| 国产欧美日韩不卡免费| 国产精品美女久久久久久| 国产精品久久久久久久第一福利| 国产精品蜜臀在线观看| 亚洲丝袜美腿综合| 亚洲一区二区不卡免费| 日本中文一区二区三区| 精品一区二区三区不卡| 风间由美一区二区三区在线观看| 91网页版在线| 91麻豆精品国产91久久久久久久久| 精品欧美一区二区久久| 国产欧美精品区一区二区三区| 国产精品你懂的| 亚洲激情自拍偷拍| 日韩制服丝袜av| 国产在线精品视频| 99久久精品99国产精品| 欧美日韩亚洲综合一区二区三区| 欧美一级在线免费| 国产欧美日韩麻豆91| 一区二区三区日韩精品| 久久国产精品一区二区| 成熟亚洲日本毛茸茸凸凹| 91色九色蝌蚪| 欧美大片在线观看一区二区| 亚洲国产激情av| 亚洲高清视频在线| 国产一区二区成人久久免费影院| 91免费小视频| 精品美女被调教视频大全网站| 国产精品欧美一级免费| 日韩 欧美一区二区三区| 国产91精品一区二区| 欧美日韩在线播放三区| 国产亚洲精品aa| 性感美女极品91精品| 成人在线综合网| 91精品国产一区二区三区| 国产精品人妖ts系列视频 | 成人午夜在线视频| 欧美精品乱码久久久久久| 亚洲国产精品精华液ab| 视频一区视频二区中文字幕| 成人教育av在线| 日韩欧美国产综合| 国产精品亚洲午夜一区二区三区| 色欧美片视频在线观看在线视频| 欧美精品一区男女天堂| 亚洲午夜电影在线| 99久久99久久精品国产片果冻| 欧美一二三四在线| 一区二区三区美女| 成人av在线影院| 欧美电视剧在线观看完整版| 亚洲一区av在线| 99久久777色| 国产女同性恋一区二区| 久久成人免费日本黄色| 欧美日韩一区二区三区四区五区| 国产精品青草综合久久久久99| 国产一区二区三区香蕉| 日韩美一区二区三区| 午夜视频一区在线观看| 在线视频中文字幕一区二区| 中文字幕日韩一区| 成人一区二区在线观看| 久久亚洲精品国产精品紫薇| 免费在线观看一区二区三区| 欧美日韩一级二级三级| 亚洲小少妇裸体bbw| 日本久久电影网| 亚洲蜜桃精久久久久久久| 99v久久综合狠狠综合久久| 国产清纯美女被跳蛋高潮一区二区久久w| 麻豆精品一区二区三区| 91精品国产综合久久福利软件| 日日骚欧美日韩| 欧美精品一二三四| 日韩av不卡一区二区| 日韩一级免费观看| 久久99精品国产.久久久久久| 欧美一级专区免费大片| 麻豆国产欧美一区二区三区| 日韩精品一区二区三区在线观看| 蜜桃视频一区二区三区| 日韩欧美国产系列| 狠狠v欧美v日韩v亚洲ⅴ| 欧美精品一区二区高清在线观看| 黄页网站大全一区二区| 久久九九久精品国产免费直播| 国产精品一区二区久久不卡 | 性做久久久久久免费观看| 欧美日韩一卡二卡三卡| 无吗不卡中文字幕| 欧美一区二区高清| 国产精品综合视频| 国产精品久久久久久久蜜臀| 色综合久久久久综合99| 亚洲五月六月丁香激情| 69堂国产成人免费视频| 另类的小说在线视频另类成人小视频在线 | 亚洲综合激情网| 7777精品伊人久久久大香线蕉完整版 | 99久久99久久综合| 亚洲v中文字幕| 日韩欧美中文字幕公布| 国产在线视频精品一区| 国产精品色噜噜| 欧美日韩一区二区欧美激情| 麻豆精品新av中文字幕| 国产欧美一区二区精品久导航| 99国产麻豆精品| 日韩电影一二三区| 国产日韩在线不卡| 色综合久久综合网欧美综合网| 日韩精品一二区| 欧美精彩视频一区二区三区| 一本大道av一区二区在线播放| 日韩影视精彩在线| 国产欧美一区二区精品久导航 | 97精品国产97久久久久久久久久久久| 伊人色综合久久天天| 日韩欧美国产综合在线一区二区三区| 国产suv精品一区二区883| 依依成人精品视频| 精品欧美乱码久久久久久| 91在线国产福利| 另类调教123区| 玉足女爽爽91| 国产日韩精品一区二区三区 | 欧美午夜电影网| 国产精品一区2区| 亚洲午夜电影在线| 欧美国产国产综合| 日韩西西人体444www| 91麻豆视频网站| 国内精品久久久久影院薰衣草| 亚洲日本成人在线观看| 欧美tk—视频vk| 在线观看国产一区二区| 粉嫩av一区二区三区粉嫩| 青青草97国产精品免费观看无弹窗版| 中文字幕一区二区三区四区| 欧美刺激午夜性久久久久久久 | 欧美久久高跟鞋激| a美女胸又www黄视频久久|