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

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

?? stm32f10x_tim1.c

?? 萬(wàn)利開(kāi)發(fā)板上的lcd例程
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
void TIM1_SelectSlaveMode(u16 TIM1_SlaveMode)
{
  u32 tmpsmcr = 0;

  /* Check the parameters */
  assert(IS_TIM1_SLAVE_MODE(TIM1_SlaveMode));

  tmpsmcr = TIM1->SMCR;

  /* Reset the SMS Bits */
  tmpsmcr &= SMCR_SMS_Mask;

  /* Select the Slave Mode */
  tmpsmcr |= TIM1_SlaveMode;

  TIM1->SMCR = (u16)tmpsmcr;
}

/*******************************************************************************
* Function Name  : TIM1_SelectMasterSlaveMode
* Description    : Sets or Resets the TIM1 Master/Slave Mode.
* Input          : - TIM1_MasterSlaveMode: specifies the TIM1 Master Slave Mode.
*                    This paramter can be one of the following values:
*                       - TIM1_MasterSlaveMode_Enable: synchronization between
*                         the current timer and its slaves (through TRGO).
*                       - TIM1_MasterSlaveMode_Disable: No action
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_SelectMasterSlaveMode(u16 TIM1_MasterSlaveMode)
{
  /* Check the parameters */
  assert(IS_TIM1_MSM_STATE(TIM1_MasterSlaveMode));

  /* Set or Reset the MSM Bit */
  *(vu32 *) SMCR_MSM_BB = TIM1_MasterSlaveMode;
}

/*******************************************************************************
* Function Name  : TIM1_EncoderInterfaceConfig
* Description    : Configures the TIM1 Encoder Interface.
* Input          : - TIM1_EncoderMode: specifies the TIM1 Encoder Mode.
*                    This parameter can be one of the following values:
*                       - TIM1_EncoderMode_TI1: Counter counts on TI1FP1 edge
*                         depending on TI2FP2 level.
*                       - TIM1_EncoderMode_TI2: Counter counts on TI2FP2 edge
*                         depending on TI1FP1 level.
*                       - TIM1_EncoderMode_TI12: Counter counts on both TI1FP1 and
*                         TI2FP2 edges depending on the level of the other input.
*                  - TIM1_IC1Polarity: specifies the IC1 Polarity
*                    This parmeter can be one of the following values:
*                       - TIM1_ICPolarity_Falling
*                       - TIM1_ICPolarity_Rising
*                  - TIM1_IC2Polarity: specifies the IC2 Polarity
*                    This parmeter can be one of the following values:
*                       - TIM1_ICPolarity_Falling
*                       - TIM1_ICPolarity_Rising
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_EncoderInterfaceConfig(u16 TIM1_EncoderMode, u16 TIM1_IC1Polarity,
                                u16 TIM1_IC2Polarity)
{
  u32 tmpsmcr = 0;
  u32 tmpccmr1 = 0;

  /* Check the parameters */
  assert(IS_TIM1_ENCODER_MODE(TIM1_EncoderMode));
  assert(IS_TIM1_IC_POLARITY(TIM1_IC1Polarity));
  assert(IS_TIM1_IC_POLARITY(TIM1_IC2Polarity));

  tmpsmcr = TIM1->SMCR;
  tmpccmr1 = TIM1->CCMR1;

  /* Set the encoder Mode */
  tmpsmcr &= SMCR_SMS_Mask;
  tmpsmcr |= TIM1_EncoderMode;

  /* Select the Capture Compare 1 and the Capture Compare 2 as input */
  tmpccmr1 &= CCMR_CC13S_Mask & CCMR_CC24S_Mask;
  tmpccmr1 |= CCMR_TI13Direct_Set | CCMR_TI24Direct_Set;

  /* Set the TI1 and the TI2 Polarities */
  *(vu32 *) CCER_CC1P_BB = TIM1_IC1Polarity;
  *(vu32 *) CCER_CC2P_BB = TIM1_IC2Polarity;

  TIM1->SMCR = (u16)tmpsmcr;

  TIM1->CCMR1 = (u16)tmpccmr1;
}

/*******************************************************************************
* Function Name  : TIM1_RepetitionConfig
* Description    : Configures the TIM1 Repetition.
* Input          : - Repetition: specifies the Repetition Register value
*                  - TIM1_PSCReloadMode: specifies the TIM1 Repetition Reload mode.
*                    This parmeter can be one of the following values:
*                       - TIM1_PSCReloadMode_Update: The Repetition is loaded at
*                         the update event.
*                       - TIM1_PSCReloadMode_Immediate: The Repetition is loaded
*                         immediatly.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_RepetitionConfig(u8 Repetition, u16 TIM1_PSCReloadMode)
{
  /* Check the parameters */
  assert(IS_TIM1_PRESCALER_RELOAD(TIM1_PSCReloadMode));

  /* Set the Repetition value */
  TIM1->RCR = Repetition;

  /* Set or reset the UG Bit */
  *(vu32 *) EGR_UG_BB = TIM1_PSCReloadMode;
}
/*******************************************************************************
* Function Name  : TIM1_PrescalerConfig
* Description    : Configures the TIM1 Prescaler.
* Input          : - Prescaler: specifies the Prescaler Register value
*                  - TIM1_PSCReloadMode: specifies the TIM1 Prescaler Reload mode.
*                    This parmeter can be one of the following values:
*                       - TIM1_PSCReloadMode_Update: The Prescaler is loaded at
*                         the update event.
*                       - TIM1_PSCReloadMode_Immediate: The Prescaler is loaded
*                         immediatly.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_PrescalerConfig(u16 Prescaler, u16 TIM1_PSCReloadMode)
{
  /* Check the parameters */
  assert(IS_TIM1_PRESCALER_RELOAD(TIM1_PSCReloadMode));

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

  /* Set or reset the UG Bit */
  *(vu32 *) EGR_UG_BB = TIM1_PSCReloadMode;
}
/*******************************************************************************
* Function Name  : TIM1_CounterModeConfig
* Description    : Specifies the TIM1 Counter Mode to be used.
* Input          : - TIM1_CounterMode: specifies the Counter Mode to be used
*                    This parameter can be one of the following values:
*                       - TIM1_CounterMode_Up: TIM1 Up Counting Mode
*                       - TIM1_CounterMode_Down: TIM1 Down Counting Mode
*                       - TIM1_CounterMode_CenterAligned1: TIM1 Center Aligned Mode1
*                       - TIM1_CounterMode_CenterAligned2: TIM1 Center Aligned Mode2
*                       - TIM1_CounterMode_CenterAligned3: TIM1 Center Aligned Mode3
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_CounterModeConfig(u16 TIM1_CounterMode)
{
  u32 tmpcr1 = 0;

  /* Check the parameters */
  assert(IS_TIM1_COUNTER_MODE(TIM1_CounterMode));

  tmpcr1 = TIM1->CR1;

  /* Reset the CMS and DIR Bits */
  tmpcr1 &= CR1_CounterMode_Mask;

  /* Set the Counter Mode */
  tmpcr1 |= TIM1_CounterMode;

  TIM1->CR1 = (u16)tmpcr1;
}

/*******************************************************************************
* Function Name  : TIM1_ForcedOC1Config
* Description    : Forces the TIM1 Channel1 output waveform to active or inactive 
*                  level.
* Input          : - TIM1_ForcedAction: specifies the forced Action to be set to
*                    the output waveform.
*                    This parameter can be one of the following values:
*                       - TIM1_ForcedAction_Active: Force active level on OC1REF
*                       - TIM1_ForcedAction_InActive: Force inactive level on
*                         OC1REF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_ForcedOC1Config(u16 TIM1_ForcedAction)
{
  u32 tmpccmr1 = 0;

  /* Check the parameters */
  assert(IS_TIM1_FORCED_ACTION(TIM1_ForcedAction));

  tmpccmr1 = TIM1->CCMR1;

  /* Reset the OCM Bits */
  tmpccmr1 &= CCMR_OCM13_Mask;

  /* Configure The Forced output Mode */
  tmpccmr1 |= TIM1_ForcedAction;

  TIM1->CCMR1 = (u16)tmpccmr1;
}

/*******************************************************************************
* Function Name  : TIM1_ForcedOC2Config
* Description    : Forces the TIM1 Channel2 output waveform to active or inactive 
*                  level.
* Input          : - TIM1_ForcedAction: specifies the forced Action to be set to
*                    the output waveform.
*                    This parameter can be one of the following values:
*                       - TIM1_ForcedAction_Active: Force active level on OC2REF
*                       - TIM1_ForcedAction_InActive: Force inactive level on
*                         OC2REF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_ForcedOC2Config(u16 TIM1_ForcedAction)
{
  u32 tmpccmr1 = 0;

  /* Check the parameters */
  assert(IS_TIM1_FORCED_ACTION(TIM1_ForcedAction));

  tmpccmr1 = TIM1->CCMR1;

  /* Reset the OCM Bits */
  tmpccmr1 &= CCMR_OCM24_Mask;

  /* Configure The Forced output Mode */
  tmpccmr1 |= (u32)TIM1_ForcedAction << 8;

  TIM1->CCMR1 = (u16)tmpccmr1;
}

/*******************************************************************************
* Function Name  : TIM1_ForcedOC3Config
* Description    : Forces the TIM1 Channel3 output waveform to active or inactive 
*                  level.
* Input          : - TIM1_ForcedAction: specifies the forced Action to be set to
*                    the output waveform.
*                    This parameter can be one of the following values:
*                       - TIM1_ForcedAction_Active: Force active level on OC3REF
*                       - TIM1_ForcedAction_InActive: Force inactive level on
*                         OC3REF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_ForcedOC3Config(u16 TIM1_ForcedAction)
{
  u32 tmpccmr2 = 0;

  /* Check the parameters */
  assert(IS_TIM1_FORCED_ACTION(TIM1_ForcedAction));

  tmpccmr2 = TIM1->CCMR2;

  /* Reset the OCM Bits */
  tmpccmr2 &= CCMR_OCM13_Mask;

  /* Configure The Forced output Mode */
  tmpccmr2 |= TIM1_ForcedAction;

  TIM1->CCMR2 = (u16)tmpccmr2;
}

/*******************************************************************************
* Function Name  : TIM1_ForcedOC4Config
* Description    : Forces the TIM1 Channel4 output waveform to active or inactive 
*                  level.
* Input          : - TIM1_ForcedAction: specifies the forced Action to be set to
*                    the output waveform.
*                    This parameter can be one of the following values:
*                       - TIM1_ForcedAction_Active: Force active level on OC4REF
*                       - TIM1_ForcedAction_InActive: Force inactive level on
*                         OC4REF.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_ForcedOC4Config(u16 TIM1_ForcedAction)
{
  u32 tmpccmr2 = 0;

  /* Check the parameters */
  assert(IS_TIM1_FORCED_ACTION(TIM1_ForcedAction));

  tmpccmr2 = TIM1->CCMR1;

  /* Reset the OCM Bits */
  tmpccmr2 &= CCMR_OCM24_Mask;

  /* Configure The Forced output Mode */
  tmpccmr2 |= (u16)((u16)TIM1_ForcedAction << 8);

  TIM1->CCMR2 = (u16)tmpccmr2;
}

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

  /* Set or Reset the ARPE Bit */
  *(vu32 *) CR1_ARPE_BB = (u16)Newstate;
}

/*******************************************************************************
* Function Name  : TIM1_SelectCOM
* Description    : Selects the TIM1 peripheral Commutation event.
* Input          

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区二区三区四区 | 精品成a人在线观看| 国产欧美一区二区精品婷婷 | 久久国内精品自在自线400部| 一级女性全黄久久生活片免费| 亚洲欧美偷拍三级| 日韩影视精彩在线| 色综合久久中文字幕综合网| 亚洲一卡二卡三卡四卡| 国产91丝袜在线播放| 丁香一区二区三区| 制服丝袜在线91| 日本一区二区三区视频视频| 偷窥国产亚洲免费视频| 不卡视频一二三四| 欧美激情自拍偷拍| 青青青爽久久午夜综合久久午夜| 国产精品亚洲第一区在线暖暖韩国| 欧美成人一级视频| 亚洲欧美日韩系列| 国产一区二区三区免费看| 4438成人网| 亚洲午夜在线电影| 波多野结衣一区二区三区| 色噜噜久久综合| 亚洲视频免费在线观看| 国产suv精品一区二区883| 亚洲一区二区在线视频| 精品写真视频在线观看| 日韩午夜激情电影| 日韩电影网1区2区| 日韩三级视频在线观看| 久久国产夜色精品鲁鲁99| 欧美电影精品一区二区| 亚洲美女免费视频| 欧美最猛黑人xxxxx猛交| 亚洲视频在线观看三级| 99r精品视频| 亚洲黄色片在线观看| 欧美视频中文一区二区三区在线观看| 最新不卡av在线| 欧美日韩成人一区| 中文文精品字幕一区二区| 免费成人结看片| 在线视频国内一区二区| 久久久99久久精品欧美| 日本中文字幕一区二区视频 | 色综合久久88色综合天天6 | 亚洲国产另类av| 精品中文av资源站在线观看| 日韩精品一区二| 免费欧美在线视频| 欧美www视频| 国产a区久久久| 国产亚洲精品aa午夜观看| 欧美中文字幕一区| 亚洲一区二区三区影院| 欧美影院午夜播放| 亚洲h在线观看| 久久激情五月婷婷| 中文字幕中文在线不卡住| 欧美日韩dvd在线观看| 国产精品夜夜爽| 亚洲一二三区在线观看| 欧美精品一二三| 国内精品久久久久影院薰衣草 | 成人免费视频一区| 亚洲美女区一区| 日韩精品一区国产麻豆| 成人禁用看黄a在线| 久久精品国产成人一区二区三区| 中文字幕av一区二区三区高| 欧美一二三四区在线| 99久久久免费精品国产一区二区| 日韩精品色哟哟| 亚洲激情中文1区| 中文字幕乱码亚洲精品一区| 555www色欧美视频| kk眼镜猥琐国模调教系列一区二区 | 国产精品视频观看| 日本一区二区三区视频视频| 欧美中文字幕一区二区三区亚洲| 精品一区二区三区蜜桃| 亚洲综合一二三区| 91.麻豆视频| 国产成人综合亚洲91猫咪| 夜夜精品浪潮av一区二区三区| 欧美夫妻性生活| 欧美片在线播放| 国产精品久久久久久一区二区三区| 日韩电影一区二区三区四区| 福利91精品一区二区三区| 亚洲欧美另类在线| 欧美日韩国产不卡| 国产成人午夜片在线观看高清观看| 国产精品日韩成人| 欧美男生操女生| 大胆亚洲人体视频| 成人黄色软件下载| 日韩一区欧美一区| 日韩三级免费观看| 国产老女人精品毛片久久| 成人国产精品免费观看视频| 国产乱子伦视频一区二区三区| 毛片不卡一区二区| 国产一区二区伦理片| 九九热在线视频观看这里只有精品| 日本欧洲一区二区| 韩国欧美国产1区| 国产经典欧美精品| av影院午夜一区| 精品视频免费看| 91精品国产麻豆| 日韩欧美视频一区| 亚洲国产精品av| 亚洲国产精品久久久久婷婷884| 亚洲综合视频网| 美女高潮久久久| 99热这里都是精品| 色综合久久99| 欧美年轻男男videosbes| 精品美女一区二区三区| 中文字幕一区二区三区色视频| 一区二区欧美视频| 国产又黄又大久久| 欧美最猛性xxxxx直播| 欧美一区二区三区影视| 亚洲国产精品99久久久久久久久| 一区二区激情视频| 一区二区久久久| 国产一区二区导航在线播放| 色欧美88888久久久久久影院| 91精品国产免费| 欧美日韩久久一区| 精品国产制服丝袜高跟| 亚洲免费色视频| 久久99精品一区二区三区三区| 在线成人小视频| 成人av片在线观看| 亚洲一区二区三区四区在线免费观看| av不卡在线观看| 成人爽a毛片一区二区免费| 蜜桃久久精品一区二区| 亚洲韩国精品一区| 亚洲精品成人a在线观看| 中文字幕 久热精品 视频在线 | 欧美这里有精品| 99天天综合性| 国产成人精品午夜视频免费| 麻豆一区二区三区| 亚洲国产中文字幕在线视频综合 | 国产清纯白嫩初高生在线观看91 | 午夜精品一区二区三区免费视频| 狂野欧美性猛交blacked| 日本大香伊一区二区三区| 国产精品久久免费看| 国产精品456| 精品国产凹凸成av人网站| 免费高清成人在线| 在线电影欧美成精品| 天天做天天摸天天爽国产一区| 91同城在线观看| 一区二区三区四区在线播放| 91偷拍与自偷拍精品| 国产色综合一区| 国产一区视频网站| 国产偷v国产偷v亚洲高清| 欧日韩精品视频| 日韩丝袜美女视频| 欧美性生活久久| 日本福利一区二区| 色婷婷av久久久久久久| 欧美亚洲一区二区三区四区| 欧美视频在线一区| 欧美丰满少妇xxxxx高潮对白| 欧美精品久久99久久在免费线| 88在线观看91蜜桃国自产| 欧美一区二区三区播放老司机| 国产成人精品亚洲777人妖| 伊人性伊人情综合网| 日韩欧美专区在线| 欧美激情一区三区| 精品久久久久一区| 色丁香久综合在线久综合在线观看 | 亚洲精品福利视频网站| 91精品在线麻豆| 欧美本精品男人aⅴ天堂| 国产精品一区二区久久不卡 | 一区二区久久久久| 亚洲同性同志一二三专区| 国产欧美一区二区三区鸳鸯浴 | 成人app网站| 日本丰满少妇一区二区三区| 欧美日韩免费视频| 精品国产91久久久久久久妲己 | 欧美精品一区二区三区高清aⅴ| 日本一区二区视频在线观看| 亚洲激情图片小说视频| 美女精品一区二区| 99精品国产99久久久久久白柏|