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

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

?? stm32f10x_tim.c

?? 萬利開發板上的lcd例程
?? C
?? 第 1 頁 / 共 5 頁
字號:
      TIM_SetIC1Prescaler(TIMx, TIM_ICInitStruct->TIM_ICPrescaler);
    }
    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(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)
{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91天堂素人约啪| 麻豆精品视频在线| 欧美国产成人精品| 国产亚洲综合在线| 久久久久久久av麻豆果冻| 国产日韩欧美一区二区三区综合| 精品国产成人在线影院| 久久品道一品道久久精品| 久久美女高清视频| 日韩毛片精品高清免费| 亚洲综合一区二区| 青青青伊人色综合久久| 国内精品久久久久影院薰衣草| 国产精品 欧美精品| 97se亚洲国产综合自在线 | 婷婷激情综合网| 丝袜美腿亚洲一区| 久久成人免费日本黄色| 丁香另类激情小说| 91最新地址在线播放| 欧美日韩精品系列| 久久久亚洲精华液精华液精华液 | 成人免费观看av| 欧美中文字幕不卡| 日韩欧美123| 中文字幕一区二| 日本不卡一区二区三区| 高清免费成人av| 欧美美女黄视频| 国产欧美日韩三区| 丝袜亚洲另类欧美综合| 国产精一区二区三区| 色噜噜狠狠色综合中国| 日韩精品专区在线影院重磅| 中文字幕日本不卡| 三级在线观看一区二区| 成人精品视频一区| 在线成人高清不卡| 中文字幕精品综合| 日韩不卡在线观看日韩不卡视频| 国产一区二区不卡老阿姨| 色综合天天综合网国产成人综合天 | 色噜噜偷拍精品综合在线| 欧美日韩国产成人在线免费| 久久精子c满五个校花| 五月婷婷久久丁香| 国产专区欧美精品| 欧美调教femdomvk| 国产午夜久久久久| 久久99精品国产麻豆不卡| av在线播放一区二区三区| 日韩三级视频在线观看| 亚洲国产一区二区在线播放| 国产成人精品免费视频网站| 久久久亚洲精品一区二区三区| 日韩电影在线免费看| 欧美私人免费视频| 亚洲精品一二三四区| a级高清视频欧美日韩| 欧美成人性福生活免费看| 五月激情丁香一区二区三区| 97超碰欧美中文字幕| 中文字幕视频一区二区三区久| 极品尤物av久久免费看| 日韩欧美一二三区| 蜜桃一区二区三区四区| 欧美情侣在线播放| 天天综合色天天综合色h| 欧美精品一卡两卡| 日本中文字幕一区二区有限公司| 欧美日韩国产欧美日美国产精品| 尤物在线观看一区| 欧美亚洲动漫制服丝袜| 亚洲丝袜制服诱惑| 99在线精品观看| 亚洲视频一区二区在线| 日本高清无吗v一区| 亚洲第一狼人社区| 欧美日韩黄色一区二区| 欧美aⅴ一区二区三区视频| 91精品一区二区三区在线观看| 亚洲va欧美va人人爽| 欧美一区二区久久久| 日本不卡在线视频| 中文字幕一区二| 91首页免费视频| 一区二区三区国产| 欧美日韩国产天堂| 国产一区二区在线观看免费| 国产亚洲综合在线| 在线欧美小视频| 日韩1区2区日韩1区2区| 亚洲精品一区在线观看| 大胆欧美人体老妇| 一区二区三区波多野结衣在线观看| 欧美性受xxxx黑人xyx| 老司机精品视频导航| 久久久久久久久久美女| 色噜噜久久综合| 久久99国产精品久久| 中文字幕一区三区| 欧美日韩高清一区二区不卡| 国产一区二三区好的| 亚洲男帅同性gay1069| 欧美一级欧美三级| 91视频.com| 狂野欧美性猛交blacked| 亚洲欧洲韩国日本视频| 欧美一级爆毛片| 99精品欧美一区| 美女在线视频一区| 亚洲激情自拍视频| www亚洲一区| 欧美性受xxxx| aaa欧美大片| 美女看a上一区| 亚洲最快最全在线视频| wwww国产精品欧美| 欧美日韩卡一卡二| 成人av电影观看| 麻豆国产欧美一区二区三区| 有坂深雪av一区二区精品| 久久久久综合网| 日韩免费在线观看| 精品视频在线免费| 91在线视频播放地址| 国产一区二区三区av电影| 亚洲高清一区二区三区| 中文字幕一区二区5566日韩| 26uuu久久天堂性欧美| 欧美日韩成人在线| 91福利在线免费观看| 成人视屏免费看| 国产综合色产在线精品| 日本美女一区二区三区视频| 亚洲国产一二三| 亚洲天堂网中文字| 中文字幕av不卡| 久久综合成人精品亚洲另类欧美| 欧美伦理视频网站| 欧美日韩和欧美的一区二区| 色偷偷久久人人79超碰人人澡| 国产精品影视在线观看| 久久精品理论片| 麻豆一区二区三| 美美哒免费高清在线观看视频一区二区| 一区二区三区在线观看视频| 亚洲免费观看在线视频| 中文字幕在线观看不卡视频| 国产女主播一区| 国产欧美一区二区精品性| 国产亚洲欧美在线| 国产精品美女久久久久久久久久久| 久久精品一区八戒影视| 国产色综合久久| 亚洲欧洲无码一区二区三区| 《视频一区视频二区| 亚洲精品成人在线| 亚洲成人手机在线| 午夜电影网亚洲视频| 日本不卡的三区四区五区| 久久国产精品99久久久久久老狼 | 樱桃国产成人精品视频| 亚洲一二三四在线观看| 偷拍自拍另类欧美| 蜜桃av一区二区三区电影| 精品一区二区三区久久久| 国产成人啪免费观看软件| 成人性生交大片免费看视频在线 | 亚洲图片欧美一区| 日韩av一级电影| 韩国午夜理伦三级不卡影院| 国产一区免费电影| 色天天综合色天天久久| 欧美精品一卡二卡| 国产无一区二区| 亚洲一区免费观看| 99国产精品99久久久久久| 在线视频你懂得一区| 欧美一区二区三区性视频| 国产欧美一区二区在线| 亚洲一区二区三区四区五区黄 | 国产成人综合亚洲网站| 色综合天天综合网国产成人综合天| 欧美日韩国产精品成人| 久久久久久久久久久电影| 亚洲一区在线观看视频| 紧缚捆绑精品一区二区| 色婷婷精品久久二区二区蜜臂av| 欧美一区二区三区啪啪| 国产精品毛片久久久久久久| 日韩精品三区四区| 色综合激情久久| www国产精品av| 亚洲精品免费看| 国产成人在线网站| 制服丝袜亚洲精品中文字幕| 欧美va亚洲va国产综合| 一区二区三区加勒比av| 成人性生交大片|