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

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

?? stm32f10x_tim1.c

?? STM32_TIM1_Example
?? C
?? 第 1 頁 / 共 5 頁
字號:
  /* Disable slave mode to clock the prescaler directly with the internal clock */
  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_param(IS_TIM1_EXT_PRESCALER(TIM1_ExtTRGPrescaler));
  assert_param(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_param(IS_TIM1_EXT_PRESCALER(TIM1_ExtTRGPrescaler));
  assert_param(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_param(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_param(IS_TIM1_TIX_TRIGGER_SELECTION(TIM1_TIxExternalCLKSource));
  assert_param(IS_TIM1_IC_POLARITY(TIM1_ICPolarity));
  assert_param(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_param(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_param(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_param(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_param(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_param(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_param(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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品专区在线| 337p亚洲精品色噜噜狠狠| 久久亚洲一区二区三区四区| 日本欧美一区二区| 日韩女优制服丝袜电影| 国产综合成人久久大片91| 91精品国产品国语在线不卡| 美女在线视频一区| 久久久三级国产网站| 国产成人免费视频一区| 一区视频在线播放| 欧美三级三级三级| 狠狠狠色丁香婷婷综合激情| 中文一区二区在线观看| 色哟哟日韩精品| 日韩国产在线一| 久久久午夜电影| 99精品久久只有精品| 亚洲第一在线综合网站| 欧美xxxxxxxx| jlzzjlzz欧美大全| 水野朝阳av一区二区三区| 欧美一区2区视频在线观看| 国产一区二区精品在线观看| 亚洲色图在线播放| 日韩欧美一二三四区| 成人黄色综合网站| 性欧美疯狂xxxxbbbb| 久久精品人人做人人爽97| 国产成人精品aa毛片| 一个色在线综合| 日韩欧美一区二区视频| 99视频一区二区三区| 日韩精品高清不卡| 亚洲天堂福利av| 亚洲精品一区二区三区福利| www.性欧美| 久久超级碰视频| 性久久久久久久| 国产精品区一区二区三区 | 国产精品一品二品| 亚洲国产wwwccc36天堂| 国产欧美精品日韩区二区麻豆天美| 91福利视频在线| 国产精品一区二区在线观看不卡| 亚洲一区在线观看免费| 国产午夜精品美女毛片视频| 欧美日韩视频在线一区二区| 成人性生交大片免费| 免播放器亚洲一区| 亚洲第一搞黄网站| 国产清纯在线一区二区www| 欧美一级淫片007| 欧美亚洲一区三区| 91原创在线视频| 丰满白嫩尤物一区二区| 久久精品国产亚洲一区二区三区| 一区二区三区.www| 亚洲欧美一区二区视频| 久久伊人蜜桃av一区二区| 5858s免费视频成人| 欧美自拍偷拍一区| 色综合久久综合网| 91在线云播放| 成人国产精品免费观看| 国产盗摄精品一区二区三区在线| 免费成人av在线播放| 视频一区在线播放| 亚洲国产精品一区二区www在线| 亚洲欧洲国产专区| 国产精品久久久久9999吃药| 久久久久久久久久久久久久久99| 日韩欧美不卡一区| 日韩小视频在线观看专区| 欧美日韩成人一区二区| 欧美色手机在线观看| 日本韩国一区二区| 欧洲精品一区二区| 欧美体内she精视频| 在线看国产一区| 欧美私模裸体表演在线观看| 一本大道av伊人久久综合| 色天使色偷偷av一区二区| 91久久精品一区二区三| 在线欧美日韩精品| 欧美日韩免费在线视频| 6080日韩午夜伦伦午夜伦| 日韩精品一区二区三区在线播放| 欧美va亚洲va| 国产日韩精品一区二区浪潮av| 欧美激情一区二区三区四区| 久久久五月婷婷| 亚洲欧美电影院| 性感美女极品91精品| 蜜桃视频在线一区| 国产精品一级在线| 99久久久久久99| 欧美欧美午夜aⅴ在线观看| 欧美一个色资源| 国产欧美日本一区视频| 国产精品久久久久久久久免费相片| 国产精品传媒视频| 午夜电影久久久| 久久成人免费网| 成人免费av网站| 欧美熟乱第一页| 日韩欧美视频在线| 中文字幕第一区综合| 亚洲主播在线观看| 美国av一区二区| av在线不卡观看免费观看| 在线看一区二区| 欧美精品一区二区三区高清aⅴ | 99免费精品在线| 欧美亚洲综合网| 精品国产乱子伦一区| 国产精品视频麻豆| 亚洲成人激情综合网| 寂寞少妇一区二区三区| 91视频你懂的| 日韩女优毛片在线| 亚洲最新在线观看| 国产一区二区三区四区五区美女| 91一区二区在线| 精品免费视频.| 亚洲综合免费观看高清完整版| 国产在线日韩欧美| 在线视频欧美精品| 国产目拍亚洲精品99久久精品| 亚洲影视资源网| 国产不卡在线一区| 欧美成人三级在线| 亚洲一区二区三区视频在线| 国产老女人精品毛片久久| 欧美日韩激情一区| 中文字幕一区二区三区乱码在线| 另类中文字幕网| 欧美在线一区二区| 国产精品视频一二三区| 狠狠狠色丁香婷婷综合久久五月| 欧美丝袜丝交足nylons图片| 国产精品国产成人国产三级 | 色婷婷一区二区| 久久蜜桃av一区二区天堂| 亚洲国产日韩a在线播放性色| 国产成人av资源| 久久久久国色av免费看影院| 亚洲r级在线视频| 日本精品视频一区二区| 亚洲欧洲成人av每日更新| 国产一区二区伦理| 日韩一区二区免费在线电影 | 日韩欧美精品三级| 免费在线观看视频一区| 日本高清不卡在线观看| 国产精品灌醉下药二区| 国产福利精品导航| 久久色视频免费观看| 麻豆久久久久久| 91精品一区二区三区在线观看| 亚洲激情校园春色| 91美女在线观看| 亚洲色图另类专区| 91丝袜国产在线播放| 亚洲精品久久7777| 91玉足脚交白嫩脚丫在线播放| **欧美大码日韩| 96av麻豆蜜桃一区二区| 一区二区在线免费| 在线亚洲人成电影网站色www| 亚洲美女屁股眼交3| 91丨九色porny丨蝌蚪| 亚洲欧美日韩国产手机在线| 色综合天天综合网天天狠天天 | 精品少妇一区二区三区日产乱码 | 九九**精品视频免费播放| 日韩午夜av一区| 精品亚洲欧美一区| 久久美女高清视频| av资源站一区| 亚洲精品高清在线| 欧美色窝79yyyycom| 日韩高清在线一区| 欧美v亚洲v综合ⅴ国产v| 国产成人av自拍| 亚洲色图视频免费播放| 欧美日韩一区二区三区四区五区| 午夜精品久久久| 精品国产一区二区三区不卡 | 欧美喷水一区二区| 久久国产夜色精品鲁鲁99| 久久天堂av综合合色蜜桃网| 粉嫩嫩av羞羞动漫久久久| 中文字幕一区二区三区不卡在线 | 欧美成人午夜电影| av激情综合网| 天堂久久久久va久久久久| 精品剧情v国产在线观看在线| 国产成人99久久亚洲综合精品| 亚洲欧美一区二区三区国产精品|