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

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

?? stm32f10x_usart.c

?? 用于STM32實時時鐘程序,可以代PC8563使用.
?? C
?? 第 1 頁 / 共 3 頁
字號:
* Output         : None
* Return         : None
*******************************************************************************/
void USART_ITConfig(USART_TypeDef* USARTx, u16 USART_IT, FunctionalState NewState)
{
  u32 usartreg = 0x00, itpos = 0x00, itmask = 0x00;
  u32 address = 0x00;

  /* Check the parameters */
  assert(IS_USART_CONFIG_IT(USART_IT));  
  assert(IS_FUNCTIONAL_STATE(NewState));
  
  /* Get the USART register index */
  usartreg = (((u8)USART_IT) >> 0x05);

  /* Get the interrupt position */
  itpos = USART_IT & USART_IT_Mask;

  itmask = (((u32)0x01) << itpos);
  address = *(u32*)&(USARTx);

  if (usartreg == 0x01) /* The IT  is in CR1 register */
  {
    address += 0x0C;
  }
  else if (usartreg == 0x02) /* The IT  is in CR2 register */
  {
    address += 0x10;
  }
  else /* The IT  is in CR3 register */
  {
    address += 0x14; 
  }
  if (NewState != DISABLE)
  {
    *(u32*)address  |= itmask;
  }
  else
  {
    *(u32*)address &= ~itmask;
  }
}

/*******************************************************************************
* Function Name  : USART_DMACmd
* Description    : Enables or disables the USART抯 DMA interface.
* Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
*                    peripheral.
*                  - USART_DMAReq: specifies the DMA request.
*                    This parameter can be any combination of the following values:
*                       - USART_DMAReq_Tx
*                       - USART_DMAReq_Rx
*                  - NewState: new state of the DMA Request sources.
*                   This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void USART_DMACmd(USART_TypeDef* USARTx, u16 USART_DMAReq, FunctionalState NewState)
{
  /* Check the parameters */
  assert(IS_USART_DMAREQ(USART_DMAReq));  
  assert(IS_FUNCTIONAL_STATE(NewState)); 
  
  if (NewState != DISABLE)
  {
    /* Enable the DMA transfer for selected requests by setting the DMAT and/or
    DMAR bits in the USART CR3 register */
    USARTx->CR3 |= USART_DMAReq;
  }
  else
  {
    /* Disable the DMA transfer for selected requests by clearing the DMAT and/or
    DMAR bits in the USART CR3 register */
    USARTx->CR3 &= (u16)~USART_DMAReq;
  }
}

/*******************************************************************************
* Function Name  : USART_SetAddress
* Description    : Sets the address of the USART node.
* Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
*                    peripheral.
*                  - USART_Address: Indicates the address of the USART node.
* Output         : None
* Return         : None
*******************************************************************************/
void USART_SetAddress(USART_TypeDef* USARTx, u8 USART_Address)
{
  /* Check the parameters */
  assert(IS_USART_ADDRESS(USART_Address)); 
    
  /* Clear the USART address */
  USARTx->CR2 &= CR2_Address_Mask;
  /* Set the USART address node */
  USARTx->CR2 |= USART_Address;
}

/*******************************************************************************
* Function Name  : USART_WakeUpConfig
* Description    : Selects the USART WakeUp method.
* Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
*                    peripheral.
*                  - USART_WakeUp: specifies the USART wakeup method.
*                    This parameter can be one of the following values:
*                        - USART_WakeUp_IdleLine
*                        - USART_WakeUp_AddressMark
* Output         : None
* Return         : None
*******************************************************************************/
void USART_WakeUpConfig(USART_TypeDef* USARTx, u16 USART_WakeUp)
{
  /* Check the parameters */
  assert(IS_USART_WAKEUP(USART_WakeUp));
  
  USARTx->CR1 &= CR3_WAKE_Mask;
  USARTx->CR1 |= USART_WakeUp;
}

/*******************************************************************************
* Function Name  : USART_ReceiverWakeUpCmd
* Description    : Determines if the USART is in mute mode or not.
* Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
*                    peripheral.
*                  - NewState: new state of the USART mode.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void USART_ReceiverWakeUpCmd(USART_TypeDef* USARTx, FunctionalState NewState)
{
  /* Check the parameters */
  assert(IS_FUNCTIONAL_STATE(NewState)); 
  
  if (NewState != DISABLE)
  {
    /* Enable the mute mode USART by setting the RWU bit in the CR1 register */
    USARTx->CR1 |= CR1_RWU_Set;
  }
  else
  {
    /* Disable the mute mode USART by clearing the RWU bit in the CR1 register */
    USARTx->CR1 &= CR1_RWU_Reset;
  }
}

/*******************************************************************************
* Function Name  : USART_LINBreakDetectLengthConfig
* Description    : Sets the USART LIN Break detection length.
* Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
*                    peripheral.
*                  - USART_LINBreakDetectLength: specifies the LIN break
*                    detection length.
*                    This parameter can be one of the following values:
*                       - USART_LINBreakDetectLength_10b
*                       - USART_LINBreakDetectLength_11b
* Output         : None
* Return         : None
*******************************************************************************/
void USART_LINBreakDetectLengthConfig(USART_TypeDef* USARTx, u16 USART_LINBreakDetectLength)
{
  /* Check the parameters */
  assert(IS_USART_LIN_BREAK_DETECT_LENGTH(USART_LINBreakDetectLength));
  
  USARTx->CR2 &= CR3_LBDL_Mask;
  USARTx->CR2 |= USART_LINBreakDetectLength;  
}

/*******************************************************************************
* Function Name  : USART_LINCmd
* Description    : Enables or disables the USART抯 LIN mode.
* Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
*                    peripheral.
*                  - NewState: new state of the USART LIN mode.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void USART_LINCmd(USART_TypeDef* USARTx, FunctionalState NewState)
{
  /* Check the parameters */
  assert(IS_FUNCTIONAL_STATE(NewState));
  
  if (NewState != DISABLE)
  {
    /* Enable the LIN mode by setting the LINE bit in the CR2 register */
    USARTx->CR2 |= CR2_LINE_Set;
  }
  else
  {
    /* Disable the LIN mode by clearing the LINE bit in the CR2 register */
    USARTx->CR2 &= CR2_LINE_Reset;
  }
}

/*******************************************************************************
* Function Name  : USART_SendData
* Description    : Transmits signle data through the USARTx peripheral.
* Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
*                    peripheral.
*                  - Data: the data to transmit.
* Output         : None
* Return         : None
*******************************************************************************/
void USART_SendData(USART_TypeDef* USARTx, u16 Data)
{
  /* Check the parameters */
  assert(IS_USART_DATA(Data)); 
    
  /* Transmit Data */
  USARTx->DR = (Data & (u16)0x01FF);
}

/*******************************************************************************
* Function Name  : USART_ReceiveData
* Description    : Returns the most recent received data by the USARTx peripheral.
* Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
*                    peripheral.
* Output         : None
* Return         : The received data.
*******************************************************************************/
u16 USART_ReceiveData(USART_TypeDef* USARTx)
{
  /* Receive Data */							
  return (u16)(USARTx->DR & (u16)0x01FF);
}

/*******************************************************************************
* Function Name  : USART_SendBreak
* Description    : Transmits break characters.
* Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
*                    peripheral.
* Output         : None
* Return         : None
*******************************************************************************/
void USART_SendBreak(USART_TypeDef* USARTx)
{
  /* Send break characters */
  USARTx->CR1 |= CR1_SBK_Set;
}

/*******************************************************************************
* Function Name  : USART_SetGuardTime
* Description    : Sets the specified USART guard time.
* Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
*                    peripheral.
*                  - USART_GuardTime: specifies the guard time.
* Output         : None
* Return         : None
*******************************************************************************/
void USART_SetGuardTime(USART_TypeDef* USARTx, u8 USART_GuardTime)
{    
  /* Clear the USART Guard time */
  USARTx->GTPR &= GTPR_LSB_Mask;
  /* Set the USART guard time */
  USARTx->GTPR |= (u16)((u16)USART_GuardTime << 0x08);
}

/*******************************************************************************
* Function Name  : USART_SetPrescaler
* Description    : Sets the system clock prescaler.
* Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
*                    peripheral.
*                  - USART_Prescaler: specifies the prescaler clock.
* Output         : None
* Return         : None
*******************************************************************************/
void USART_SetPrescaler(USART_TypeDef* USARTx, u8 USART_Prescaler)
{ 
  /* Clear the USART prescaler */
  USARTx->GTPR &= GTPR_MSB_Mask;
  /* Set the USART prescaler */
  USARTx->GTPR |= USART_Prescaler;
}

/*******************************************************************************
* Function Name  : USART_SmartCardCmd
* Description    : Enables or disables the USART抯 Smart Card mode.
* Input          : - USARTx: where x can be 1, 2 or 3 to select the USART
*                    peripheral.
*                  - NewState: new state of the Smart Card mode.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void USART_SmartCardCmd(USART_TypeDef* USARTx, FunctionalState NewState)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区在线观看免费| 欧美亚洲丝袜传媒另类| 91亚洲资源网| 欧美日韩高清一区二区不卡| 911精品国产一区二区在线| 欧美精品一区二区高清在线观看| 狠狠色狠狠色综合日日91app| 国产aⅴ精品一区二区三区色成熟| 99国产精品国产精品毛片| 欧美日韩欧美一区二区| 久久久综合视频| 亚洲欧美色一区| 免费观看成人av| 91色porny| 欧美r级在线观看| 亚洲精品视频自拍| 久久精品国产亚洲一区二区三区| 99视频在线精品| 欧美成人三级电影在线| 自拍偷拍欧美激情| 久久国产精品99久久人人澡| www.性欧美| 日韩欧美成人一区二区| 亚洲欧美日韩精品久久久久| 另类小说欧美激情| 91福利精品第一导航| 久久―日本道色综合久久| 亚洲一区二区三区视频在线 | 欧美在线制服丝袜| 精品国产一区二区三区久久久蜜月| 成人综合婷婷国产精品久久| 欧美喷水一区二区| 17c精品麻豆一区二区免费| 裸体歌舞表演一区二区| 日本韩国视频一区二区| 国产午夜精品久久| 蜜臀精品久久久久久蜜臀| 色综合天天综合网国产成人综合天 | 亚洲精品一线二线三线| 亚洲久草在线视频| 国产成人免费视频网站| 51精品秘密在线观看| 亚洲精品v日韩精品| 国产成人免费在线视频| 欧美变态口味重另类| 午夜精品一区二区三区电影天堂| 91蝌蚪国产九色| 国产喂奶挤奶一区二区三区| 蜜桃91丨九色丨蝌蚪91桃色| 欧美午夜精品一区二区三区| 国产精品久久午夜| 国产美女在线精品| 精品福利视频一区二区三区| 天天综合网天天综合色| 91国偷自产一区二区三区成为亚洲经典| 久久伊人中文字幕| 捆绑调教一区二区三区| 91精品欧美一区二区三区综合在| 亚洲黄色小说网站| 91色|porny| 亚洲精品视频免费观看| 99精品偷自拍| **欧美大码日韩| 99久久99久久免费精品蜜臀| 国产精品久久久久毛片软件| 国产精品一区三区| 久久人人爽爽爽人久久久| 国产一区中文字幕| 久久日一线二线三线suv| 久久精品国产久精国产| 日韩一区二区三区视频| 日日夜夜精品免费视频| 欧美狂野另类xxxxoooo| 亚洲成av人片一区二区三区 | 午夜亚洲国产au精品一区二区| 色av成人天堂桃色av| 亚洲人成亚洲人成在线观看图片| zzijzzij亚洲日本少妇熟睡| 国产精品第四页| 99久久精品国产观看| 自拍偷拍国产精品| 色婷婷香蕉在线一区二区| 亚洲曰韩产成在线| 欧美日韩一区二区在线观看| 午夜精品久久久久久不卡8050| 欧美高清性hdvideosex| 日本伊人色综合网| 久久综合九色综合欧美亚洲| 国产一区在线精品| 国产精品美女久久福利网站| 91免费看片在线观看| 亚洲综合免费观看高清完整版在线 | 欧美xxxxx牲另类人与| 精品无人码麻豆乱码1区2区| 国产日本欧美一区二区| av中文字幕在线不卡| 亚洲一区av在线| 日韩一区二区在线看| 国产专区欧美精品| 国产精品美女久久久久久久久久久 | 国产亚洲一二三区| 成人晚上爱看视频| 亚洲一区成人在线| 精品成a人在线观看| 丁香桃色午夜亚洲一区二区三区| 亚洲天堂免费看| 欧美二区在线观看| 国产精品白丝jk黑袜喷水| 中文字幕一区二区三区精华液 | 日韩精品欧美精品| 亚洲精品一区二区三区影院| 成人免费毛片高清视频| 亚洲大片精品永久免费| 精品国产乱码久久久久久蜜臀| bt7086福利一区国产| 午夜精品久久久久久| 久久久天堂av| 精品视频在线免费| 国产精品资源网| 一区二区三区中文字幕精品精品 | 久久精品99久久久| 国产精品高潮呻吟久久| 欧美日韩国产在线播放网站| 国产麻豆日韩欧美久久| 亚洲国产精品久久一线不卡| 久久综合成人精品亚洲另类欧美| 99re这里只有精品首页| 免费视频最近日韩| 中文字幕在线观看一区| 91精品国产91热久久久做人人| 国产91富婆露脸刺激对白 | 精品欧美一区二区三区精品久久 | 亚洲欧美色图小说| 精品电影一区二区| 欧美日韩一级片网站| 成人免费视频app| 美女脱光内衣内裤视频久久影院| 一区视频在线播放| 欧美r级在线观看| 欧美亚日韩国产aⅴ精品中极品| 国产九色sp调教91| 丝袜国产日韩另类美女| 日韩美女视频一区二区 | 成人精品视频一区二区三区| 日韩精品亚洲专区| 亚洲欧美日韩中文字幕一区二区三区 | 一区二区三区小说| 2欧美一区二区三区在线观看视频| 欧美视频自拍偷拍| 99re在线视频这里只有精品| 国产精品一区在线观看乱码| 青娱乐精品视频| 亚洲一区二区三区在线看| 日本一区二区在线不卡| 欧美一级日韩免费不卡| 在线观看网站黄不卡| 成人激情免费电影网址| 国产激情一区二区三区桃花岛亚洲| 午夜精品免费在线| 亚洲综合色在线| 亚洲美女精品一区| 国产精品青草综合久久久久99| 欧美xxxxx牲另类人与| 欧美一区二区人人喊爽| 欧美性色欧美a在线播放| 色婷婷av一区二区三区之一色屋| 国产成a人亚洲精品| 国产在线日韩欧美| 久久成人18免费观看| 日韩成人一级片| 青青草国产精品97视觉盛宴| 亚洲午夜久久久久中文字幕久| 亚洲欧美自拍偷拍色图| 国产精品久久久久一区| 久久精品视频免费| 精品国产乱码久久久久久浪潮 | 国产一区二区伦理| 精品一区二区三区视频在线观看| 美国三级日本三级久久99| 日本亚洲免费观看| 蜜桃一区二区三区在线观看| 免费久久99精品国产| 七七婷婷婷婷精品国产| 日韩国产精品久久| 久久精品国产秦先生| 久久99久久精品欧美| 国产在线观看免费一区| 激情欧美日韩一区二区| 狠狠久久亚洲欧美| 国产乱码精品一区二区三区五月婷| 国内精品久久久久影院色| 国产麻豆9l精品三级站| 国产精品夜夜嗨| 成人av影视在线观看| 99re亚洲国产精品| 欧美日韩在线不卡| 制服.丝袜.亚洲.另类.中文| 日韩一区二区免费高清| 久久综合久久综合久久综合| 欧美高清在线视频|