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

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

?? stm32f10x_tim1.c

?? 萬利開發板上的lcd例程
?? C
?? 第 1 頁 / 共 5 頁
字號:
  TIM1->SMCR &=  SMCR_SMS_Mask;
}
/*******************************************************************************
* Function Name  : TIM1_ETRClockMode1Config
* Description    : Configures the TIM1 External clock Mode1
* Input          : - TIM1_ExtTRGPrescaler: The external Trigger Prescaler.
*                    It can be one of the following values:
*                       - TIM1_ExtTRGPSC_OFF
*                       - TIM1_ExtTRGPSC_DIV2
*                       - TIM1_ExtTRGPSC_DIV4
*                       - TIM1_ExtTRGPSC_DIV8.
*                  - TIM1_ExtTRGPolarity: The external Trigger Polarity.
*                    It can be one of the following values:
*                       - TIM1_ExtTRGPolarity_Inverted
*                       - TIM1_ExtTRGPolarity_NonInverted
*                  - ExtTRGFilter: External Trigger Filter.
*                    This parameter must be a value between 0x00 and 0x0F
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_ETRClockMode1Config(u16 TIM1_ExtTRGPrescaler, u16 TIM1_ExtTRGPolarity,
                             u16 ExtTRGFilter)
{
  /* Check the parameters */
  assert(IS_TIM1_EXT_PRESCALER(TIM1_ExtTRGPrescaler));
  assert(IS_TIM1_EXT_POLARITY(TIM1_ExtTRGPolarity));

  /* Configure the ETR Clock source */
  TIM1_ETRConfig(TIM1_ExtTRGPrescaler, TIM1_ExtTRGPolarity, ExtTRGFilter);

  /* Select the External clock mode1 */
  TIM1->SMCR &= SMCR_SMS_Mask;
  TIM1->SMCR |= TIM1_SlaveMode_External1;
  
  /* Select the Trigger selection : ETRF */
  TIM1->SMCR &= SMCR_TS_Mask;
  TIM1->SMCR |= TIM1_TS_ETRF;
}

/*******************************************************************************
* Function Name  : TIM1_ETRClockMode2Config
* Description    : Configures the TIM1 External clock Mode2
* Input          : - TIM1_ExtTRGPrescaler: The external Trigger Prescaler.
*                    It can be one of the following values:
*                       - TIM1_ExtTRGPSC_OFF
*                       - TIM1_ExtTRGPSC_DIV2
*                       - TIM1_ExtTRGPSC_DIV4
*                       - TIM1_ExtTRGPSC_DIV8
*                  - TIM1_ExtTRGPolarity: The external Trigger Polarity.
*                    It can be one of the following values:
*                       - TIM1_ExtTRGPolarity_Inverted
*                       - TIM1_ExtTRGPolarity_NonInverted
*                  - ExtTRGFilter: External Trigger Filter.
*                    This parameter must be a value between 0x00 and 0x0F
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_ETRClockMode2Config(u16 TIM1_ExtTRGPrescaler, u16 TIM1_ExtTRGPolarity,
                             u16 ExtTRGFilter)
{
  /* Check the parameters */
  assert(IS_TIM1_EXT_PRESCALER(TIM1_ExtTRGPrescaler));
  assert(IS_TIM1_EXT_POLARITY(TIM1_ExtTRGPolarity));

  /* Configure the ETR Clock source */
  TIM1_ETRConfig(TIM1_ExtTRGPrescaler, TIM1_ExtTRGPolarity, ExtTRGFilter);

  /* Enable the External clock mode2 */
  *(vu32 *) SMCR_ECE_BB = SMCR_ECE_Set;
}

/*******************************************************************************
* Function Name  : TIM1_ETRConfig
* Description    : Configures the TIM1 External Trigger (ETR).
* Input          : - TIM1_ExtTRGPrescaler: The external Trigger Prescaler.
*                    This parameter can be one of the following values:
*                       - TIM1_ExtTRGPSC_OFF
*                       - TIM1_ExtTRGPSC_DIV2
*                       - TIM1_ExtTRGPSC_DIV4
*                       - TIM1_ExtTRGPSC_DIV8
*                  - TIM1_ExtTRGPolarity: The external Trigger Polarity.
*                    This parameter can be one of the following values:
*                       - TIM1_ExtTRGPolarity_Inverted
*                       - TIM1_ExtTRGPolarity_NonInverted
*                  - ExtTRGFilter: External Trigger Filter.
*                    This parameter must be a value between 0x00 and 0x0F.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_ETRConfig(u16 TIM1_ExtTRGPrescaler, u16 TIM1_ExtTRGPolarity,
                    u16 ExtTRGFilter)
{
  u32 tmpsmcr = 0;

  tmpsmcr = TIM1->SMCR;

  /* Set the Prescaler, the Filter value and the Polarity */
  tmpsmcr &= SMCR_ETR_Mask;
  tmpsmcr |= TIM1_ExtTRGPrescaler | TIM1_ExtTRGPolarity | (u16)((u16)ExtTRGFilter << 8);

  TIM1->SMCR = (u16)tmpsmcr;
}

/*******************************************************************************
* Function Name  : TIM1_ITRxExternalClockConfig
* Description    : Configures the TIM1 Internal Trigger as External Clock
* Input          : - TIM1_ITRSource: Internal Trigger source.
*                    This parameter can be one of the following values:
*                       - TIM1_TS_ITR0: Internal Trigger 0
*                       - TIM1_TS_ITR1: Internal Trigger 1
*                       - TIM1_TS_ITR2: Internal Trigger 2
*                       - TIM1_TS_ITR3: Internal Trigger 3
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_ITRxExternalClockConfig(u16 TIM1_InputTriggerSource)
{
  /* Check the parameters */
  assert(IS_TIM1_INTERNAL_TRIGGER_SELECTION(TIM1_InputTriggerSource));
  
  /* Select the Internal Trigger */
  TIM1_SelectInputTrigger(TIM1_InputTriggerSource);

  /* Select the External clock mode1 */
  TIM1->SMCR |= TIM1_SlaveMode_External1;
}

/*******************************************************************************
* Function Name  : TIM1_TIxExternalClockConfig
* Description    : Configures the TIM1 Trigger as External Clock
* Input          : - TIM1_TIxExternalCLKSource: Trigger source.
*                    This parameter can be one of the following values:
*                       - TIM1_TS_TI1F_ED: TI1 Edge Detector
*                       - TIM1_TS_TI1FP1: Filtered TIM1 Input 1
*                       - TIM1_TS_TI2FP2: Filtered TIM1 Input 2
*                  - TIM1_ICPolarity: specifies the TIx Polarity.
*                    This parameter can be:
*                       - TIM1_ICPolarity_Rising
*                       - TIM1_ICPolarity_Falling
*                   - ICFilter : specifies the filter value.
*                     This parameter must be a value between 0x0 and 0xF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_TIxExternalClockConfig(u16 TIM1_TIxExternalCLKSource,
                                u16 TIM1_ICPolarity, u8 ICFilter)
{
  /* Check the parameters */
  assert(IS_TIM1_TIX_TRIGGER_SELECTION(TIM1_TIxExternalCLKSource));
  assert(IS_TIM1_IC_POLARITY(TIM1_ICPolarity));
  assert(IS_TIM1_IC_FILTER(ICFilter));

  /* Configure the TIM1 Input Clock Source */
  if (TIM1_TIxExternalCLKSource == TIM1_TIxExternalCLK1Source_TI2)
  {
    TI2_Config(TIM1_ICPolarity, TIM1_ICSelection_DirectTI, ICFilter);
  }
  else
  {
    TI1_Config(TIM1_ICPolarity, TIM1_ICSelection_DirectTI, ICFilter);
  }

  /* Select the Trigger source */
  TIM1_SelectInputTrigger(TIM1_TIxExternalCLKSource);

  /* Select the External clock mode1 */
  TIM1->SMCR |= TIM1_SlaveMode_External1;
}
/*******************************************************************************
* Function Name  : TIM1_SelectInputTrigger
* Description    : Selects the TIM1 Input Trigger source
* Input          : - TIM1_InputTriggerSource: The Trigger source.
*                    This parameter can be one of the following values:
*                       - TIM1_TS_ITR0: Internal Trigger 0
*                       - TIM1_TS_ITR1: Internal Trigger 1
*                       - TIM1_TS_ITR2: Internal Trigger 2
*                       - TIM1_TS_ITR3: Internal Trigger 3
*                       - TIM1_TS_TI1F_ED: TI1 Edge Detector
*                       - TIM1_TS_TI1FP1: Filtered Timer Input 1
*                       - TIM1_TS_TI2FP2: Filtered Timer Input 2
*                       - TIM1_TS_ETRF: External Trigger input
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_SelectInputTrigger(u16 TIM1_InputTriggerSource)
{
  u32 tmpsmcr = 0;

  /* Check the parameters */
  assert(IS_TIM1_TRIGGER_SELECTION(TIM1_InputTriggerSource));

  tmpsmcr = TIM1->SMCR;

  /* Select the Tgigger Source */
  tmpsmcr &= SMCR_TS_Mask;
  tmpsmcr |= TIM1_InputTriggerSource;

  TIM1->SMCR = (u16)tmpsmcr;
}

/*******************************************************************************
* Function Name  : TIM1_UpdateDisableConfig
* Description    : Enables or Disables the TIM1 Update event.
* Input          : - Newstate: new state of the TIM1 peripheral Preload register
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_UpdateDisableConfig(FunctionalState Newstate)
{
  /* Check the parameters */
  assert(IS_FUNCTIONAL_STATE(Newstate));

  /* Set or Reset the UDIS Bit */
  *(vu32 *) CR1_UDIS_BB = (u16)Newstate;
}

/*******************************************************************************
* Function Name  : TIM1_UpdateRequestConfig
* Description    : Selects the TIM1 Update Request Interrupt source.
* Input          : - TIM1_UpdateSource: specifies the Update source.
*                    This parameter can be one of the following values:
*                       - TIM1_UpdateSource_Regular
*                       - TIM1_UpdateSource_Global
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_UpdateRequestConfig(u8 TIM1_UpdateSource)
{
  /* Check the parameters */
  assert(IS_TIM1_UPDATE_SOURCE(TIM1_UpdateSource));

  /* Set or Reset the URS Bit */
  *(vu32 *) CR1_URS_BB = TIM1_UpdateSource;
}

/*******************************************************************************
* Function Name  : TIM1_SelectHallSensor
* Description    : Enables or disables the TIM1抯 Hall sensor interface.
* Input          : - Newstate: new state of the TIM1 Hall sensor interface
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_SelectHallSensor(FunctionalState Newstate)
{
  /* Check the parameters */
  assert(IS_FUNCTIONAL_STATE(Newstate));

  /* Set or Reset the TI1S Bit */
  *(vu32 *) CR2_TI1S_BB = (u16)Newstate;
}

/*******************************************************************************
* Function Name  : TIM1_SelectOPM
* Description    : Enables or disables the TIM1抯 One Pulse Mode.
* Input          : - TIM1_OPMode: specifies the OPM Mode to be used.
*                    This parameter can be one of the following values:
*                    - TIM1_OPMode_Single
*                    - TIM1_OPMode_Repetitive
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_SelectOnePulseMode(u16 TIM1_OPMode)
{
  /* Check the parameters */
  assert(IS_TIM1_OPM_MODE(TIM1_OPMode));

  /* Set or Reset the OPM Bit */
  *(vu32 *) CR1_OPM_BB = TIM1_OPMode;
}

/*******************************************************************************
* Function Name  : TIM1_SelectOutputTrigger
* Description    : Selects the TIM1 Trigger Output Mode.
* Input          : - TIM1_TRGOSource: specifies the Trigger Output source.
*                    This paramter can be one of the following values:
*                       - TIM1_TRGOSource_Reset
*                       - TIM1_TRGOSource_Enable
*                       - TIM1_TRGOSource_Update
*                       - TIM1_TRGOSource_OC1
*                       - TIM1_TRGOSource_OC1Ref
*                       - TIM1_TRGOSource_OC2Ref
*                       - TIM1_TRGOSource_OC3Ref
*                       - TIM1_TRGOSource_OC4Ref
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_SelectOutputTrigger(u16 TIM1_TRGOSource)
{
  u32 tmpcr2 = 0;

  /* Check the parameters */
  assert(IS_TIM1_TRGO_SOURCE(TIM1_TRGOSource));

  tmpcr2 = TIM1->CR2;

  /* Reset the MMS Bits */
  tmpcr2 &= CR2_MMS_Mask;

  /* Select the TRGO source */
  tmpcr2 |=  TIM1_TRGOSource;

  TIM1->CR2 = (u16)tmpcr2;
}

/*******************************************************************************
* Function Name  : TIM1_SelectSlaveMode
* Description    : Selects the TIM1 Slave Mode.
* Input          : - TIM1_SlaveMode: specifies the TIM1 Slave Mode.
*                    This paramter can be one of the following values:
*                       - TIM1_SlaveMode_Reset
*                       - TIM1_SlaveMode_Gated
*                       - TIM1_SlaveMode_Trigger
*                       - TIM1_SlaveMode_External1
* Output         : None
* Return         : None
*******************************************************************************/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷夜色潮精品综合在线| k8久久久一区二区三区 | 日韩精品一区二区三区在线| 成人性生交大合| 国内成人自拍视频| 亚洲精品午夜久久久| www.亚洲在线| 亚洲视频一区二区在线| 久久亚洲一级片| www国产亚洲精品久久麻豆| 日韩欧美高清一区| 欧美成人a在线| 精品久久一区二区三区| 精品国产1区二区| 久久蜜桃香蕉精品一区二区三区| 日韩欧美色综合| 久久综合九色综合97_久久久| 精品国产免费一区二区三区四区| 日韩欧美一级二级三级| 国产亚洲一区字幕| 国产精品色眯眯| 亚洲欧美日本在线| 日本sm残虐另类| 激情综合一区二区三区| 成人av在线播放网址| 99精品久久只有精品| 欧美午夜精品久久久| 91麻豆精品国产91久久久久| 日韩精品一区二区三区视频播放| 久久久精品国产99久久精品芒果| 国产日本亚洲高清| 亚洲精品免费在线观看| 日韩成人免费在线| 国产99久久久精品| 欧美午夜一区二区三区| 日韩一级二级三级精品视频| 久久精品无码一区二区三区| 亚洲嫩草精品久久| 秋霞电影网一区二区| 成人综合日日夜夜| 制服丝袜成人动漫| 国产精品久久久久久久久久久免费看| 亚洲欧美一区二区三区国产精品| 午夜电影久久久| 国产精品乡下勾搭老头1| 91久久线看在观草草青青 | 亚洲电影在线免费观看| 国产一区91精品张津瑜| 欧美最猛黑人xxxxx猛交| 日韩欧美国产不卡| 亚洲主播在线播放| 丁香啪啪综合成人亚洲小说| 制服.丝袜.亚洲.另类.中文| 亚洲精选一二三| 国产成人一区二区精品非洲| 香蕉加勒比综合久久 | 午夜精品久久一牛影视| 国产成人精品免费在线| 91精品午夜视频| 亚洲精品免费在线| av成人动漫在线观看| 国产一区二区久久| 色综合视频在线观看| 久久蜜桃一区二区| 久久国产夜色精品鲁鲁99| 欧美性xxxxxxxx| 一区二区三区免费网站| 99精品热视频| 成人性生交大片免费看中文| 亚洲一区视频在线观看视频| 亚洲精品成人a在线观看| 日韩欧美国产一区二区三区| 在线观看日韩高清av| 丰满白嫩尤物一区二区| 国产ts人妖一区二区| 奇米888四色在线精品| 亚洲美女在线一区| 中文字幕日韩av资源站| 国产亚洲va综合人人澡精品| 欧洲色大大久久| 成人午夜视频在线| 国产性色一区二区| 国产综合久久久久久鬼色| 欧美一区二区私人影院日本| 亚洲综合色网站| 久久精品欧美一区二区三区麻豆| 国产精品成人一区二区三区夜夜夜| 亚洲综合视频在线观看| 91黄色在线观看| 国产精品久久久久7777按摩| 久久精品国产一区二区| 国产精品久久国产精麻豆99网站| 成人免费毛片app| 91精品国模一区二区三区| 青青青伊人色综合久久| 在线综合视频播放| 日韩不卡免费视频| 99国产精品一区| 亚洲第一搞黄网站| 亚洲高清一区二区三区| 亚洲制服丝袜av| 性感美女久久精品| 肉丝袜脚交视频一区二区| 亚洲成人免费在线观看| 亚洲一区二区免费视频| av网站免费线看精品| 91麻豆精品国产91久久久使用方法 | 成人激情文学综合网| 国产日韩欧美激情| 国产一区二区三区四区在线观看| 国产成人精品亚洲777人妖| 精品无人区卡一卡二卡三乱码免费卡 | 免费高清视频精品| 日韩理论片网站| 成人免费av网站| 国产精品毛片大码女人| 欧美日韩一区不卡| 北条麻妃一区二区三区| 欧美高清在线一区| 99精品1区2区| 亚洲精品第一国产综合野| 亚洲国产日韩av| 国产精品麻豆久久久| 91一区二区在线| 久久久久国产精品麻豆| 制服丝袜亚洲精品中文字幕| 欧美在线观看一区二区| 国产精品福利一区二区| 日本韩国一区二区三区| 懂色av一区二区在线播放| 国产精品日日摸夜夜摸av| 亚洲欧美在线另类| 欧美国产一区在线| 亚洲成人资源网| av一区二区不卡| 国产精品自拍av| 亚洲影视在线观看| 国产成人无遮挡在线视频| 国精品**一区二区三区在线蜜桃| 国产欧美精品在线观看| 色婷婷激情久久| 国产精品国产馆在线真实露脸| 欧美精品 国产精品| 成人动漫一区二区三区| 精品国产成人系列| 天天色天天爱天天射综合| 亚洲午夜在线视频| 91麻豆免费在线观看| 色屁屁一区二区| 亚洲成在人线在线播放| 欧美大白屁股肥臀xxxxxx| 欧美国产日产图区| 色综合久久综合网| 伦理电影国产精品| 欧美激情资源网| 国内精品伊人久久久久影院对白| 天天色天天爱天天射综合| 精品一二三四区| 成人精品亚洲人成在线| 午夜亚洲福利老司机| 国产精品福利在线播放| 91国偷自产一区二区使用方法| 欧美videos大乳护士334| 国产乱码精品一区二区三区av | 国产xxx精品视频大全| 91蜜桃在线观看| 亚洲国产va精品久久久不卡综合 | 一区二区三区成人| 欧美精品xxxxbbbb| 欧美日韩免费观看一区二区三区| 国产成人99久久亚洲综合精品| 4438x成人网最大色成网站| 欧美一区二区三区白人| 麻豆精品国产91久久久久久| 亚洲综合色区另类av| 欧美三日本三级三级在线播放| 精品视频一区 二区 三区| 成人激情av网| 国产乱码字幕精品高清av| 亚洲免费观看高清完整版在线观看| 色偷偷一区二区三区| 欧美性色欧美a在线播放| 欧美日韩一区中文字幕| 欧美mv和日韩mv的网站| 欧美a级一区二区| 日韩黄色免费电影| 亚洲美女屁股眼交| 久久夜色精品国产欧美乱极品| thepron国产精品| 另类人妖一区二区av| 制服丝袜av成人在线看| 91久久精品日日躁夜夜躁欧美| 欧美视频在线播放| 国产亚洲精品中文字幕| 亚洲国产视频a| 国产制服丝袜一区| 欧美二区在线观看| av一区二区三区四区| 欧美亚洲禁片免费| 亚洲午夜三级在线|