Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals  

IxUART.h

Go to the documentation of this file.
00001 
00072 /* Defaults */
00073 
00090 #define IX_UART_DEF_OPTS (CLOCAL | CS8)
00091 
00099 #define IX_UART_DEF_XMIT 64
00100 
00108 #define IX_UART_DEF_BAUD 9600
00109 
00117 #define IX_UART_MIN_BAUD 9600
00118 
00126 #define IX_UART_MAX_BAUD 926100
00127 
00135 #define IX_UART_XTAL 14745600
00136 
00137 
00138 
00139 /* IOCTL commands (Request codes) */
00140 
00156 #define IX_BAUD_SET 0
00157 
00165 #define IX_BAUD_GET 1
00166 
00172 #define IX_MODE_SET 2
00173 
00181 #define IX_MODE_GET 3
00182 
00190 #define IX_OPTS_SET 4
00191 
00199 #define IX_OPTS_GET 5
00200 
00208 #define IX_STATS_GET    6
00209 
00210 
00211 /* POSIX style ioctl arguments */
00212 
00230 #define CLOCAL      0x1
00231 
00239 #define CREAD       0x2
00240 
00248 #define CSIZE       0xc
00249 
00257 #define CS5     0x0
00258 
00266 #define CS6     0x4
00267 
00275 #define CS7     0x8
00276 
00284 #define CS8     0xc
00285 
00293 #define STOPB       0x20
00294 
00302 #define PARENB      0x40
00303 
00311 #define PARODD      0x80
00312 
00317 typedef enum
00318 {
00319     INTERRUPT=0,    
00320     POLLED,     
00321     LOOPBACK        
00322 } ixUARTMode;
00323 
00328 typedef struct
00329 {
00330     UINT32  rxCount;
00331     UINT32  txCount;    
00332     UINT32  overrunErr;
00333     UINT32  parityErr;
00334     UINT32  framingErr;
00335     UINT32  breakErr;
00336 } ixUARTStats;
00337 
00342 typedef struct
00343 {
00344     UINT8 *addr;    
00345     ixUARTMode mode;    
00346     int baudRate;   
00347     int freq;       
00348     int options;    
00349     int fifoSize;   
00351     ixUARTStats   stats;    
00352 } ixUARTDev;
00353 
00374 PUBLIC IX_STATUS ixUARTInit(ixUARTDev* pUART);
00375 
00391 PUBLIC IX_STATUS ixUARTPollOutput(ixUARTDev* pUART, int outChar);
00392 
00408 PUBLIC IX_STATUS ixUARTPollInput(ixUARTDev* pUART, char *inChar);
00409 
00428 PUBLIC IX_STATUS ixUARTIoctl(ixUARTDev* pUART, int cmd, void* arg);
00429 
Automatically generated from sources. © Intel Corp. 2003