00001 #ifndef _DEV_ACE_H
00002 #define _DEV_ACE_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 #include <sys/device.h>
00052
00074
00080 #define ACE_SETSPEED 0x0101
00081
00087 #define ACE_GETSPEED 0x0102
00088
00094 #define ACE_SETDATABITS 0x0103
00095
00101 #define ACE_GETDATABITS 0x0104
00102
00108 #define ACE_SETPARITY 0x0105
00109
00115 #define ACE_GETPARITY 0x0106
00116
00121 #define ACE_SETSTOPBITS 0x0107
00122
00127 #define ACE_GETSTOPBITS 0x0108
00128
00133 #define ACE_SETSTATUS 0x0109
00134
00139 #define ACE_GETSTATUS 0x010a
00140
00146 #define ACE_SETREADTIMEOUT 0x010b
00147
00153 #define ACE_GETREADTIMEOUT 0x010c
00154
00160 #define ACE_SETWRITETIMEOUT 0x010d
00161
00167 #define ACE_GETWRITETIMEOUT 0x010e
00168
00174 #define ACE_SETLOCALECHO 0x010f
00175
00181 #define ACE_GETLOCALECHO 0x0110
00182
00187 #define ACE_SETFLOWCONTROL 0x0111
00188
00193 #define ACE_GETFLOWCONTROL 0x0112
00194
00200 #define ACE_SETCOOKEDMODE 0x0113
00201
00207 #define ACE_GETCOOKEDMODE 0x0114
00208
00213 #define ACE_SETBUFFERMODE 0x0115
00214
00219 #define ACE_GETBUFFERMODE 0x0116
00220
00225 #define ACE_SETTXBUFSIZ 0x011b
00226
00231 #define ACE_GETTXBUFSIZ 0x011c
00232
00237 #define ACE_SETRXBUFSIZ 0x011d
00238
00243 #define ACE_GETRXBUFSIZ 0x011e
00244
00249 #define ACE_SETTXBUFLWMARK 0x0120
00250
00255 #define ACE_GETTXBUFLWMARK 0x0121
00256
00261 #define ACE_SETTXBUFHWMARK 0x0122
00262
00267 #define ACE_GETTXBUFHWMARK 0x0123
00268
00273 #define ACE_SETRXBUFLWMARK 0x0124
00274
00279 #define ACE_GETRXBUFLWMARK 0x0125
00280
00285 #define ACE_SETRXBUFHWMARK 0x0126
00286
00291 #define ACE_GETRXBUFHWMARK 0x0127
00292
00297 #define ACE_SETBLOCKREAD 0x0128
00298
00303 #define ACE_GETBLOCKREAD 0x0129
00304
00309 #define ACE_SETFIFO 0x012a
00310
00315 #define ACE_GETFIFO 0x012b
00316
00325
00330 #define ACE_FRAMINGERROR 0x00000001UL
00331
00336 #define ACE_OVERRUNERROR 0x00000002UL
00337
00342 #define ACE_PARITYERROR 0x00000004UL
00343
00348 #define ACE_ERRORS (ACE_FRAMINGERROR | ACE_OVERRUNERROR | ACE_PARITYERROR)
00349
00352 #define ACE_RXBUFFEREMPTY 0x00000040UL
00353
00359 #define ACE_TXBUFFEREMPTY 0x00000080UL
00360
00363 #define ACE_RTSENABLED 0x00000100UL
00364
00367 #define ACE_RTSDISABLED 0x00000200UL
00368
00371 #define ACE_CTSENABLED 0x00000400UL
00372
00375 #define ACE_CTSDISABLED 0x00000800UL
00376
00379 #define ACE_DTRENABLED 0x00001000UL
00380
00383 #define ACE_DTRDISABLED 0x00002000UL
00384
00387 #define ACE_RXENABLED 0x00010000UL
00388
00391 #define ACE_RXDISABLED 0x00020000UL
00392
00395 #define ACE_TXENABLED 0x00040000UL
00396
00399 #define ACE_TXDISABLED 0x00080000UL
00400
00411
00416 #define ACE_HS_RTSCTS 0x0003
00417
00422 #define ACE_HS_MODEM 0x001F
00423
00431 #define ACE_HS_SOFT 0x0020
00432
00436
00437 __BEGIN_DECLS
00438
00439 extern int AceInit(NUTDEVICE * dev);
00440 extern int AceIOCtl(NUTDEVICE * dev, int req, void *conf);
00441 extern int AceInput(NUTDEVICE * dev);
00442 extern int AceOutput(NUTDEVICE * dev);
00443 extern int AceFlush(NUTDEVICE * dev);
00444
00445 extern int AceGetRaw(u_char * cp);
00446 extern int AcePutRaw(u_char ch);
00447
00448 extern int AceRead(NUTFILE * fp, void *buffer, int size);
00449 extern int AceWrite(NUTFILE * fp, CONST void *buffer, int len);
00450 extern int AceWrite_P(NUTFILE * fp, PGM_P buffer, int len);
00451 extern NUTFILE *AceOpen(NUTDEVICE * dev, CONST char *name, int mode, int acc);
00452 extern long AceSize(NUTFILE * fp);
00453 extern int AceClose(NUTFILE * fp);
00454
00455 __END_DECLS
00456 #endif