uarthw_dsk5402.h
上传用户:dahaojd
上传日期:2008-01-29
资源大小:14357k
文件大小:3k
- /*
- * Copyright 2003 by Texas Instruments Incorporated.
- * All rights reserved. Property of Texas Instruments Incorporated.
- * Restricted rights to use, duplicate or disclose this code are
- * granted through contract.
- *
- */
- /* "@(#) DDK 1.10.00.23 07-02-03 (ddk-b12)" */
- /*
- * ======== uarthw_dsk5402.h ========
- */
- #ifndef UARTHW_DSK5402_
- #define UARTHW_DSK5402_
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef enum {
- UARTHW_DSK5402_WORD7 = 0x02, /* 7-bit */
- UARTHW_DSK5402_WORD8 = 0x03 /* 8-bit */
- } UARTHW_DSK5402_WordLen;
- typedef enum {
- UARTHW_DSK5402_STOP1 = 0, /* 1 stop bit */
- UARTHW_DSK5402_STOP2 = 1 /* 2 stop bits */
- } UARTHW_DSK5402_StopBits;
- typedef enum {
- UARTHW_DSK5402_DISABLE_PARITY = 0x0, /* disable parity checking */
- UARTHW_DSK5402_EVEN_PARITY = 0x3, /* enable even parity */
- UARTHW_DSK5402_ODD_PARITY = 0x2 /* enable odd parity */
- } UARTHW_DSK5402_Parity;
- typedef enum {
- UARTHW_DSK5402_FLOW_NONE = 0x0000,
- UARTHW_DSK5402_FLOW_AFE_RTSCTS = 0x0001,
- UARTHW_DSK5402_FLOW_AFE_CTS = 0x0002
- } UARTHW_DSK5402_FlowControl;
- /* TL16C550C UART baud rates */
- typedef enum {
- UARTHW_DSK5402_BAUD_19200 = 12,
- UARTHW_DSK5402_BAUD_38400 = 6,
- UARTHW_DSK5402_BAUD_57600 = 4,
- UARTHW_DSK5402_BAUD_115200 = 2
- } UARTHW_DSK5402_Baud;
- #define UARTHW_DSK5402_INTR_MASK_DEFAULT 1
- /* UART default attributes settings */
- #define UARTHW_DSK5402_DEFAULTATTRS {
- UARTHW_DSK5402_FLOW_NONE,
- UARTHW_DSK5402_DISABLE_PARITY,
- UARTHW_DSK5402_WORD8,
- UARTHW_DSK5402_STOP1,
- UARTHW_DSK5402_BAUD_115200,
- UARTHW_DSK5402_INTR_MASK_DEFAULT
- }
- #define UARTHW_DSK5402_HW_FLOW_MASK (UARTHW_DSK5402_FLOW_AFE_CTS|
- UARTHW_DSK5402_FLOW_AFE_RTSCTS)
- typedef struct UARTHW_DSK5402_Params {
- /* Flow Control Parameters */
- UARTHW_DSK5402_FlowControl flowControl;
-
- /* Communication Parameters */
- UARTHW_DSK5402_Parity parity;
- UARTHW_DSK5402_WordLen wordSize;
- UARTHW_DSK5402_StopBits stopBits;
- UARTHW_DSK5402_Baud baud;
- Uns intrMask;
- } UARTHW_DSK5402_Params;
- #ifdef __cplusplus
- }
- #endif /* extern "C" */
- #endif /* UARTHW_DSK5402_ */