ace.h

Go to the documentation of this file.
00001 #ifndef _DEV_ACE_H
00002 #define _DEV_ACE_H
00003 
00004 /*
00005  * Copyright (C) 2001-2003 by Cyber Integration, LLC. All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions
00009  * are met:
00010  *
00011  * 1. Redistributions of source code must retain the above copyright
00012  *    notice, this list of conditions and the following disclaimer.
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in the
00015  *    documentation and/or other materials provided with the distribution.
00016  * 3. Neither the name of the copyright holders nor the names of
00017  *    contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY CYBER INTEGRATION, LLC AND CONTRIBUTORS
00021  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00022  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00023  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CYBER
00024  * INTEGRATION, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00025  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00026  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00027  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00028  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00029  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00030  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00031  * SUCH DAMAGE.
00032  *
00033  *
00034  */
00035 
00036 /*
00037  * $Log: ace.h,v $
00038  * Revision 1.3  2007/08/29 07:43:53  haraldkipp
00039  * Documentation updated and corrected.
00040  *
00041  * Revision 1.2  2006/05/25 09:09:57  haraldkipp
00042  * API documentation updated and corrected.
00043  *
00044  * Revision 1.1  2005/11/24 11:24:06  haraldkipp
00045  * Initial check-in.
00046  * Many thanks to William Basser for this code and also to Przemyslaw Rudy
00047  * for several enhancements.
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

© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/