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

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

?? stm32f10x_tim.c

?? ucos2.86版本結(jié)合STM板極支持包
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
  /* Check the parameters */
  assert(IS_TIM_EXT_PRESCALER(TIM_ExtTRGPrescaler));
  assert(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(IS_TIM_EXT_PRESCALER(TIM_ExtTRGPrescaler));
  assert(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(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(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(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(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(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(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(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(IS_FUNCTIONAL_STATE(Newstate));

  tmpcr1 = TIMx->CR1;

  if (Newstate != DISABLE)
  {
    /* Set the ARR Preload Bit */
    tmpcr1 |= CR1_ARPE_Set;
  }
  else
  {
    /* Reset the ARR Preload Bit */
    tmpcr1 &= CR1_ARPE_Reset;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人精品免费视频网站| 成人教育av在线| 国产精品网站导航| 777奇米四色成人影色区| 成人精品免费网站| 免费一级欧美片在线观看| 亚洲欧美在线另类| 久久久综合精品| 在线播放91灌醉迷j高跟美女| 成人精品视频一区二区三区| 蜜桃91丨九色丨蝌蚪91桃色| 亚洲一区二区三区四区在线观看| 中文字幕av一区二区三区高| 日韩视频123| 欧美丰满少妇xxxxx高潮对白| 色94色欧美sute亚洲线路二| 国产盗摄精品一区二区三区在线| 蜜桃av噜噜一区二区三区小说| 亚洲资源在线观看| 亚洲精品高清视频在线观看| 国产精品成人免费| 国产欧美一区二区三区在线看蜜臀| 欧美一区二区三区免费| 欧美人xxxx| 日本精品一级二级| 一本色道综合亚洲| 一本大道久久精品懂色aⅴ| 国产成人午夜精品5599| 国产一区二区不卡在线| 国产在线观看免费一区| 麻豆91在线看| 午夜久久久久久电影| 亚洲综合精品久久| 一区二区三区国产精华| 一区二区免费在线| 亚洲一二三四在线观看| 天天综合天天做天天综合| 亚洲第一搞黄网站| 日韩国产欧美一区二区三区| 日韩国产一区二| 久久疯狂做爰流白浆xx| 国内久久婷婷综合| 国产成人自拍在线| av激情综合网| 91蜜桃网址入口| 欧美网站大全在线观看| 欧美精品久久久久久久久老牛影院| 欧美日韩成人综合在线一区二区| 欧美日韩国产综合一区二区| 91精品国产一区二区三区| 日韩欧美中文一区二区| 2024国产精品| 久久精品国产亚洲aⅴ| 久久电影网电视剧免费观看| 国产精品一区二区男女羞羞无遮挡 | 91日韩在线专区| 欧美亚洲免费在线一区| 69堂国产成人免费视频| 日韩一级片在线观看| 国产三级欧美三级| 最新国产成人在线观看| 亚洲综合一区二区精品导航| 丝袜诱惑制服诱惑色一区在线观看 | 国产精品一区在线观看你懂的| 国产毛片精品一区| 91在线小视频| 欧美丰满一区二区免费视频 | 亚洲欧美电影一区二区| 亚洲高清免费视频| 激情五月播播久久久精品| 国产91露脸合集magnet| 色国产综合视频| 日韩欧美一二三四区| 中文字幕精品—区二区四季| 一区二区在线观看不卡| 五月天婷婷综合| 国产美女娇喘av呻吟久久| 色悠悠久久综合| 日韩欧美一区二区久久婷婷| 中文一区在线播放| 日韩影院在线观看| 成人丝袜18视频在线观看| 欧美日韩二区三区| 国产精品欧美一级免费| 天堂蜜桃一区二区三区 | 91日韩在线专区| 日韩视频国产视频| 亚洲免费看黄网站| 国产主播一区二区| 欧美三级韩国三级日本三斤| 国产日韩精品一区二区浪潮av| 亚洲一区二区欧美| 国产成人午夜99999| 欧美肥妇free| 亚洲欧洲av色图| 精品一区二区三区免费视频| 一本高清dvd不卡在线观看| 2014亚洲片线观看视频免费| 亚洲国产三级在线| 国产99久久久国产精品潘金| 欧美日韩一本到| 亚洲视频一区二区在线| 韩国欧美国产1区| 欧美日韩一级片网站| 国产精品你懂的在线| 精品午夜久久福利影院| 欧美日韩一区三区| 亚洲免费资源在线播放| 成人一级片在线观看| 欧美电视剧在线看免费| 午夜婷婷国产麻豆精品| 91浏览器在线视频| 中国av一区二区三区| 国产精品2024| 精品欧美一区二区三区精品久久| 亚洲一区二区不卡免费| 一本久久精品一区二区 | 久久狠狠亚洲综合| 91麻豆精品国产| 亚洲成人自拍偷拍| 欧美在线播放高清精品| 亚洲精品国产无套在线观| 91免费观看在线| 亚洲男人电影天堂| 99re这里只有精品视频首页| 欧美国产日本视频| 成人精品鲁一区一区二区| 久久久精品影视| 国产suv精品一区二区883| 国产欧美一区二区精品久导航| 国内外成人在线视频| 久久综合狠狠综合久久激情| 久久电影国产免费久久电影| 日韩午夜激情免费电影| 久久爱另类一区二区小说| 日韩精品一区二区三区四区| 紧缚奴在线一区二区三区| 久久综合九色综合97婷婷女人| 国内成人免费视频| 国产农村妇女毛片精品久久麻豆| 国产伦精品一区二区三区免费 | 美腿丝袜亚洲色图| 欧美一级夜夜爽| 久久99精品一区二区三区| 久久综合久久鬼色| 成人免费的视频| 亚洲伦理在线精品| 欧美日韩不卡一区二区| 日韩av午夜在线观看| 欧美大白屁股肥臀xxxxxx| 激情久久五月天| 久久精品人人做| jlzzjlzz亚洲女人18| 亚洲午夜久久久| 欧美电影免费观看完整版| 国产福利精品一区| 一区二区三区中文在线| 欧美一区二区三区四区五区 | 欧美日韩国产不卡| 免费欧美在线视频| 欧美激情中文不卡| 欧美在线免费视屏| 久久成人免费电影| 亚洲视频一二三| 欧美一级在线观看| 成人av动漫在线| 天堂蜜桃一区二区三区| 久久精品亚洲一区二区三区浴池| 成人黄色777网| 视频一区二区三区在线| 久久久久久亚洲综合| 色88888久久久久久影院按摩| 日精品一区二区三区| 欧美激情自拍偷拍| 欧美美女黄视频| 成人一级视频在线观看| 三级欧美在线一区| 中文字幕av一区 二区| 欧美日本一区二区| 成人免费观看视频| 日韩不卡免费视频| 亚洲欧美一区二区三区极速播放| 日韩一卡二卡三卡国产欧美| 99国产欧美久久久精品| 精久久久久久久久久久| 一区二区三区精品视频| 国产欧美一二三区| 日韩欧美专区在线| 91久久香蕉国产日韩欧美9色| 久草在线在线精品观看| 一区av在线播放| 国产欧美中文在线| 欧美一区二区三区四区久久| 91网上在线视频| 国产成人精品免费视频网站| 日本欧美一区二区| 一区二区日韩电影| 国产精品毛片大码女人| 久久久久亚洲综合| 91精品国产综合久久香蕉麻豆 |