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

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

?? stm32f10x_tim1.c

?? 基于(英蓓特)STM32V100的看門狗程序
?? C
?? 第 1 頁 / 共 5 頁
字號:
  /* Set the Prescaler value */
  TIM1->PSC = TIM1_TimeBaseInitStruct->TIM1_Prescaler;

  /* Select the Counter Mode and set the clock division */
  TIM1->CR1 &= CR1_CKD_Mask & CR1_CounterMode_Mask;
  TIM1->CR1 |= (u32)TIM1_TimeBaseInitStruct->TIM1_ClockDivision |
               TIM1_TimeBaseInitStruct->TIM1_CounterMode;

  /* Set the Repetition Counter value */
  TIM1->RCR = TIM1_TimeBaseInitStruct->TIM1_RepetitionCounter;
}

/*******************************************************************************
* Function Name  : TIM1_OC1Init
* Description    : Initializes the TIM1 Channel1 according to the specified
*                  parameters in the TIM1_OCInitStruct.
* Input          : - TIM1_OCInitStruct: pointer to a TIM1_OCInitTypeDef structure that
*                    contains the configuration information for the TIM1 peripheral.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_OC1Init(TIM1_OCInitTypeDef* TIM1_OCInitStruct)
{
  u16 tmpccmr = 0;

  /* Check the parameters */
  assert(IS_TIM1_OC_MODE(TIM1_OCInitStruct->TIM1_OCMode));
  assert(IS_TIM1_OUTPUT_STATE(TIM1_OCInitStruct->TIM1_OutputState));
  assert(IS_TIM1_OUTPUTN_STATE(TIM1_OCInitStruct->TIM1_OutputNState));
  assert(IS_TIM1_OC_POLARITY(TIM1_OCInitStruct->TIM1_OCPolarity));
  assert(IS_TIM1_OCN_POLARITY(TIM1_OCInitStruct->TIM1_OCNPolarity));
  assert(IS_TIM1_OCIDLE_STATE(TIM1_OCInitStruct->TIM1_OCIdleState));
  assert(IS_TIM1_OCNIDLE_STATE(TIM1_OCInitStruct->TIM1_OCNIdleState)); 

  tmpccmr = TIM1->CCMR1;

  /* Disable the Channel 1: Reset the CCE Bit */
  *(vu32 *) CCER_CC1E_BB = CCER_CCE_Reset;

  /* Reset the Output Compare Bits */
   tmpccmr &= OC13Mode_Mask;

  /* Set the Ouput Compare Mode */
  tmpccmr |= TIM1_OCInitStruct->TIM1_OCMode;

  TIM1->CCMR1 = tmpccmr;

  /* Set the Output State */
  *(vu32 *) CCER_CC1E_BB = TIM1_OCInitStruct->TIM1_OutputState;

  /* Set the Output N State */
  *(vu32 *) CCER_CC1NE_BB = TIM1_OCInitStruct->TIM1_OutputNState;

  /* Set the Output Polarity */
  *(vu32 *) CCER_CC1P_BB = TIM1_OCInitStruct->TIM1_OCPolarity;

  /* Set the Output N Polarity */
  *(vu32 *) CCER_CC1NP_BB = TIM1_OCInitStruct->TIM1_OCNPolarity;

  /* Set the Output Idle state */
  *(vu32 *) CR2_OIS1_BB = TIM1_OCInitStruct->TIM1_OCIdleState;

  /* Set the Output N Idle state */
  *(vu32 *) CR2_OIS1N_BB = TIM1_OCInitStruct->TIM1_OCNIdleState;

  /* Set the Pulse value */
  TIM1->CCR1 = TIM1_OCInitStruct->TIM1_Pulse;
}

/*******************************************************************************
* Function Name  : TIM1_OC2Init
* Description    : Initializes the TIM1 Channel2 according to the specified
*                  parameters in the TIM1_OCInitStruct.
* Input          : - TIM1_OCInitStruct: pointer to a TIM1_OCInitTypeDef structure that
*                    contains the configuration information for the TIM1 peripheral.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_OC2Init(TIM1_OCInitTypeDef* TIM1_OCInitStruct)
{
  u32 tmpccmr = 0;

  /* Check the parameters */
  assert(IS_TIM1_OC_MODE(TIM1_OCInitStruct->TIM1_OCMode));
  assert(IS_TIM1_OUTPUT_STATE(TIM1_OCInitStruct->TIM1_OutputState));
  assert(IS_TIM1_OUTPUTN_STATE(TIM1_OCInitStruct->TIM1_OutputNState));
  assert(IS_TIM1_OC_POLARITY(TIM1_OCInitStruct->TIM1_OCPolarity));
  assert(IS_TIM1_OCN_POLARITY(TIM1_OCInitStruct->TIM1_OCNPolarity));
  assert(IS_TIM1_OCIDLE_STATE(TIM1_OCInitStruct->TIM1_OCIdleState));
  assert(IS_TIM1_OCNIDLE_STATE(TIM1_OCInitStruct->TIM1_OCNIdleState));

  tmpccmr = TIM1->CCMR1;

  /* Disable the Channel 2: Reset the CCE Bit */
  *(vu32 *) CCER_CC2E_BB = CCER_CCE_Reset;

  /* Reset the Output Compare Bits */
   tmpccmr &= OC24Mode_Mask;

  /* Set the Ouput Compare Mode */
  tmpccmr |= (u32)TIM1_OCInitStruct->TIM1_OCMode << 8;

  TIM1->CCMR1 = (u16)tmpccmr;

  /* Set the Output State */
  *(vu32 *) CCER_CC2E_BB = TIM1_OCInitStruct->TIM1_OutputState;

  /* Set the Output N State */
  *(vu32 *) CCER_CC2NE_BB = TIM1_OCInitStruct->TIM1_OutputNState;

  /* Set the Output Polarity */
  *(vu32 *) CCER_CC2P_BB = TIM1_OCInitStruct->TIM1_OCPolarity;

  /* Set the Output N Polarity */
  *(vu32 *) CCER_CC2NP_BB = TIM1_OCInitStruct->TIM1_OCNPolarity;

  /* Set the Output Idle state */
  *(vu32 *) CR2_OIS2_BB = TIM1_OCInitStruct->TIM1_OCIdleState;

  /* Set the Output N Idle state */
  *(vu32 *) CR2_OIS2N_BB = TIM1_OCInitStruct->TIM1_OCNIdleState;

  /* Set the Pulse value */
  TIM1->CCR2 = TIM1_OCInitStruct->TIM1_Pulse;
}

/*******************************************************************************
* Function Name  : TIM1_OC3Init
* Description    : Initializes the TIM1 Channel3 according to the specified
*                  parameters in the TIM1_OCInitStruct.
* Input          : - TIM1_OCInitStruct: pointer to a TIM1_OCInitTypeDef structure that
*                    contains the configuration information for the TIM1 peripheral.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_OC3Init(TIM1_OCInitTypeDef* TIM1_OCInitStruct)
{
  u16 tmpccmr = 0;

  /* Check the parameters */
  assert(IS_TIM1_OC_MODE(TIM1_OCInitStruct->TIM1_OCMode));
  assert(IS_TIM1_OUTPUT_STATE(TIM1_OCInitStruct->TIM1_OutputState));
  assert(IS_TIM1_OUTPUTN_STATE(TIM1_OCInitStruct->TIM1_OutputNState));
  assert(IS_TIM1_OC_POLARITY(TIM1_OCInitStruct->TIM1_OCPolarity));
  assert(IS_TIM1_OCN_POLARITY(TIM1_OCInitStruct->TIM1_OCNPolarity));
  assert(IS_TIM1_OCIDLE_STATE(TIM1_OCInitStruct->TIM1_OCIdleState));
  assert(IS_TIM1_OCNIDLE_STATE(TIM1_OCInitStruct->TIM1_OCNIdleState));

  tmpccmr = TIM1->CCMR2;

  /* Disable the Channel 3: Reset the CCE Bit */
  *(vu32 *) CCER_CC3E_BB = CCER_CCE_Reset;

  /* Reset the Output Compare Bits */
   tmpccmr &= OC13Mode_Mask;

  /* Set the Ouput Compare Mode */
  tmpccmr |= TIM1_OCInitStruct->TIM1_OCMode;

  TIM1->CCMR2 = tmpccmr;

  /* Set the Output State */
  *(vu32 *) CCER_CC3E_BB = TIM1_OCInitStruct->TIM1_OutputState;

  /* Set the Output N State */
  *(vu32 *) CCER_CC3NE_BB = TIM1_OCInitStruct->TIM1_OutputNState;

  /* Set the Output Polarity */
  *(vu32 *) CCER_CC3P_BB = TIM1_OCInitStruct->TIM1_OCPolarity;

  /* Set the Output N Polarity */
  *(vu32 *) CCER_CC3NP_BB = TIM1_OCInitStruct->TIM1_OCNPolarity;

  /* Set the Output Idle state */
  *(vu32 *) CR2_OIS3_BB = TIM1_OCInitStruct->TIM1_OCIdleState;

  /* Set the Output N Idle state */
  *(vu32 *) CR2_OIS3N_BB = TIM1_OCInitStruct->TIM1_OCNIdleState;

  /* Set the Pulse value */
  TIM1->CCR3 = TIM1_OCInitStruct->TIM1_Pulse;
}

/*******************************************************************************
* Function Name  : TIM1_OC4Init
* Description    : Initializes the TIM1 Channel4 according to the specified
*                  parameters in the TIM1_OCInitStruct.
* Input          : - TIM1_OCInitStruct: pointer to a TIM1_OCInitTypeDef structure that
*                    contains the configuration information for the TIM1 peripheral.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_OC4Init(TIM1_OCInitTypeDef* TIM1_OCInitStruct)
{
  u32 tmpccmr = 0;

  /* Check the parameters */
  assert(IS_TIM1_OC_MODE(TIM1_OCInitStruct->TIM1_OCMode));
  assert(IS_TIM1_OUTPUT_STATE(TIM1_OCInitStruct->TIM1_OutputState));
  assert(IS_TIM1_OC_POLARITY(TIM1_OCInitStruct->TIM1_OCPolarity));
  assert(IS_TIM1_OCIDLE_STATE(TIM1_OCInitStruct->TIM1_OCIdleState));

  tmpccmr = TIM1->CCMR2;

  /* Disable the Channel 4: Reset the CCE Bit */
  *(vu32 *) CCER_CC4E_BB = CCER_CCE_Reset;

  /* Reset the Output Compare Bits */
   tmpccmr &= OC24Mode_Mask;

  /* Set the Ouput Compare Mode */
  tmpccmr |= (u32)TIM1_OCInitStruct->TIM1_OCMode << 8;

  TIM1->CCMR2 = (u16)tmpccmr;

  /* Set the Output State */
  *(vu32 *) CCER_CC4E_BB = TIM1_OCInitStruct->TIM1_OutputState;

  /* Set the Output Polarity */
  *(vu32 *) CCER_CC4P_BB = TIM1_OCInitStruct->TIM1_OCPolarity;

  /* Set the Output Idle state */
  *(vu32 *) CR2_OIS4_BB = TIM1_OCInitStruct->TIM1_OCIdleState;

  /* Set the Pulse value */
  TIM1->CCR4 = TIM1_OCInitStruct->TIM1_Pulse;
}

/*******************************************************************************
* Function Name  : TIM1_BDTRConfig
* Description    : Configures the: Break feature, dead time, Lock level, the OSSI,
*                  the OSSR State and the AOE(automatic output enable).
* Input          : - TIM1_BDTRInitStruct: pointer to a TIM1_BDTRInitTypeDef
*                    structure that contains the BDTR Register configuration
*                    information for the TIM1 peripheral.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_BDTRConfig(TIM1_BDTRInitTypeDef *TIM1_BDTRInitStruct)
{
  u16 tmpbdtr = 0;

  /* Check the parameters */
  assert(IS_TIM1_OSSR_STATE(TIM1_BDTRInitStruct->TIM1_OSSRState));
  assert(IS_TIM1_OSSI_STATE(TIM1_BDTRInitStruct->TIM1_OSSIState));
  assert(IS_TIM1_LOCK_LEVEL(TIM1_BDTRInitStruct->TIM1_LOCKLevel));
  assert(IS_TIM1_BREAK_STATE(TIM1_BDTRInitStruct->TIM1_Break));
  assert(IS_TIM1_BREAK_POLARITY(TIM1_BDTRInitStruct->TIM1_BreakPolarity));
  assert(IS_TIM1_AUTOMATIC_OUTPUT_STATE(TIM1_BDTRInitStruct->TIM1_AutomaticOutput));

  tmpbdtr = TIM1->BDTR;

  /* Set the Lock level, the Break enable Bit and the Ploarity, the OSSR State,
     the OSSI State, the dead time value and the Automatic Output Enable Bit */

  tmpbdtr = (u32)TIM1_BDTRInitStruct->TIM1_OSSRState | TIM1_BDTRInitStruct->TIM1_OSSIState |
             TIM1_BDTRInitStruct->TIM1_LOCKLevel | TIM1_BDTRInitStruct->TIM1_DeadTime |
			 TIM1_BDTRInitStruct->TIM1_Break | TIM1_BDTRInitStruct->TIM1_BreakPolarity |
             TIM1_BDTRInitStruct->TIM1_AutomaticOutput;

  TIM1->BDTR = tmpbdtr;
}

/*******************************************************************************
* Function Name  : TIM1_ICInit
* Description    : Initializes the TIM1 peripheral according to the specified
*                  parameters in the TIM1_ICInitStruct.
* Input          : - TIM1_ICInitStruct: pointer to a TIM1_ICInitTypeDef structure
*                    that contains the configuration information for the specified
*                    TIM1 peripheral.
* Output         : None
* Return         : None
*******************************************************************************/
void TIM1_ICInit(TIM1_ICInitTypeDef* TIM1_ICInitStruct)
{
  /* Check the parameters */
  assert(IS_TIM1_CHANNEL(TIM1_ICInitStruct->TIM1_Channel));
  assert(IS_TIM1_IC_POLARITY(TIM1_ICInitStruct->TIM1_ICPolarity));
  assert(IS_TIM1_IC_SELECTION(TIM1_ICInitStruct->TIM1_ICSelection));
  assert(IS_TIM1_IC_PRESCALER(TIM1_ICInitStruct->TIM1_ICPrescaler));
  assert(IS_TIM1_IC_FILTER(TIM1_ICInitStruct->TIM1_ICFilter));

  if (TIM1_ICInitStruct->TIM1_Channel == TIM1_Channel_1)
  {
    /* TI1 Configuration */
    TI1_Config(TIM1_ICInitStruct->TIM1_ICPolarity,
               TIM1_ICInitStruct->TIM1_ICSelection,
               TIM1_ICInitStruct->TIM1_ICFilter);

    /* Set the Input Capture Prescaler value */
    TIM1_SetIC1Prescaler(TIM1_ICInitStruct->TIM1_ICPrescaler);
  }
  else if (TIM1_ICInitStruct->TIM1_Channel == TIM1_Channel_2)
  {
    /* TI2 Configuration */
    TI2_Config(TIM1_ICInitStruct->TIM1_ICPolarity,
               TIM1_ICInitStruct->TIM1_ICSelection,
               TIM1_ICInitStruct->TIM1_ICFilter);

    /* Set the Input Capture Prescaler value */
    TIM1_SetIC2Prescaler(TIM1_ICInitStruct->TIM1_ICPrescaler);
  }
  else if (TIM1_ICInitStruct->TIM1_Channel == TIM1_Channel_3)
  {
    /* TI3 Configuration */
    TI3_Config(TIM1_ICInitStruct->TIM1_ICPolarity,
               TIM1_ICInitStruct->TIM1_ICSelection,
               TIM1_ICInitStruct->TIM1_ICFilter);

    /* Set the Input Capture Prescaler value */
    TIM1_SetIC3Prescaler(TIM1_ICInitStruct->TIM1_ICPrescaler);
  }
  else
  {
    /* TI4 Configuration */
    TI4_Config(TIM1_ICInitStruct->TIM1_ICPolarity,
               TIM1_ICInitStruct->TIM1_ICSelection,
               TIM1_ICInitStruct->TIM1_ICFilter);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美理论在线播放| 中文字幕亚洲成人| 天天亚洲美女在线视频| 精品视频一区 二区 三区| 亚洲一区二区欧美激情| 欧美图区在线视频| 日本不卡高清视频| 欧美一二三四区在线| 九一九一国产精品| 26uuu国产一区二区三区| 国产综合色产在线精品| 国产精品私房写真福利视频| 亚洲女性喷水在线观看一区| 亚洲主播在线观看| 国产伦精一区二区三区| 麻豆精品一区二区av白丝在线| 3d动漫精品啪啪1区2区免费| 美女一区二区三区在线观看| 久久久另类综合| 99国产精品国产精品久久| 亚洲自拍与偷拍| 精品日韩99亚洲| 99久久免费精品| 欧美bbbbb| 国产精品久久久久一区二区三区共| 91香蕉视频污在线| 免费成人在线观看| 国产精品久久久久天堂| 777a∨成人精品桃花网| 国产精品综合二区| 一级特黄大欧美久久久| 久久综合九色综合欧美98| 99精品视频在线免费观看| 日本系列欧美系列| 最近日韩中文字幕| 欧美电影免费观看高清完整版| 国产白丝精品91爽爽久久| 亚洲午夜久久久久久久久电影网 | 99热精品一区二区| 亚洲精品免费在线观看| 久久综合九色欧美综合狠狠 | 亚州成人在线电影| 久久久久久亚洲综合影院红桃| 色婷婷激情久久| 国产精品99久久久久| 亚洲国产精品久久久男人的天堂| 国产女同互慰高潮91漫画| 911精品产国品一二三产区| av不卡免费在线观看| 久久国产精品免费| 亚洲午夜羞羞片| 亚洲天堂精品视频| 国产午夜精品一区二区三区视频 | 伊人婷婷欧美激情| 国产三级精品在线| 欧美电影免费观看高清完整版在线观看 | 亚洲国产成人av| 国产精品久久国产精麻豆99网站| 欧美不卡激情三级在线观看| 欧美写真视频网站| 91视频免费看| 成人永久免费视频| 这里是久久伊人| 欧美综合视频在线观看| 99久久综合国产精品| 国产成人精品免费视频网站| 久久精品国产精品青草| 性久久久久久久久| 一区二区三区欧美激情| 最新中文字幕一区二区三区 | 欧美一区午夜精品| 在线观看国产91| 99热在这里有精品免费| 丁香亚洲综合激情啪啪综合| 国产麻豆视频一区二区| 极品销魂美女一区二区三区| 免费成人深夜小野草| 丝袜美腿亚洲色图| 天堂久久一区二区三区| 午夜视频久久久久久| 日韩**一区毛片| 日韩精品国产欧美| 日韩国产欧美三级| 免费观看成人鲁鲁鲁鲁鲁视频| 日韩黄色免费网站| 日产精品久久久久久久性色| 免费看日韩精品| 狠狠色狠狠色综合| 国产a视频精品免费观看| 国产丶欧美丶日本不卡视频| 高清在线不卡av| 99久久精品国产一区二区三区| av网站免费线看精品| 色88888久久久久久影院野外| 日本韩国欧美在线| 欧美日韩不卡一区| 精品少妇一区二区三区日产乱码 | 激情伊人五月天久久综合| 奇米精品一区二区三区在线观看一| 日本va欧美va精品发布| 国产精品系列在线观看| 成人国产亚洲欧美成人综合网| 色天天综合色天天久久| 欧美日韩精品免费观看视频| 欧美成人video| 国产精品福利影院| 亚洲国产一二三| 蜜桃一区二区三区在线| 风间由美性色一区二区三区| 欧美中文字幕一区二区三区亚洲| 日韩三级免费观看| 国产精品系列在线| 午夜精品影院在线观看| 国产一二三精品| 色哟哟一区二区三区| 日韩一区二区在线看| 国产精品久久久久aaaa樱花| 亚洲第一福利一区| 国产v综合v亚洲欧| 欧美日韩一级片在线观看| 奇米影视在线99精品| 成人综合婷婷国产精品久久蜜臀| 欧美性三三影院| 日本一区二区三区高清不卡| 亚洲风情在线资源站| 成人午夜伦理影院| 欧美一区欧美二区| 亚洲男同1069视频| 国产一区视频导航| 欧美理论在线播放| 亚洲欧洲在线观看av| 久久99国产乱子伦精品免费| 日本丶国产丶欧美色综合| 久久久久久久综合日本| 图片区日韩欧美亚洲| 丁香网亚洲国际| 日韩一区二区在线观看视频| 一区二区三区中文字幕电影 | 亚洲欧美日本韩国| 韩国成人在线视频| 欧美日韩国产天堂| 成人免费在线观看入口| 精品一区二区三区免费播放 | 一本到高清视频免费精品| 欧美xxxxx裸体时装秀| 亚洲一区在线播放| www.色综合.com| 国产欧美日本一区视频| 另类调教123区| 欧美乱妇一区二区三区不卡视频| 亚洲色图欧美偷拍| 成人天堂资源www在线| 久久综合色综合88| 青椒成人免费视频| 欧美精品在线观看一区二区| 亚洲精品中文字幕在线观看| 成人午夜看片网址| 久久综合九色综合欧美就去吻| 蜜乳av一区二区| 日韩一区二区在线看| 日本不卡一二三区黄网| 欧美日产在线观看| 亚洲va欧美va国产va天堂影院| 日本精品视频一区二区三区| 综合自拍亚洲综合图不卡区| 成人av片在线观看| 国产精品欧美极品| 成人精品一区二区三区中文字幕| 国产无一区二区| 丁香啪啪综合成人亚洲小说| 久久精品综合网| 国产伦精一区二区三区| 国产欧美一区二区精品性色| 国产成人av电影| 国产日韩成人精品| 成人黄色免费短视频| 亚洲丝袜制服诱惑| 日本韩国一区二区三区视频| 亚洲国产精品影院| 制服丝袜亚洲网站| 日韩精彩视频在线观看| 欧美va天堂va视频va在线| 国产精品一区二区久久精品爱涩| 日本一区二区综合亚洲| 99久久精品国产麻豆演员表| 高清视频一区二区| 亚洲视频综合在线| 在线观看av不卡| 视频一区欧美精品| 欧美mv日韩mv国产网站| 高清不卡在线观看av| 亚洲精品va在线观看| 欧美丰满高潮xxxx喷水动漫| 激情综合网av| 最新国产の精品合集bt伙计| 欧美日韩成人高清| 国产美女在线观看一区| 亚洲精品成a人| 日韩网站在线看片你懂的| 国产精品亚洲一区二区三区妖精|