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

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

?? stm32f10x_tim.c

?? freertosV4.40 是一種small的嵌入式系統。利于嵌入式開好者入門學習嵌入式操作系統。通過對于源碼的學習可以很好的掌握freertos的運行機制。
?? C
?? 第 1 頁 / 共 5 頁
字號:
    {
      /* 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(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(IS_TIM_IT(TIM_IT));
  assert(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(IS_TIM_DMA_BASE(TIM_DMABase));
  assert(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(IS_TIM_DMA_SOURCE(TIM_DMASource));
  assert(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(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_TS_TI1F_ED: TI1 Edge Detector
*                       - TIM_TS_TI1FP1: Filtered Timer Input 1
*                       - TIM_TS_TI2FP2: 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(IS_TIM_TIX_TRIGGER_SELECTION(TIM_TIxExternalCLKSource));
  assert(IS_TIM_IC_POLARITY(TIM_ICPolarity));
  assert(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)
{
  /* Check the parameters */
  assert(IS_TIM_EXT_PRESCALER(TIM_ExtTRGPrescaler));
  assert(IS_TIM_EXT_POLARITY(TIM_ExtTRGPolarity));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合中文字幕国产| 亚洲最大成人网4388xx| 老司机精品视频一区二区三区| 欧美性受xxxx黑人xyx性爽| 亚洲图片你懂的| 日本韩国一区二区三区视频| 亚洲一区国产视频| 欧美日韩午夜在线| 美洲天堂一区二卡三卡四卡视频| 日韩一区二区三区电影| 经典一区二区三区| 国产精品久久久久影视| 欧美色图片你懂的| 精品一区精品二区高清| 国产精品视频线看| 91蜜桃在线观看| 亚洲午夜免费电影| 日韩欧美国产综合在线一区二区三区 | 亚洲成人先锋电影| 91麻豆精品国产91| 国产成人免费网站| 一区二区三区美女视频| 精品三级在线观看| www.亚洲激情.com| 视频一区欧美精品| 国产精品色哟哟| 欧美久久久影院| 国产毛片精品国产一区二区三区| 亚洲日本免费电影| 日韩欧美国产一区二区三区| 国产69精品久久久久777| 经典三级在线一区| 亚洲在线视频一区| 日本一区二区三区视频视频| 色av一区二区| 国产在线精品不卡| 亚洲精品第1页| 国产日产欧产精品推荐色| 在线一区二区三区四区五区| 美国三级日本三级久久99| 国产精品美女视频| 日韩精品一区二区三区视频播放 | 亚洲免费观看在线视频| 日韩精品一区二区三区三区免费| 色婷婷久久综合| 国产精品资源在线观看| 婷婷激情综合网| 亚洲区小说区图片区qvod| 2023国产精品自拍| 欧美丰满美乳xxx高潮www| 成人三级伦理片| 久久99精品久久久久| 亚洲一区二区三区影院| 国产精品色在线| 久久综合网色—综合色88| 欧美男同性恋视频网站| 91丨九色丨蝌蚪富婆spa| 国产精品一区二区久激情瑜伽| 日韩高清电影一区| 亚洲成av人在线观看| 中文字幕一区二区三区精华液| 久久精品视频在线免费观看 | xfplay精品久久| 7777精品伊人久久久大香线蕉经典版下载| 99在线精品视频| 韩国精品久久久| 精品在线视频一区| 久久99精品国产麻豆不卡| 日本在线观看不卡视频| 亚洲一区二区三区激情| 亚洲一区二区三区四区在线 | 91精品国产一区二区| 在线日韩av片| 色94色欧美sute亚洲13| av男人天堂一区| 丁香六月久久综合狠狠色| 国产麻豆成人传媒免费观看| 久久成人精品无人区| 免费不卡在线观看| 日韩**一区毛片| 成人精品亚洲人成在线| 国产精品一二三四| 国产成人亚洲精品青草天美| 国产精一区二区三区| 风间由美中文字幕在线看视频国产欧美| 国产久卡久卡久卡久卡视频精品| 国产剧情一区二区三区| 懂色av一区二区三区蜜臀 | 99精品久久久久久| 一本久道中文字幕精品亚洲嫩| 色婷婷久久久综合中文字幕 | 成人自拍视频在线| 成人免费高清在线| 色综合久久久久网| 欧美久久久久久久久| 欧美电视剧在线观看完整版| 久久久久久久电影| 中文字幕中文字幕在线一区| 亚洲人成电影网站色mp4| 亚洲国产精品一区二区www在线| 日韩高清一级片| 国产精品亚洲午夜一区二区三区 | 日韩欧美自拍偷拍| 日韩欧美精品在线| 欧美国产1区2区| 亚洲黄色录像片| 老司机一区二区| 国产原创一区二区三区| 色综合久久综合网欧美综合网| 欧美精品久久99| 久久精品夜夜夜夜久久| 亚洲欧美怡红院| 一区二区免费在线| 精品影院一区二区久久久| 成人精品视频网站| 欧美日韩国产一二三| 久久精品亚洲乱码伦伦中文| 亚洲天堂精品视频| 亚洲另类在线一区| 韩国女主播成人在线观看| 91免费视频观看| 精品91自产拍在线观看一区| 成人欧美一区二区三区小说| 老司机午夜精品| 欧洲人成人精品| 久久久精品国产免大香伊| 亚洲国产裸拍裸体视频在线观看乱了 | 亚洲高清免费在线| 国产成人综合网站| 欧美日韩一区成人| 国产精品美女久久久久久久| 青青青爽久久午夜综合久久午夜| hitomi一区二区三区精品| 91精品国产福利| 1区2区3区欧美| 国产一区在线不卡| 欧美日韩免费观看一区三区| 国产精品国产成人国产三级| 激情图片小说一区| 欧美在线观看视频在线| 国产色产综合产在线视频| 天堂一区二区在线免费观看| 91网址在线看| 青草av.久久免费一区| 在线视频亚洲一区| 中文字幕av不卡| 国产精品一二三四五| 91精品国产综合久久久久久漫画| 最新日韩av在线| 国产成人激情av| 精品久久久久香蕉网| 亚洲精品国产精华液| 99这里只有久久精品视频| 国产清纯白嫩初高生在线观看91| 美腿丝袜在线亚洲一区| 欧美精品亚洲二区| 亚洲一区视频在线| 日本久久电影网| 亚洲女同ⅹxx女同tv| av在线不卡免费看| 国产校园另类小说区| 国产大陆亚洲精品国产| 久久夜色精品国产噜噜av| 美女视频黄a大片欧美| 欧美日韩亚洲国产综合| 亚洲mv大片欧洲mv大片精品| 欧洲精品视频在线观看| 亚洲日本在线视频观看| 91小宝寻花一区二区三区| 国产精品乱码一区二三区小蝌蚪| 国产一区视频导航| 精品成人一区二区| 国产麻豆成人精品| 亚洲国产经典视频| 99re视频精品| 亚洲情趣在线观看| 欧美视频在线观看一区| 亚洲福利一二三区| 制服丝袜中文字幕亚洲| 男男gaygay亚洲| 精品国产一二三区| 国产成人av一区二区三区在线观看| 欧美激情在线观看视频免费| 成人伦理片在线| 夜夜嗨av一区二区三区| 欧美精品国产精品| 精久久久久久久久久久| 国产免费观看久久| 色老汉av一区二区三区| 日韩不卡一区二区三区| 精品久久久久久久人人人人传媒| 国内久久婷婷综合| 国产精品视频线看| 欧美日韩国产a| 久久超碰97中文字幕| 国产色综合一区| 欧美午夜精品久久久久久孕妇| 青青草伊人久久| 国产精品免费网站在线观看| 欧美日韩亚洲丝袜制服|