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

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

?? stm32f10x_tim.c

?? STM32F10x USB Library V1.0
?? C
?? 第 1 頁 / 共 5 頁
字號:
  /* Check the parameters */
  assert_param(IS_TIM_EXT_PRESCALER(TIM_ExtTRGPrescaler));
  assert_param(IS_TIM_EXT_POLARITY(TIM_ExtTRGPolarity));

  /* Configure the ETR Clock source */
  TIM_ETRConfig(TIMx, TIM_ExtTRGPrescaler, TIM_ExtTRGPolarity, ExtTRGFilter);

  /* Select the External clock mode1 */
  TIMx->SMCR &= SMCR_SMS_Mask;
  TIMx->SMCR |= TIM_SlaveMode_External1;

  /* Select the Trigger selection : ETRF */
  TIMx->SMCR &= SMCR_TS_Mask;
  TIMx->SMCR |= TIM_TS_ETRF;
}

/*******************************************************************************
* Function Name  : TIM_ETRClockMode2Config
* Description    : Configures the External clock Mode2
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_ExtTRGPrescaler: The external Trigger Prescaler.
*                    It can be one of the following values:
*                       - TIM_ExtTRGPSC_OFF
*                       - TIM_ExtTRGPSC_DIV2
*                       - TIM_ExtTRGPSC_DIV4
*                       - TIM_ExtTRGPSC_DIV8
*                  - TIM_ExtTRGPolarity: The external Trigger Polarity.
*                    It can be one of the following values:
*                       - TIM_ExtTRGPolarity_Inverted
*                       - TIM_ExtTRGPolarity_NonInverted
*                  - ExtTRGFilter: External Trigger Filter.
*                    This parameter must be a value between 0x00 and 0x0F
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ETRClockMode2Config(TIM_TypeDef* TIMx, u16 TIM_ExtTRGPrescaler, 
                             u16 TIM_ExtTRGPolarity, u8 ExtTRGFilter)
{
  /* Check the parameters */
  assert_param(IS_TIM_EXT_PRESCALER(TIM_ExtTRGPrescaler));
  assert_param(IS_TIM_EXT_POLARITY(TIM_ExtTRGPolarity));

  /* Configure the ETR Clock source */
  TIM_ETRConfig(TIMx, TIM_ExtTRGPrescaler, TIM_ExtTRGPolarity, ExtTRGFilter);

  /* Enable the External clock mode2 */
  TIMx->SMCR |= SMCR_ECE_Set;
}

/*******************************************************************************
* Function Name  : TIM_ETRConfig
* Description    : Configures the TIMx External Trigger (ETR).
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_ExtTRGPrescaler: The external Trigger Prescaler.
*                    This parameter can be one of the following values:
*                       - TIM_ExtTRGPSC_OFF
*                       - TIM_ExtTRGPSC_DIV2
*                       - TIM_ExtTRGPSC_DIV4
*                       - TIM_ExtTRGPSC_DIV8
*                  - TIM_ExtTRGPolarity: The external Trigger Polarity.
*                    This parameter can be one of the following values:
*                       - TIM_ExtTRGPolarity_Inverted
*                       - TIM_ExtTRGPolarity_NonInverted
*                  - ExtTRGFilter: External Trigger Filter.
*                    This parameter must be a value between 0x00 and 0x0F.
* Output         : None
* Return         : None
*******************************************************************************/
 void TIM_ETRConfig(TIM_TypeDef* TIMx, u16 TIM_ExtTRGPrescaler, u16 TIM_ExtTRGPolarity,
                       u8 ExtTRGFilter)
{
  u32 tmpsmcr = 0;

  tmpsmcr = TIMx->SMCR;

  /* Set the Prescaler, the Filter value and the Polarity */
  tmpsmcr &= SMCR_ETR_Mask;
  tmpsmcr |= TIM_ExtTRGPrescaler | TIM_ExtTRGPolarity | (u16)((u16)ExtTRGFilter << 8);

  TIMx->SMCR = (u16)tmpsmcr;
}

/*******************************************************************************
* Function Name  : TIM_SelectInputTrigger
* Description    : Selects the Input Trigger source
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_InputTriggerSource: The Input Trigger source.
*                    This parameter can be one of the following values:
*                       - TIM_TS_ITR0: Internal Trigger 0
*                       - TIM_TS_ITR1: Internal Trigger 1
*                       - TIM_TS_ITR2: Internal Trigger 2
*                       - TIM_TS_ITR3: Internal Trigger 3
*                       - TIM_TS_TI1F_ED: TI1 Edge Detector
*                       - TIM_TS_TI1FP1: Filtered Timer Input 1
*                       - TIM_TS_TI2FP2: Filtered Timer Input 2
*                       - TIM_TS_ETRF: External Trigger input
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_SelectInputTrigger(TIM_TypeDef* TIMx, u16 TIM_InputTriggerSource)
{
  u32 tmpsmcr = 0;

  /* Check the parameters */
  assert_param(IS_TIM_TRIGGER_SELECTION(TIM_InputTriggerSource));

  tmpsmcr = TIMx->SMCR;

  /* Select the Tgigger Source */
  tmpsmcr &= SMCR_TS_Mask;
  tmpsmcr |= TIM_InputTriggerSource;

  TIMx->SMCR = (u16)tmpsmcr;
}

/*******************************************************************************
* Function Name  : TIM_PrescalerConfig
* Description    : Configures the TIMx Prescaler.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - Prescaler: specifies the Prescaler Register value
*                  - TIM_PSCReloadMode: specifies the TIM Prescaler Reload mode
*                    This parameter can be one of the following values:
*                       - TIM_PSCReloadMode_Update: The Prescaler is loaded at
*                         the update event.
*                       - TIM_PSCReloadMode_Immediate: The Prescaler is loaded
*                         immediatly.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_PrescalerConfig(TIM_TypeDef* TIMx, u16 Prescaler, u16 TIM_PSCReloadMode)
{
  /* Check the parameters */
  assert_param(IS_TIM_PRESCALER_RELOAD(TIM_PSCReloadMode));

  /* Set the Prescaler value */
  TIMx->PSC = Prescaler;

  /* Set or reset the UG Bit */
  if (TIM_PSCReloadMode == TIM_PSCReloadMode_Immediate)
  {
    TIMx->EGR |= TIM_EventSource_Update;
  }
  else
  {
    TIMx->EGR &= TIM_EventSource_Update;
  }
}

/*******************************************************************************
* Function Name  : TIM_CounterModeConfig
* Description    : Specifies the TIMx Counter Mode to be used.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_CounterMode: specifies the Counter Mode to be used
*                    This parameter can be one of the following values:
*                       - TIM_CounterMode_Up: TIM Up Counting Mode
*                       - TIM_CounterMode_Down: TIM Down Counting Mode
*                       - TIM_CounterMode_CenterAligned1: TIM Center Aligned Mode1
*                       - TIM_CounterMode_CenterAligned2: TIM Center Aligned Mode2
*                       - TIM_CounterMode_CenterAligned3: TIM Center Aligned Mode3
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_CounterModeConfig(TIM_TypeDef* TIMx, u16 TIM_CounterMode)
{
  u32 tmpcr1 = 0;

  /* Check the parameters */
  assert_param(IS_TIM_COUNTER_MODE(TIM_CounterMode));

  tmpcr1 = TIMx->CR1;

  /* Reset the CMS and DIR Bits */
  tmpcr1 &= CR1_CounterMode_Mask;

  /* Set the Counter Mode */
  tmpcr1 |= TIM_CounterMode;

  TIMx->CR1 = (u16)tmpcr1;
}

/*******************************************************************************
* Function Name  : TIM_ForcedOC1Config
* Description    : Forces the TIMx output 1 waveform to active or inactive level.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_ForcedAction: specifies the forced Action to be set to
*                    the output waveform.
*                    This parameter can be one of the following values:
*                       - TIM_ForcedAction_Active: Force active level on OC1REF
*                       - TIM_ForcedAction_InActive: Force inactive level on
*                         OC1REF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ForcedOC1Config(TIM_TypeDef* TIMx, u16 TIM_ForcedAction)
{
  u32 tmpccmr1 = 0;

  /* Check the parameters */
  assert_param(IS_TIM_FORCED_ACTION(TIM_ForcedAction));

  tmpccmr1 = TIMx->CCMR1;

  /* Reset the OCM Bits */
  tmpccmr1 &= CCMR_OCM13_Mask;

  /* Configure The Forced output Mode */
  tmpccmr1 |= TIM_ForcedAction;

  TIMx->CCMR1 = (u16)tmpccmr1;
}

/*******************************************************************************
* Function Name  : TIM_ForcedOC2Config
* Description    : Forces the TIMx output 2 waveform to active or inactive level.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_ForcedAction: specifies the forced Action to be set to
*                    the output waveform.
*                    This parameter can be one of the following values:
*                       - TIM_ForcedAction_Active: Force active level on OC2REF
*                       - TIM_ForcedAction_InActive: Force inactive level on
*                         OC2REF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ForcedOC2Config(TIM_TypeDef* TIMx, u16 TIM_ForcedAction)
{
  u32 tmpccmr1 = 0;

  /* Check the parameters */
  assert_param(IS_TIM_FORCED_ACTION(TIM_ForcedAction));

  tmpccmr1 = TIMx->CCMR1;

  /* Reset the OCM Bits */
  tmpccmr1 &= CCMR_OCM24_Mask;

  /* Configure The Forced output Mode */
  tmpccmr1 |= (u16)(TIM_ForcedAction << 8);

  TIMx->CCMR1 = (u16)tmpccmr1;
}

/*******************************************************************************
* Function Name  : TIM_ForcedOC3Config
* Description    : Forces the TIMx output 3 waveform to active or inactive level.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_ForcedAction: specifies the forced Action to be set to
*                    the output waveform.
*                    This parameter can be one of the following values:
*                       - TIM_ForcedAction_Active: Force active level on OC3REF
*                       - TIM_ForcedAction_InActive: Force inactive level on
*                         OC3REF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ForcedOC3Config(TIM_TypeDef* TIMx, u16 TIM_ForcedAction)
{
  u32 tmpccmr2 = 0;

  /* Check the parameters */
  assert_param(IS_TIM_FORCED_ACTION(TIM_ForcedAction));

  tmpccmr2 = TIMx->CCMR2;

  /* Reset the OCM Bits */
  tmpccmr2 &= CCMR_OCM13_Mask;

  /* Configure The Forced output Mode */
  tmpccmr2 |= TIM_ForcedAction;

  TIMx->CCMR2 = (u16)tmpccmr2;
}

/*******************************************************************************
* Function Name  : TIM_ForcedOC4Config
* Description    : Forces the TIMx output 4 waveform to active or inactive level.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_ForcedAction: specifies the forced Action to be set to
*                    the output waveform.
*                    This parameter can be one of the following values:
*                       - TIM_ForcedAction_Active: Force active level on OC4REF
*                       - TIM_ForcedAction_InActive: Force inactive level on
*                         OC4REF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ForcedOC4Config(TIM_TypeDef* TIMx, u16 TIM_ForcedAction)
{
  u32 tmpccmr2 = 0;

  /* Check the parameters */
  assert_param(IS_TIM_FORCED_ACTION(TIM_ForcedAction));

  tmpccmr2 = TIMx->CCMR2;

  /* Reset the OCM Bits */
  tmpccmr2 &= CCMR_OCM24_Mask;

  /* Configure The Forced output Mode */
  tmpccmr2 |= (u16)(TIM_ForcedAction << 8);

  TIMx->CCMR2 = (u16)tmpccmr2;
}

/*******************************************************************************
* Function Name  : TIM_ARRPreloadConfig
* Description    : Enables or disables TIMx peripheral Preload register on ARR.
* 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_ARRPreloadConfig(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 ARR Preload Bit */
    tmpcr1 |= CR1_ARPE_Set;
  }
  else
  {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本色道综合亚洲| 亚洲尤物视频在线| 国产成人精品亚洲日本在线桃色 | 亚洲图片有声小说| 色婷婷国产精品| 亚洲v中文字幕| 日韩亚洲欧美成人一区| 国产麻豆精品一区二区| 国产精品麻豆欧美日韩ww| 91久久精品一区二区三| 日本欧洲一区二区| 中文字幕av不卡| 色婷婷激情久久| 美女视频一区二区三区| 中文字幕高清一区| 欧美丝袜丝nylons| 国内精品国产成人国产三级粉色 | 九九久久精品视频| 1024成人网色www| 欧美一区二区三区思思人| 国产成人综合视频| 亚洲国产裸拍裸体视频在线观看乱了 | 国产乱国产乱300精品| 最新不卡av在线| 日韩精品一区二区三区四区| 成人国产精品免费观看动漫| 亚洲国产精品精华液网站| 欧美精品一区二区三区久久久| av不卡免费在线观看| 另类综合日韩欧美亚洲| 亚洲欧洲日韩av| 欧美电视剧免费观看| 色综合网色综合| 久久99久久精品| 一区二区三区四区乱视频| 日韩免费视频线观看| 色先锋资源久久综合| 国产成人啪午夜精品网站男同| 偷窥国产亚洲免费视频| 国产精品素人视频| 日韩三级视频中文字幕| 色噜噜狠狠色综合中国| 精品一区在线看| 日韩和欧美的一区| 亚洲日本在线观看| 午夜在线成人av| 中文字幕欧美一| 久久久99久久| 欧美成人三级在线| 欧美日韩黄色一区二区| 日本乱码高清不卡字幕| 风间由美一区二区av101| 男女激情视频一区| 亚洲成a人v欧美综合天堂| 亚洲天堂精品在线观看| 国产精品色噜噜| 国产日韩精品一区二区浪潮av | 亚洲精品中文在线影院| 国产精品你懂的| 欧美国产日韩a欧美在线观看 | 久久精品国产一区二区| 亚洲第一二三四区| 亚洲一区二区三区四区在线免费观看 | 精品99999| 日韩一级精品视频在线观看| 3d动漫精品啪啪一区二区竹菊| 在线观看欧美黄色| 欧美亚洲综合久久| 欧美亚洲自拍偷拍| 欧美视频一区二区在线观看| 欧美亚洲国产一区二区三区va| 91丨porny丨户外露出| 91麻豆福利精品推荐| av在线这里只有精品| 99久久99久久久精品齐齐 | 在线观看视频一区二区| 在线观看国产91| 欧美久久久久中文字幕| 欧美日韩在线不卡| 91.麻豆视频| 欧美成人三级在线| 国产午夜精品一区二区三区视频| 亚洲精品自拍动漫在线| 欧美成人一区二区三区在线观看 | 日本一不卡视频| 午夜a成v人精品| 欧美a一区二区| 久久精品国产澳门| 捆绑变态av一区二区三区| 久草这里只有精品视频| 国产精一品亚洲二区在线视频| 福利一区福利二区| 91视视频在线观看入口直接观看www | 国产精品久久午夜夜伦鲁鲁| 欧美一区二区三区影视| 欧美本精品男人aⅴ天堂| 精品福利二区三区| 久久久久久久久99精品| 亚洲欧洲韩国日本视频| 亚洲国产美国国产综合一区二区| 日韩电影在线一区二区| 久久精品国产免费| 国产91精品久久久久久久网曝门| av中文字幕一区| 欧美嫩在线观看| 久久久精品一品道一区| 一区二区三区免费在线观看| 日韩av一二三| 成人av在线资源网| 欧美日韩综合色| 欧美成人艳星乳罩| 亚洲天堂久久久久久久| 日日摸夜夜添夜夜添精品视频| 国产精一区二区三区| 色香蕉成人二区免费| 日韩视频在线一区二区| 亚洲天堂久久久久久久| 蜜桃传媒麻豆第一区在线观看| 成人精品高清在线| 欧美裸体一区二区三区| 国产精品久久久久天堂| 精品视频一区二区不卡| 日韩三级中文字幕| 国产精品久99| 奇米综合一区二区三区精品视频| 成人免费毛片高清视频| 制服丝袜亚洲精品中文字幕| 国产精品久久久久影视| 日本不卡的三区四区五区| 95精品视频在线| 精品国产亚洲在线| 天堂在线亚洲视频| 91视视频在线直接观看在线看网页在线看 | 美女网站一区二区| 91蜜桃传媒精品久久久一区二区| 精品国产一区a| 亚洲成a人片综合在线| 欧美一区二区三区视频免费| 亚洲欧美一区二区在线观看| 国产电影一区在线| 日韩精品一区二区三区视频| 久久99精品久久久久久| 欧美亚洲高清一区| 亚洲天堂a在线| 国产成人亚洲综合色影视| 精品国产亚洲一区二区三区在线观看| 亚洲主播在线观看| 91美女在线观看| 中文字幕欧美一| jlzzjlzz亚洲女人18| 国产色一区二区| 国产精品夜夜嗨| 久久久蜜桃精品| 久久99精品久久久久婷婷| 日韩情涩欧美日韩视频| 天天影视色香欲综合网老头| 欧美性猛片aaaaaaa做受| 亚洲老妇xxxxxx| 色婷婷一区二区三区四区| 国产精品国产a| 成人av在线看| 国产精品超碰97尤物18| 99久久精品费精品国产一区二区| 欧美激情一区二区三区在线| 国产精品1区2区| 国产精品免费视频一区| av一区二区三区在线| 亚洲视频一二区| 91麻豆6部合集magnet| 亚洲乱码中文字幕| 欧美手机在线视频| 午夜亚洲国产au精品一区二区| 欧美网站一区二区| 日韩精品三区四区| 欧美成人精品3d动漫h| 国精产品一区一区三区mba视频| 精品国产sm最大网站免费看| 国产一本一道久久香蕉| 国产精品全国免费观看高清| 99久久婷婷国产精品综合| 另类综合日韩欧美亚洲| 精品久久久久久亚洲综合网| 国产自产高清不卡| 国产精品久久久久久久久免费樱桃 | 亚洲精品中文在线影院| 欧美亚洲动漫制服丝袜| 日韩精品每日更新| 亚洲精品一线二线三线| 成人午夜视频在线观看| 亚洲乱码国产乱码精品精可以看 | 欧美va日韩va| www.欧美日韩国产在线| 亚洲一区二区三区四区在线免费观看 | 激情久久五月天| 亚洲素人一区二区| 欧美一区二区视频在线观看2020| 国产一区二区中文字幕| 亚洲视频网在线直播| 欧美精品在欧美一区二区少妇| 久久精品国产亚洲aⅴ |