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

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

?? stm32f10x_tim.c

?? 萬利開發(fā)板上的lcd例程
?? C
?? 第 1 頁 / 共 5 頁
字號:
  /* 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;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产精品一区二区夜夜嗨| 欧美视频在线观看一区| 美腿丝袜一区二区三区| 亚洲成国产人片在线观看| 亚洲狠狠爱一区二区三区| 亚洲资源中文字幕| 午夜精品久久一牛影视| 麻豆一区二区三区| 国产一区二区三区日韩| 国产盗摄一区二区| 91在线精品秘密一区二区| 色就色 综合激情| 91麻豆精品国产91久久久久久| 欧美一区二区三区免费在线看| 欧美一区二区免费观在线| 久久久久久久久久久99999| 中文字幕久久午夜不卡| 亚洲色图视频网站| 日韩国产精品久久久| 国产米奇在线777精品观看| 成人免费精品视频| 欧美熟乱第一页| 日韩三级视频中文字幕| 亚洲国产激情av| 一区二区国产视频| 老司机精品视频在线| 成人免费看黄yyy456| 欧美三区在线观看| 久久综合av免费| 一区二区三区在线视频免费| 麻豆极品一区二区三区| 成人看片黄a免费看在线| 欧美体内she精高潮| 国产亚洲精品资源在线26u| 亚洲欧美激情视频在线观看一区二区三区 | 免费看精品久久片| av爱爱亚洲一区| 91精品国产aⅴ一区二区| 中文字幕av资源一区| 国产成人在线视频播放| 色婷婷av久久久久久久| 日韩三级精品电影久久久 | 日韩成人午夜精品| 不卡在线观看av| 精品区一区二区| 一区二区三区日韩精品| 国产高清久久久| 91精品国产麻豆国产自产在线 | 精品视频免费在线| 国产精品国产三级国产专播品爱网 | 91超碰这里只有精品国产| 亚洲精品一区二区精华| 亚洲第一在线综合网站| 成人国产免费视频| 久久综合成人精品亚洲另类欧美| 亚洲电影在线播放| 91色porny在线视频| 欧美韩日一区二区三区| 黑人巨大精品欧美一区| 欧美一区二区大片| 五月综合激情网| 欧美性生活久久| 亚洲精品国产精品乱码不99| 不卡的av网站| 亚洲天堂免费看| 成人动漫一区二区| 国产精品国产三级国产普通话三级 | 欧美性猛交xxxxxxxx| 综合久久给合久久狠狠狠97色| 国产精品亚洲人在线观看| 日韩精品一区二区三区swag| 日韩二区三区四区| 欧美电影在线免费观看| 首页欧美精品中文字幕| 欧美日韩黄色影视| 五月天婷婷综合| 欧美一级精品大片| 日本欧美韩国一区三区| 678五月天丁香亚洲综合网| 香蕉影视欧美成人| 欧美一区二区三区四区视频| 美国毛片一区二区三区| 26uuu久久天堂性欧美| 国产精品一区二区免费不卡| 中文字幕一区不卡| 精品国产a毛片| 成人毛片视频在线观看| 亚洲精品成人精品456| 欧美视频一区二区三区四区| 日本人妖一区二区| 国产色综合一区| 99精品视频在线观看免费| 亚洲国产成人精品视频| 日韩一区二区在线观看视频| 国产黄色91视频| 亚洲激情校园春色| 3d成人动漫网站| 国产·精品毛片| 玉米视频成人免费看| 欧美一区二区三区啪啪| 成人精品gif动图一区| 一区二区三区av电影| 精品免费99久久| 成人黄页在线观看| 香蕉加勒比综合久久| 久久久精品免费免费| 色吧成人激情小说| 精彩视频一区二区三区| 亚洲日本在线视频观看| 欧美mv和日韩mv国产网站| 丁香婷婷深情五月亚洲| 视频一区二区欧美| 久久久国产一区二区三区四区小说| 99久久伊人网影院| 美腿丝袜在线亚洲一区| 亚洲九九爱视频| 精品第一国产综合精品aⅴ| 色菇凉天天综合网| 国产.欧美.日韩| 日本视频一区二区| 一区二区三区精品| 欧美国产精品一区| 日韩欧美国产一区在线观看| 91免费在线视频观看| 国产一区二区0| 三级亚洲高清视频| 亚洲老妇xxxxxx| 国产欧美日韩综合| 日韩精品资源二区在线| 欧美性色综合网| 成人久久18免费网站麻豆| 国产在线不卡一区| 午夜精品爽啪视频| 亚洲小说欧美激情另类| 亚洲老司机在线| 日韩美女精品在线| 国产亚洲成av人在线观看导航| 欧美一卡2卡三卡4卡5免费| 欧美丝袜丝nylons| 91国内精品野花午夜精品 | 欧美三级视频在线观看| aaa亚洲精品一二三区| 粉嫩av一区二区三区粉嫩| 国产一本一道久久香蕉| 精品一区二区精品| 韩国精品久久久| 欧美日韩一区二区三区四区| 91女厕偷拍女厕偷拍高清| a美女胸又www黄视频久久| 国产成人免费在线视频| 福利一区二区在线| 成人一区二区三区在线观看| 丰满放荡岳乱妇91ww| 粉嫩嫩av羞羞动漫久久久| 国产v综合v亚洲欧| 成人午夜激情视频| 99国产精品国产精品久久| 99在线精品一区二区三区| 99久久精品国产毛片| 91老司机福利 在线| 色老汉一区二区三区| 91麻豆精品国产| 日韩一二三四区| 久久精品人人爽人人爽| 中文字幕免费在线观看视频一区| 国产精品久久国产精麻豆99网站| 亚洲精品日韩综合观看成人91| 亚洲激情一二三区| 美日韩一区二区| 国产精品1024| 99久久精品一区| 欧美蜜桃一区二区三区| 日韩美一区二区三区| 中文字幕不卡在线| 亚洲一区二区精品3399| 免费在线观看日韩欧美| 精品一区二区三区在线播放| 盗摄精品av一区二区三区| 一本久道久久综合中文字幕| 欧美绝品在线观看成人午夜影视| 精品国内二区三区| 国产精品久99| 另类综合日韩欧美亚洲| 成人h动漫精品一区二| 欧美疯狂做受xxxx富婆| 国产婷婷精品av在线| 夜夜揉揉日日人人青青一国产精品| 日韩黄色小视频| 91免费看视频| 2023国产精品| 一区二区激情视频| 成人一区二区三区在线观看| 欧美日韩一级大片网址| 欧美激情艳妇裸体舞| 青青草91视频| 欧美在线视频全部完| 久久久蜜桃精品| 日本少妇一区二区| 欧美在线视频全部完| 综合久久久久综合|