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

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

?? stm32f10x_tim.c

?? STM32F RFID通訊源代碼(支持雙向發(fā)送接收)
?? 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)
  {
   

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品乱码久久久久久| 性久久久久久久| 韩国精品主播一区二区在线观看| 欧美性大战久久久久久久| 国产精品不卡一区| 波多野结衣一区二区三区| 中文字幕不卡三区| 国产成人av电影在线观看| 中文字幕欧美日韩一区| 99久久久久免费精品国产| 亚洲欧洲精品一区二区三区不卡| 99久久精品免费看国产| 亚洲激情一二三区| 欧美系列日韩一区| 日本不卡高清视频| 欧美一级爆毛片| 国内精品伊人久久久久av一坑 | 亚洲曰韩产成在线| 欧美美女一区二区在线观看| 日韩中文字幕不卡| 日韩欧美国产三级| 成人污污视频在线观看| 一区二区三区在线免费播放| 欧美视频在线播放| 日韩—二三区免费观看av| 2024国产精品| 色综合色综合色综合色综合色综合| 亚洲在线视频免费观看| 精品国产网站在线观看| 99久久久免费精品国产一区二区| 亚洲1区2区3区4区| 国产欧美日韩综合精品一区二区| 一本大道av伊人久久综合| 日日摸夜夜添夜夜添国产精品 | 视频一区视频二区中文| 久久久精品一品道一区| 欧美这里有精品| 国产麻豆91精品| 亚洲午夜在线观看视频在线| 久久色.com| 欧美日韩高清一区二区| 成人免费视频视频在线观看免费| 无码av中文一区二区三区桃花岛| 久久午夜电影网| 欧美日韩国产精选| 成人黄色在线看| 久久精品国产亚洲高清剧情介绍| 日韩美女视频一区二区| 欧美mv日韩mv国产网站| 欧洲亚洲国产日韩| 成人av午夜影院| 久久www免费人成看片高清| 一区二区三区四区视频精品免费| 精品国产一区二区三区四区四| 色哟哟一区二区| 国产成人精品影视| 久久国产精品无码网站| 亚洲国产美女搞黄色| 国产精品色在线观看| 精品国产一区二区三区久久久蜜月| 在线精品视频一区二区| 粉嫩一区二区三区性色av| 热久久一区二区| 成人一区二区三区视频在线观看| 午夜激情一区二区三区| 亚洲男女毛片无遮挡| 中文字幕乱码久久午夜不卡| 欧美精品一区二区久久婷婷| 91.xcao| 欧美亚州韩日在线看免费版国语版| 粉嫩在线一区二区三区视频| 国模娜娜一区二区三区| 日本亚洲免费观看| 视频一区中文字幕国产| 午夜婷婷国产麻豆精品| 亚洲成人免费在线观看| 亚洲人成伊人成综合网小说| 国产精品理伦片| 欧美激情一区二区| 国产亚洲精品久| 久久精品免视看| 久久久久久久久久美女| 久久久亚洲高清| 国产亚洲精品资源在线26u| 久久精品夜色噜噜亚洲a∨| 日韩欧美黄色影院| www国产精品av| 久久色在线观看| 国产午夜精品一区二区 | 精品亚洲欧美一区| 久久精品二区亚洲w码| 麻豆精品国产传媒mv男同| 久久精品99久久久| 国产一区二区伦理| 成人开心网精品视频| 成人av在线资源网| 在线观看日韩av先锋影音电影院| 欧美中文字幕一区| 欧美一区二区国产| 精品国产sm最大网站免费看| 国产亚洲欧美日韩日本| 中文字幕精品一区二区精品绿巨人 | 亚洲精品国产精品乱码不99| 一区二区三区欧美亚洲| 亚洲国产精品麻豆| 蜜桃视频一区二区三区| 国产精品一区二区久激情瑜伽| 国产成人av一区二区三区在线| 懂色av一区二区三区免费看| 色先锋资源久久综合| 国产精品久线在线观看| 一区二区三区在线观看视频| 五月婷婷久久丁香| 国产精品一区二区三区四区 | 成人的网站免费观看| 91视频国产观看| 在线电影一区二区三区| 久久精品无码一区二区三区| 国产精品国产三级国产普通话99 | 成人欧美一区二区三区视频网页| 一区二区三区高清在线| 日韩高清一级片| 国产成人免费视频精品含羞草妖精 | 国产欧美日韩亚州综合| 亚洲乱码中文字幕| 美脚の诱脚舐め脚责91| 99久久精品国产一区二区三区| 欧美欧美午夜aⅴ在线观看| 久久久99精品免费观看| 亚洲一区二区三区在线看| 国产一区二区三区免费在线观看| av电影一区二区| 欧美一区二区三区在| 成人免费在线观看入口| 美女在线一区二区| 色吊一区二区三区| 久久久久国产精品人| 亚洲国产另类av| 成人免费毛片高清视频| 7777女厕盗摄久久久| 亚洲欧美在线观看| 国产一区二区中文字幕| 在线成人高清不卡| 亚洲色图一区二区三区| 激情六月婷婷久久| 777精品伊人久久久久大香线蕉| 中文字幕在线不卡一区| 国产一区二区导航在线播放| 欧美日韩一级片网站| 日韩美女视频一区二区 | 亚洲国产综合人成综合网站| 成人一区二区三区视频在线观看| 欧美一个色资源| 亚洲妇女屁股眼交7| 精品福利在线导航| 日韩精品乱码av一区二区| 色哟哟在线观看一区二区三区| 中文一区在线播放| 国产盗摄一区二区三区| 欧美zozozo| 蜜桃av一区二区三区| 在线电影欧美成精品| 亚洲国产精品人人做人人爽| 一本在线高清不卡dvd| 中文无字幕一区二区三区| 九色|91porny| 精品久久久久99| 美腿丝袜一区二区三区| 欧美一区二区三区四区高清| 亚洲国产人成综合网站| 欧美三级中文字幕| 亚洲午夜精品17c| 欧美午夜电影网| 亚洲一二三区在线观看| 欧美在线观看一区二区| 玉米视频成人免费看| 日本二三区不卡| 亚洲一区二区三区精品在线| 在线观看视频一区| 亚洲综合无码一区二区| 欧美三级中文字幕在线观看| 香蕉成人啪国产精品视频综合网| 欧美日精品一区视频| 天天综合色天天综合| 91精品国产色综合久久久蜜香臀| 日韩av一区二| 欧美本精品男人aⅴ天堂| 国产一区二区三区在线观看精品| 久久你懂得1024| 成+人+亚洲+综合天堂| 亚洲婷婷综合色高清在线| 91国产免费看| 天天av天天翘天天综合网| 91精品国产麻豆| 国产在线麻豆精品观看| 国产精品久久久久久久蜜臀| 91黄色免费版| 免费成人深夜小野草| 久久午夜色播影院免费高清| 成人免费视频网站在线观看|