Go to the documentation of this file.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
00052
00053
00054 #include <sys/device.h>
00055
00077
00083 #define ACE_SETSPEED 0x0101
00084
00090 #define ACE_GETSPEED 0x0102
00091
00097 #define ACE_SETDATABITS 0x0103
00098
00104 #define ACE_GETDATABITS 0x0104
00105
00111 #define ACE_SETPARITY 0x0105
00112
00118 #define ACE_GETPARITY 0x0106
00119
00124 #define ACE_SETSTOPBITS 0x0107
00125
00130 #define ACE_GETSTOPBITS 0x0108
00131
00136 #define ACE_SETSTATUS 0x0109
00137
00142 #define ACE_GETSTATUS 0x010a
00143
00149 #define ACE_SETREADTIMEOUT 0x010b
00150
00156 #define ACE_GETREADTIMEOUT 0x010c
00157
00163 #define ACE_SETWRITETIMEOUT 0x010d
00164
00170 #define ACE_GETWRITETIMEOUT 0x010e
00171
00177 #define ACE_SETLOCALECHO 0x010f
00178
00184 #define ACE_GETLOCALECHO 0x0110
00185
00190 #define ACE_SETFLOWCONTROL 0x0111
00191
00196 #define ACE_GETFLOWCONTROL 0x0112
00197
00203 #define ACE_SETCOOKEDMODE 0x0113
00204
00210 #define ACE_GETCOOKEDMODE 0x0114
00211
00216 #define ACE_SETBUFFERMODE 0x0115
00217
00222 #define ACE_GETBUFFERMODE 0x0116
00223
00228 #define ACE_SETTXBUFSIZ 0x011b
00229
00234 #define ACE_GETTXBUFSIZ 0x011c
00235
00240 #define ACE_SETRXBUFSIZ 0x011d
00241
00246 #define ACE_GETRXBUFSIZ 0x011e
00247
00252 #define ACE_SETTXBUFLWMARK 0x0120
00253
00258 #define ACE_GETTXBUFLWMARK 0x0121
00259
00264 #define ACE_SETTXBUFHWMARK 0x0122
00265
00270 #define ACE_GETTXBUFHWMARK 0x0123
00271
00276 #define ACE_SETRXBUFLWMARK 0x0124
00277
00282 #define ACE_GETRXBUFLWMARK 0x0125
00283
00288 #define ACE_SETRXBUFHWMARK 0x0126
00289
00294 #define ACE_GETRXBUFHWMARK 0x0127
00295
00300 #define ACE_SETBLOCKREAD 0x0128
00301
00306 #define ACE_GETBLOCKREAD 0x0129
00307
00312 #define ACE_SETFIFO 0x012a
00313
00318 #define ACE_GETFIFO 0x012b
00319
00328
00333 #define ACE_FRAMINGERROR 0x00000001UL
00334
00339 #define ACE_OVERRUNERROR 0x00000002UL
00340
00345 #define ACE_PARITYERROR 0x00000004UL
00346
00351 #define ACE_ERRORS (ACE_FRAMINGERROR | ACE_OVERRUNERROR | ACE_PARITYERROR)
00352
00355 #define ACE_RXBUFFEREMPTY 0x00000040UL
00356
00362 #define ACE_TXBUFFEREMPTY 0x00000080UL
00363
00366 #define ACE_RTSENABLED 0x00000100UL
00367
00370 #define ACE_RTSDISABLED 0x00000200UL
00371
00374 #define ACE_CTSENABLED 0x00000400UL
00375
00378 #define ACE_CTSDISABLED 0x00000800UL
00379
00382 #define ACE_DTRENABLED 0x00001000UL
00383
00386 #define ACE_DTRDISABLED 0x00002000UL
00387
00390 #define ACE_RXENABLED 0x00010000UL
00391
00394 #define ACE_RXDISABLED 0x00020000UL
00395
00398 #define ACE_TXENABLED 0x00040000UL
00399
00402 #define ACE_TXDISABLED 0x00080000UL
00403
00414
00419 #define ACE_HS_RTSCTS 0x0003
00420
00425 #define ACE_HS_MODEM 0x001F
00426
00434 #define ACE_HS_SOFT 0x0020
00435
00439
00440 __BEGIN_DECLS
00441
00442 extern int AceInit(NUTDEVICE * dev);
00443 extern int AceIOCtl(NUTDEVICE * dev, int req, void *conf);
00444 extern int AceInput(NUTDEVICE * dev);
00445 extern int AceOutput(NUTDEVICE * dev);
00446 extern int AceFlush(NUTDEVICE * dev);
00447
00448 extern int AceGetRaw(uint8_t * cp);
00449 extern int AcePutRaw(uint8_t ch);
00450
00451 extern int AceRead(NUTFILE * fp, void *buffer, int size);
00452 extern int AceWrite(NUTFILE * fp, CONST void *buffer, int len);
00453 extern int AceWrite_P(NUTFILE * fp, PGM_P buffer, int len);
00454 extern NUTFILE *AceOpen(NUTDEVICE * dev, CONST char *name, int mode, int acc);
00455 extern long AceSize(NUTFILE * fp);
00456 extern int AceClose(NUTFILE * fp);
00457
00458 __END_DECLS
00459 #endif