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

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

?? stm32f10x_tim.c

?? STM32F10x USB Library V1.0
?? C
?? 第 1 頁 / 共 5 頁
字號:
    else if (TIM_ICInitStruct->TIM_Channel == TIM_Channel_2)
    {
      /* TI2 Configuration */
      TI2_Config(TIMx, TIM_ICInitStruct->TIM_ICPolarity,
                 TIM_ICInitStruct->TIM_ICSelection,
                 TIM_ICInitStruct->TIM_ICFilter);

      /* Set the Input Capture Prescaler value */
      TIM_SetIC2Prescaler(TIMx, TIM_ICInitStruct->TIM_ICPrescaler);
    }
    else if (TIM_ICInitStruct->TIM_Channel == TIM_Channel_3)
    {
      /* TI3 Configuration */
      TI3_Config(TIMx, TIM_ICInitStruct->TIM_ICPolarity,
                 TIM_ICInitStruct->TIM_ICSelection,
                 TIM_ICInitStruct->TIM_ICFilter);

      /* Set the Input Capture Prescaler value */
      TIM_SetIC3Prescaler(TIMx, TIM_ICInitStruct->TIM_ICPrescaler);
    }
    else /* TIM_Channel_4 */
    {
      /* TI4 Configuration */
      TI4_Config(TIMx, TIM_ICInitStruct->TIM_ICPolarity,
                 TIM_ICInitStruct->TIM_ICSelection,
                 TIM_ICInitStruct->TIM_ICFilter);

      /* Set the Input Capture Prescaler value */
      TIM_SetIC4Prescaler(TIMx, TIM_ICInitStruct->TIM_ICPrescaler);
    }
  }
  else
  {
    PWMI_Config(TIMx, TIM_ICInitStruct);
  }
}

/*******************************************************************************
* Function Name  : TIM_TimeBaseStructInit
* Description    : Fills each TIM_TimeBaseInitStruct member with its default value.
* Input          : - TIM_TimeBaseInitStruct: pointer to a TIM_TimeBaseInitTypeDef
*                    structure which will be initialized.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_TimeBaseStructInit(TIM_TimeBaseInitTypeDef* TIM_TimeBaseInitStruct)
{
  /* Set the default configuration */
  TIM_TimeBaseInitStruct->TIM_Period = TIM_Period_Reset_Mask;
  TIM_TimeBaseInitStruct->TIM_Prescaler = TIM_Prescaler_Reset_Mask;
  TIM_TimeBaseInitStruct->TIM_ClockDivision = TIM_CKD_DIV1;
  TIM_TimeBaseInitStruct->TIM_CounterMode = TIM_CounterMode_Up;
}

/*******************************************************************************
* Function Name  : TIM_OCStructInit
* Description    : Fills each TIM_OCInitStruct member with its default value.
* Input          : - TIM_OCInitStruct: pointer to a TIM_OCInitTypeDef structure
*                    which will be initialized.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_OCStructInit(TIM_OCInitTypeDef* TIM_OCInitStruct)
{
  /* Set the default configuration */
  TIM_OCInitStruct->TIM_OCMode = TIM_OCMode_Timing;
  TIM_OCInitStruct->TIM_Channel = TIM_Channel_1;
  TIM_OCInitStruct->TIM_Pulse = TIM_Pulse_Reset_Mask;
  TIM_OCInitStruct->TIM_OCPolarity = TIM_OCPolarity_High;
}

/*******************************************************************************
* Function Name  : TIM_ICStructInit
* Description    : Fills each TIM_InitStruct member with its default value.
* Input          : - TIM_ICInitStruct: pointer to a TIM_ICInitTypeDef structure
*                    which will be initialized.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ICStructInit(TIM_ICInitTypeDef* TIM_ICInitStruct)
{
  /* Set the default configuration */
  TIM_ICInitStruct->TIM_ICMode = TIM_ICMode_ICAP;
  TIM_ICInitStruct->TIM_Channel = TIM_Channel_1;
  TIM_ICInitStruct->TIM_ICPolarity = TIM_ICPolarity_Rising;
  TIM_ICInitStruct->TIM_ICSelection = TIM_ICSelection_DirectTI;
  TIM_ICInitStruct->TIM_ICPrescaler = TIM_ICPSC_DIV1;
  TIM_ICInitStruct->TIM_ICFilter = TIM_ICFilter_Mask;
}

/*******************************************************************************
* Function Name  : TIM_Cmd
* Description    : Enables or disables the specified TIM peripheral.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIMx peripheral.
*                  - Newstate: new state of the TIMx peripheral.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_Cmd(TIM_TypeDef* TIMx, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  
  if (NewState != DISABLE)
  {
    /* Enable the TIM Counter */
    TIMx->CR1 |= CR1_CEN_Set;
  }
  else
  {
    /* Disable the TIM Counter */
    TIMx->CR1 &= CR1_CEN_Reset;
  }
}

/*******************************************************************************
* Function Name  : TIM_ITConfig
* Description    : Enables or disables the TIMx interrupts.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_IT: specifies the TIM interrupts sources to be enabled
*                    or disabled.
*                    This parameter can be any combination of the following values:
*                       - TIM_IT_Update: Timer update Interrupt
*                       - TIM_IT_CC1: Capture Compare 1 Interrupt
*                       - TIM_IT_CC2: Capture Compare 2 Interrupt
*                       - TIM_IT_CC3: Capture Compare 3 Interrupt
*                       - TIM_IT_CC4: Capture Compare 4 Interrupt
*                       - TIM_IT_Trigger: Trigger Interrupt
*                  - Newstate: new state of the specified TIMx interrupts.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ITConfig(TIM_TypeDef* TIMx, u16 TIM_IT, FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_TIM_IT(TIM_IT));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  
  if (NewState != DISABLE)
  {
    /* Enable the Interrupt sources */
    TIMx->DIER |= TIM_IT;
  }
  else
  {
    /* Disable the Interrupt sources */
    TIMx->DIER &= (u16)(~TIM_IT);
  }
}

/*******************************************************************************
* Function Name  : TIM_DMAConfig
* Description    : Configures the TIMx抯 DMA interface.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_DMABase: DMA Base address.
*                    This parameter can be one of the following values:
*                       - TIM_DMABase_CR1, TIM_DMABase_CR2, TIM_DMABase_SMCR,
*                         TIM_DMABase_DIER, TIM_DMABase_SR, TIM_DMABase_EGR,
*                         TIM_DMABase_CCMR1, TIM_DMABase_CCMR2, TIM_DMABase_CCER,
*                         TIM_DMABase_CNT, TIM_DMABase_PSC, TIM_DMABase_ARR,
*                         TIM_DMABase_CCR1, TIM_DMABase_CCR2, TIM_DMABase_CCR3,
*                         TIM_DMABase_CCR4, TIM_DMABase_DCR.
*                  - TIM_DMABurstLength: DMA Burst length.
*                    This parameter can be one value between:
*                    TIM_DMABurstLength_1Byte and TIM_DMABurstLength_18Bytes.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_DMAConfig(TIM_TypeDef* TIMx, u16 TIM_DMABase, u16 TIM_DMABurstLength)
{
  u32 tmpdcr = 0;

  /* Check the parameters */
  assert_param(IS_TIM_DMA_BASE(TIM_DMABase));
  assert_param(IS_TIM_DMA_LENGTH(TIM_DMABurstLength));
  
  tmpdcr = TIMx->DCR;

  /* Reset the DBA and the DBL Bits */
  tmpdcr &= DCR_DMA_Mask;

  /* Set the DMA Base and the DMA Burst Length */
  tmpdcr |= TIM_DMABase | TIM_DMABurstLength;

  TIMx->DCR = (u16)tmpdcr;
}

/*******************************************************************************
* Function Name  : TIM_DMACmd
* Description    : Enables or disables the TIMx抯 DMA Requests.
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_DMASources: specifies the DMA Request sources.
*                    This parameter can be any combination of the following values:
*                       - TIM_DMA_CC1: Capture Compare 1 DMA source
*                       - TIM_DMA_CC2: Capture Compare 2 DMA source
*                       - TIM_DMA_CC3: Capture Compare 3 DMA source
*                       - TIM_DMA_CC4: Capture Compare 4 DMA source
*                       - TIM_DMA_Trigger: Trigger DMA source
*                  - Newstate: new state of the DMA Request sources.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_DMACmd(TIM_TypeDef* TIMx, u16 TIM_DMASource, FunctionalState Newstate)
{
  u32 tmpdier = 0;
  
  /* Check the parameters */
  assert_param(IS_TIM_DMA_SOURCE(TIM_DMASource));
  assert_param(IS_FUNCTIONAL_STATE(Newstate));

  tmpdier = TIMx->DIER;

  if (Newstate != DISABLE)
  {
    /* Enable the DMA sources */
    tmpdier |= TIM_DMASource;
  }
  else
  {
    /* Disable the DMA sources */
    tmpdier &= (u16)(~TIM_DMASource);
  }
  TIMx->DIER = (u16)tmpdier;
}

/*******************************************************************************
* Function Name  : TIM_InternalClockConfig
* Description    : Configures the TIMx interrnal Clock
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_InternalClockConfig(TIM_TypeDef* TIMx)
{
  /* Disable slave mode to clock the prescaler directly with the internal clock */
  TIMx->SMCR &=  SMCR_SMS_Mask;
}
/*******************************************************************************
* Function Name  : TIM_ITRxExternalClockConfig
* Description    : Configures the TIMx Internal Trigger as External Clock
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_ITRSource: 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
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_ITRxExternalClockConfig(TIM_TypeDef* TIMx, u16 TIM_InputTriggerSource)
{
  /* Check the parameters */
  assert_param(IS_TIM_INTERNAL_TRIGGER_SELECTION(TIM_InputTriggerSource));

  /* Select the Internal Trigger */
  TIM_SelectInputTrigger(TIMx, TIM_InputTriggerSource);

  /* Select the External clock mode1 */
  TIMx->SMCR |= TIM_SlaveMode_External1;
}
/*******************************************************************************
* Function Name  : TIM_TIxExternalClockConfig
* Description    : Configures the TIMx Trigger as External Clock
* Input          : - TIMx: where x can be 2, 3 or 4 to select the TIM peripheral.
*                  - TIM_TIxExternalCLKSource: Trigger source.
*                    This parameter can be one of the following values:
*                       - TIM_TIxExternalCLK1Source_TI1ED: TI1 Edge Detector
*                       - TIM_TIxExternalCLK1Source_TI1: Filtered Timer Input 1
*                       - TIM_TIxExternalCLK1Source_TI2: Filtered Timer Input 2
*                  - TIM_ICPolarity: specifies the TIx Polarity.
*                    This parameter can be:
*                       - TIM_ICPolarity_Rising
*                       - TIM_ICPolarity_Falling
*                   - ICFilter : specifies the filter value.
*                     This parameter must be a value between 0x0 and 0xF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_TIxExternalClockConfig(TIM_TypeDef* TIMx, u16 TIM_TIxExternalCLKSource,
                                u16 TIM_ICPolarity, u8 ICFilter)
{
  /* Check the parameters */
  assert_param(IS_TIM_TIXCLK_SOURCE(TIM_TIxExternalCLKSource));
  assert_param(IS_TIM_IC_POLARITY(TIM_ICPolarity));
  assert_param(IS_TIM_IC_FILTER(ICFilter));

  /* Configure the Timer Input Clock Source */
  if (TIM_TIxExternalCLKSource == TIM_TIxExternalCLK1Source_TI2)
  {
    TI2_Config(TIMx, TIM_ICPolarity, TIM_ICSelection_DirectTI, ICFilter);
  }
  else
  {
    TI1_Config(TIMx, TIM_ICPolarity, TIM_ICSelection_DirectTI, ICFilter);
  }

  /* Select the Trigger source */
  TIM_SelectInputTrigger(TIMx, TIM_TIxExternalCLKSource);

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

/*******************************************************************************
* Function Name  : TIM_ETRClockMode1Config
* Description    : Configures the External clock Mode1
* 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_ETRClockMode1Config(TIM_TypeDef* TIMx, u16 TIM_ExtTRGPrescaler, u16 TIM_ExtTRGPolarity,
                             u8 ExtTRGFilter)
{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人h精品动漫一区二区三区| 粉嫩13p一区二区三区| 人妖欧美一区二区| 久久新电视剧免费观看| 在线观看欧美日本| 国产高清一区日本| 日韩一区欧美二区| 一区二区三区不卡视频在线观看| 久久久久国色av免费看影院| 5月丁香婷婷综合| 91精品91久久久中77777| 成人精品gif动图一区| 韩国在线一区二区| 蜜臀久久99精品久久久画质超高清 | 91.成人天堂一区| 色88888久久久久久影院野外| 成人免费高清在线观看| 国产成人在线观看免费网站| 国产一区在线视频| 九色|91porny| 国产精品中文有码| 亚洲精品久久嫩草网站秘色| 国产精品毛片无遮挡高清| 日本一二三不卡| 中文字幕一区二区三区色视频| 国产精品久久一卡二卡| 国产精品日日摸夜夜摸av| 国产精品久久久久婷婷二区次| 伦理电影国产精品| 在线播放亚洲一区| 欧美综合亚洲图片综合区| 欧美麻豆精品久久久久久| 日韩一级片在线播放| 国产蜜臀av在线一区二区三区| 综合久久国产九一剧情麻豆| 五月天国产精品| 国产黄色精品网站| 欧美日韩亚洲另类| 久久久精品免费网站| 亚洲国产一区在线观看| 国产一区二区精品久久99| 在线观看国产精品网站| 欧美成人video| 国产精品久久久久一区二区三区 | 国产精品国产三级国产aⅴ原创 | 久久国产精品99久久久久久老狼| 成人激情小说网站| 欧美美女一区二区三区| 国产女人18水真多18精品一级做| 午夜欧美大尺度福利影院在线看| 高清不卡在线观看av| 欧美大片一区二区| 亚洲综合在线观看视频| 国产成人在线观看| 精品日产卡一卡二卡麻豆| 日韩在线一二三区| 在线亚洲一区二区| 国产精品电影院| 成人午夜在线播放| 国产丝袜欧美中文另类| 激情综合色播五月| 日韩一区二区三区视频| 日日夜夜精品视频天天综合网| 欧美丝袜丝nylons| 丝瓜av网站精品一区二区| 欧美日韩一区二区三区不卡| 亚洲一级电影视频| 欧美性大战久久久| 亚洲午夜免费福利视频| 欧美最猛黑人xxxxx猛交| 亚洲欧美偷拍另类a∨色屁股| 91视频国产资源| 亚洲电影中文字幕在线观看| 欧美色老头old∨ideo| 一区二区三区**美女毛片| 欧美日韩成人综合在线一区二区| 强制捆绑调教一区二区| 日韩一区二区中文字幕| 国产尤物一区二区| 国产精品久久久久影院| 精品视频一区二区三区免费| 免费在线视频一区| 久久久久久久综合| 一本久久综合亚洲鲁鲁五月天 | 中文字幕av一区二区三区| 不卡区在线中文字幕| 亚洲精品国产一区二区三区四区在线| 欧美在线免费播放| 国模一区二区三区白浆| 国产精品美女久久久久久| 欧美综合一区二区三区| 国产一区二区三区在线观看免费| 中文字幕人成不卡一区| 91精品黄色片免费大全| 99精品视频在线观看| 免费在线观看成人| 亚洲综合一区二区三区| 欧美—级在线免费片| 欧美一区二区视频网站| 成人av电影在线观看| 狠狠色丁香久久婷婷综合_中| 亚洲精品亚洲人成人网| 久久日韩粉嫩一区二区三区| 欧美日韩高清影院| 972aa.com艺术欧美| 国产a区久久久| 国产乱人伦偷精品视频免下载| 图片区小说区区亚洲影院| 亚洲老妇xxxxxx| 国产精品无码永久免费888| 精品国偷自产国产一区| 欧美日本免费一区二区三区| 91麻豆精品在线观看| 成人免费观看视频| 成人精品视频一区| 高清国产午夜精品久久久久久| 国产麻豆视频一区| 国产乱人伦偷精品视频不卡 | 国产麻豆欧美日韩一区| 国产一区二区免费在线| 激情综合网最新| 岛国一区二区三区| 不卡电影一区二区三区| 91一区一区三区| 欧美日精品一区视频| 欧美午夜精品久久久久久孕妇| 欧美影视一区二区三区| 欧美中文字幕一区| 日韩精品一区二区三区视频播放| 欧美成va人片在线观看| 久久亚洲综合av| 一区在线观看免费| 日韩精品亚洲专区| 国产一区福利在线| 色综合久久66| 日韩欧美国产综合在线一区二区三区| www日韩大片| 亚洲老司机在线| 久久国内精品视频| 97久久久精品综合88久久| 欧美人狂配大交3d怪物一区| 亚洲精品在线免费观看视频| 亚洲日本丝袜连裤袜办公室| 免费精品视频最新在线| 成人一区二区三区视频在线观看| 欧美日韩一级二级| 欧美—级在线免费片| 日韩高清一区二区| 国产精品亚洲一区二区三区在线| 日本高清无吗v一区| 精品1区2区在线观看| 婷婷综合五月天| 北条麻妃一区二区三区| 欧美电影免费观看完整版| 久久福利视频一区二区| 丁香婷婷综合网| 精品日韩在线一区| 一区二区三区在线观看视频| 风间由美一区二区三区在线观看| 欧美乱妇一区二区三区不卡视频| 中文av字幕一区| 成人中文字幕在线| 久久婷婷成人综合色| 激情另类小说区图片区视频区| 欧美老肥妇做.爰bbww| 亚洲在线中文字幕| 色综合 综合色| 亚洲男人的天堂网| 91一区二区在线观看| 国产精品高清亚洲| 91蜜桃免费观看视频| 中文字幕一区二区三区乱码在线| 国内精品伊人久久久久av影院| 26uuu国产在线精品一区二区| 日本美女视频一区二区| 日韩一区二区影院| 激情六月婷婷久久| 亚洲国产成人在线| 99国产精品国产精品久久| 一区二区三区丝袜| 欧美日韩一区 二区 三区 久久精品 | 久久美女艺术照精彩视频福利播放| 国内不卡的二区三区中文字幕| 久久久久久**毛片大全| 91小视频在线免费看| 亚洲高清在线精品| 日韩欧美视频一区| 777久久久精品| 国产精一品亚洲二区在线视频| 中文字幕在线不卡一区二区三区 | 天天综合网 天天综合色| 欧美麻豆精品久久久久久| 国产精品一区二区三区乱码| 亚洲免费在线播放| 91精品国产欧美一区二区成人| 韩国一区二区三区| 尤物在线观看一区| 国产欧美一区二区精品性色| 欧美老女人第四色| 91麻豆精品在线观看|