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

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

?? stm32f10x_tim.c

?? FWLib.rar
?? C
?? 第 1 頁 / 共 5 頁
字號:
  /* Check the parameters */
  assert_param(IS_TIM_123458_PERIPH(TIMx));
  assert_param(IS_TIM_DMA_BASE(TIM_DMABase));
  assert_param(IS_TIM_DMA_LENGTH(TIM_DMABurstLength));

  /* Set the DMA Base and the DMA Burst Length */
  TIMx->DCR = TIM_DMABase | TIM_DMABurstLength;
}

/*******************************************************************************
* Function Name  : TIM_DMACmd
* Description    : Enables or disables the TIMx抯 DMA Requests.
* Input          : - TIMx: where x can be  1 to 8 to select the TIM peripheral. 
*                  - TIM_DMASources: specifies the DMA Request sources.
*                    This parameter can be any combination of the following values:
*                       - TIM_DMA_Update: TIM update Interrupt source
*                       - TIM_DMA_CC1: TIM Capture Compare 1 DMA source
*                       - TIM_DMA_CC2: TIM Capture Compare 2 DMA source
*                       - TIM_DMA_CC3: TIM Capture Compare 3 DMA source
*                       - TIM_DMA_CC4: TIM Capture Compare 4 DMA source
*                       - TIM_DMA_COM: TIM Commutation DMA source
*                       - TIM_DMA_Trigger: TIM 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)
{ 
  /* Check the parameters */
  assert_param(IS_TIM_ALL_PERIPH(TIMx));
  assert_param(IS_TIM_DMA_SOURCE(TIM_DMASource));
  assert_param(IS_TIM_PERIPH_DMA(TIMx, TIM_DMASource));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  
  if (NewState != DISABLE)
  {
    /* Enable the DMA sources */
    TIMx->DIER |= TIM_DMASource; 
  }
  else
  {
    /* Disable the DMA sources */
    TIMx->DIER &= (u16)~TIM_DMASource;
  }
}

/*******************************************************************************
* Function Name  : TIM_InternalClockConfig
* Description    : Configures the TIMx interrnal Clock
* Input          : - TIMx: where x can be  1, 2, 3, 4, 5 or 8 to select the TIM 
*                    peripheral.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM_InternalClockConfig(TIM_TypeDef* TIMx)
{
  /* Check the parameters */
  assert_param(IS_TIM_123458_PERIPH(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  1, 2, 3, 4, 5 or 8 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_123458_PERIPH(TIMx));
  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  1, 2, 3, 4, 5 or 8 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, u16 ICFilter)
{
  /* Check the parameters */
  assert_param(IS_TIM_123458_PERIPH(TIMx));
  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  1, 2, 3, 4, 5 or 8 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,
                             u16 ExtTRGFilter)
{
  u16 tmpsmcr = 0;

  /* Check the parameters */
  assert_param(IS_TIM_123458_PERIPH(TIMx));
  assert_param(IS_TIM_EXT_PRESCALER(TIM_ExtTRGPrescaler));
  assert_param(IS_TIM_EXT_POLARITY(TIM_ExtTRGPolarity));
  assert_param(IS_TIM_EXT_FILTER(ExtTRGFilter));

  /* Configure the ETR Clock source */
  TIM_ETRConfig(TIMx, TIM_ExtTRGPrescaler, TIM_ExtTRGPolarity, ExtTRGFilter);
  
  /* Get the TIMx SMCR register value */
  tmpsmcr = TIMx->SMCR;

  /* Reset the SMS Bits */
  tmpsmcr &= SMCR_SMS_Mask;
  /* Select the External clock mode1 */
  tmpsmcr |= TIM_SlaveMode_External1;

  /* Select the Trigger selection : ETRF */
  tmpsmcr &= SMCR_TS_Mask;
  tmpsmcr |= TIM_TS_ETRF;

  /* Write to TIMx SMCR */
  TIMx->SMCR = tmpsmcr;
}

/*******************************************************************************
* Function Name  : TIM_ETRClockMode2Config
* Description    : Configures the External clock Mode2
* Input          : - TIMx: where x can be  1, 2, 3, 4, 5 or 8 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, u16 ExtTRGFilter)
{
  /* Check the parameters */
  assert_param(IS_TIM_123458_PERIPH(TIMx));
  assert_param(IS_TIM_EXT_PRESCALER(TIM_ExtTRGPrescaler));
  assert_param(IS_TIM_EXT_POLARITY(TIM_ExtTRGPolarity));
  assert_param(IS_TIM_EXT_FILTER(ExtTRGFilter));

  /* 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  1, 2, 3, 4, 5 or 8 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,
                   u16 ExtTRGFilter)
{
  u16 tmpsmcr = 0;

  /* Check the parameters */
  assert_param(IS_TIM_123458_PERIPH(TIMx));
  assert_param(IS_TIM_EXT_PRESCALER(TIM_ExtTRGPrescaler));
  assert_param(IS_TIM_EXT_POLARITY(TIM_ExtTRGPolarity));
  assert_param(IS_TIM_EXT_FILTER(ExtTRGFilter));

  tmpsmcr = TIMx->SMCR;

  /* Reset the ETR Bits */
  tmpsmcr &= SMCR_ETR_Mask;

  /* Set the Prescaler, the Filter value and the Polarity */
  tmpsmcr |= TIM_ExtTRGPrescaler | TIM_ExtTRGPolarity | (u16)(ExtTRGFilter << 8);

  /* Write to TIMx SMCR */
  TIMx->SMCR = tmpsmcr;
}

/*******************************************************************************
* Function Name  : TIM_PrescalerConfig
* Description    : Configures the TIMx Prescaler.
* Input          : - TIMx: where x can be  1 to 8 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_param(IS_TIM_ALL_PERIPH(TIMx));
  assert_param(IS_TIM_PRESCALER_RELOAD(TIM_PSCReloadMode));

  /* Set the Prescaler value */
  TIMx->PSC = Prescaler;

  /* Set or reset the UG Bit */
  TIMx->EGR = TIM_PSCReloadMode;
}

/*******************************************************************************
* Function Name  : TIM_CounterModeConfig
* Description    : Specifies the TIMx Counter Mode to be used.
* Input          : - TIMx: where x can be  1, 2, 3, 4, 5 or 8 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)
{
  u16 tmpcr1 = 0;

  /* Check the parameters */
  assert_param(IS_TIM_123458_PERIPH(TIMx));
  assert_param(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;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产激情视频一区二区三区欧美| 丰满白嫩尤物一区二区| 国产婷婷色一区二区三区| 欧美亚洲动漫精品| 国产成人免费视频一区| 天天色天天爱天天射综合| 国产日韩一级二级三级| 91麻豆精品国产91久久久久| av中文字幕不卡| 国产呦萝稀缺另类资源| 日本伊人色综合网| 亚洲精品老司机| 中文字幕不卡在线| 26uuu亚洲| 欧美精彩视频一区二区三区| 91精品国产手机| 日本韩国欧美一区二区三区| 成人午夜激情片| 国产一区欧美一区| 欧美aaaaa成人免费观看视频| 一区二区三区四区乱视频| 欧美高清一级片在线观看| 欧美mv日韩mv国产| 欧美一级一区二区| 正在播放亚洲一区| 欧美三级日本三级少妇99| 色老汉av一区二区三区| 成人av在线看| 成人午夜私人影院| 国产成人av电影在线| 国产真实乱子伦精品视频| 美女视频网站久久| 日本系列欧美系列| 日本午夜一区二区| 日韩av不卡一区二区| 性做久久久久久久免费看| 亚洲综合久久av| 亚洲综合色成人| 亚洲一区二区高清| 视频精品一区二区| 日韩av午夜在线观看| 日本一区中文字幕| 精品一区精品二区高清| 国产一区在线精品| 成人禁用看黄a在线| 成年人午夜久久久| 色女孩综合影院| 欧美系列亚洲系列| 欧美丰满美乳xxx高潮www| 欧美二区在线观看| 欧美不卡激情三级在线观看| 26uuu国产电影一区二区| 久久综合久久综合亚洲| 国产亚洲精品资源在线26u| 中文字幕av免费专区久久| 亚洲少妇30p| 亚洲午夜一区二区三区| 日韩精品视频网站| 精品一区中文字幕| 成人性视频免费网站| 一本一道波多野结衣一区二区| 欧美三级中文字幕| 日韩一级片在线观看| 久久久久久日产精品| 亚洲三级电影网站| 视频一区在线视频| 国产精品一二三| 91日韩精品一区| 欧美美女直播网站| 国产欧美1区2区3区| 一区二区三区美女视频| 琪琪久久久久日韩精品| 国产mv日韩mv欧美| 91久久奴性调教| 精品欧美久久久| 最近日韩中文字幕| 日本不卡一二三区黄网| 成人激情小说乱人伦| 欧美日韩成人综合| 国产日韩视频一区二区三区| 亚洲香肠在线观看| 99视频精品免费视频| 欧美精品1区2区| 国产蜜臀av在线一区二区三区| 亚洲免费在线视频| 久久99精品久久久久久国产越南 | 美腿丝袜亚洲综合| 国产成人av福利| 欧美日韩免费视频| 国产欧美一区二区精品性色超碰 | 欧美日韩第一区日日骚| 国产日韩欧美麻豆| 性做久久久久久免费观看欧美| 国产丶欧美丶日本不卡视频| 欧美久久免费观看| 中文字幕亚洲不卡| 国产精品正在播放| 欧美精品久久久久久久久老牛影院| 国产亚洲欧美日韩日本| 日本一不卡视频| 在线观看av一区二区| 欧美国产精品久久| 久久av资源网| 欧美精品欧美精品系列| 中文字幕日本不卡| 国产精品99久久不卡二区| 91精品国产综合久久国产大片| 亚洲视频一二区| 国产馆精品极品| 精品日韩在线观看| 奇米亚洲午夜久久精品| 欧美日韩综合一区| 亚洲男同1069视频| 成人白浆超碰人人人人| 2021中文字幕一区亚洲| 青青国产91久久久久久 | 欧美日韩一区二区三区视频| 亚洲视频资源在线| 99久久国产综合精品麻豆| 国产亚洲欧美在线| 国产精品18久久久久| 日韩你懂的在线观看| 亚洲国产人成综合网站| 欧洲一区二区三区免费视频| 亚洲欧美日韩国产一区二区三区 | 91蝌蚪国产九色| 国产欧美日韩视频在线观看| 国产一区二区在线看| 精品电影一区二区| 精品一区二区久久| 久久久久久久久岛国免费| 国内国产精品久久| 久久人人97超碰com| 国产综合久久久久久鬼色| 久久婷婷综合激情| 国产黄色成人av| 国产精品久久久久一区二区三区| 国产91精品久久久久久久网曝门| 久久先锋影音av| 风间由美一区二区av101 | 日本不卡一区二区| 日韩免费电影网站| 国产在线播放一区二区三区| 国产女主播在线一区二区| av一区二区三区黑人| 亚洲免费高清视频在线| 欧美日韩一区三区| 麻豆视频观看网址久久| 久久久久国产精品免费免费搜索| 国产不卡视频在线播放| 亚洲欧美一区二区三区久本道91| 一本久道久久综合中文字幕| 亚洲bdsm女犯bdsm网站| 亚洲女与黑人做爰| 欧美日韩在线播放三区四区| 青椒成人免费视频| 国产视频一区在线播放| 99re热这里只有精品视频| 一区二区三区**美女毛片| 欧美电影影音先锋| 国产一区二区三区| 亚洲欧美韩国综合色| 在线成人高清不卡| 国产精品自拍毛片| 亚洲精品高清视频在线观看| 欧美日韩大陆在线| 国产精品影音先锋| 一区二区三区在线视频免费| 欧美日韩大陆在线| 国产精品18久久久久久久久| 亚洲黄色片在线观看| 91精品国产综合久久久久| 国产成人亚洲综合色影视| 亚洲精品国产一区二区精华液| 51精品久久久久久久蜜臀| 国产精一区二区三区| 亚洲福利视频导航| 国产亚洲欧美色| 欧美日韩免费电影| 国产suv一区二区三区88区| 亚洲午夜一二三区视频| 国产日韩欧美电影| 欧美日韩成人综合| av一二三不卡影片| 蜜桃在线一区二区三区| 亚洲色欲色欲www| 欧美videossexotv100| 一本久久精品一区二区 | 91麻豆精品在线观看| 久久精品国产亚洲高清剧情介绍 | 国产精品蜜臀av| 宅男噜噜噜66一区二区66| 99久久综合精品| 久久成人免费电影| 亚洲午夜影视影院在线观看| 中文在线免费一区三区高中清不卡| 91.麻豆视频| 91福利在线导航| 99国产一区二区三精品乱码| 精品一区二区三区免费|