uartdef.h

来自「本程序为ST公司开发的源代码」· C头文件 代码 · 共 89 行

H
89
字号
/************************************************** * * * CVS ID:   $Id: uartdef.h,v 1.2 2006/04/26 17:59:53 kutik Exp $ * Author:   Maurizio Marcucci [MM] - STM * Date:     $Date: 2006/04/26 17:59:53 $ * Revision: $Revision: 1.2 $ *  * Description: *  *   Accordo+ Hardware registers definition * *************************************************** *  * COPYRIGHT (C) ST Microelectronics  2005 *            All Rights Reserved * ***************************************************/#ifndef __UARTDEF_H#define __UARTDEF_H// UART_CR registertypedef struct{  UInt Mode       : 3; // Bit 0-2  UInt StopBits   : 2; // Bit 3-4  UInt ParityOdd  : 1; // Bit 5  UInt LoopBack   : 1; // Bit 6  UInt Run        : 1; // Bit 7  UInt RxEnable   : 1; // Bit 8  UInt            : 1; // Bit 9  UInt FifoEnable : 1; // Bit 10  UInt            : 5; // Bit 11-15  UInt            : 16;} UART_CR_STRUCT;typedef union{ UART_CR_STRUCT  field; uint32    all;}UART_CR_UNION;// UART_IER registertypedef struct{  UInt RxBuffNotEmptyIe  :1; //Bit 0  UInt TxEmptyIe         :1; //Bit 1  UInt TxHalfEmptyIe     :1; //Bit 2  UInt ParityErrorIe     :1; //Bit 3  UInt FrameErrorIe      :1; //Bit 4  UInt OverrunErrorIe    :1; //Bit 5  UInt TimeoutNotEmptyIe :1; //Bit 6  UInt TimeoutIdleIe     :1; //Bit 7  UInt RxHalfFullIe      :1; //Bit 8  UInt                   :23;} UART_IER_STRUCT;typedef union{ UART_IER_STRUCT  field; uint32    all;}UART_IER_UNION;// UART_SR registertypedef struct{  UInt RxBuffNotEmpty   :1;  // Bit 0  UInt TxEmpty          :1;  // Bit 1  UInt TxHalfEmpty      :1;  // Bit 2  UInt ParityError      :1;  // Bit 3  UInt FrameError       :1;  // Bit 4  UInt OverrunError     :1;  // Bit 5  UInt TimeoutNotEmpty  :1;  // Bit 6  UInt TimeoutIdle      :1;  // Bit 7  UInt RxHalfFull       :1;  // Bit 8  UInt TxFull           :1;  // Bit 9  UInt                  :6;  // Bit 10-15  UInt                  :16;}UART_SR_STRUCT;typedef union{ UART_SR_STRUCT  field; uint32    all;}UART_SR_UNION;#endif  /* __UARTDEF_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?