4 * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/)
5 * This file is part of DevLib - See README.devlib for information.
8 * \brief Hardware dependent serial driver (interface)
12 * \author Stefano Fedrigo <aleph@develer.com>
13 * \author Giovanni Bajo <rasky@develer.com>
18 *#* Revision 1.10 2006/07/19 12:56:26 bernie
19 *#* Convert to new Doxygen style.
21 *#* Revision 1.9 2006/02/17 22:23:06 bernie
22 *#* Update POSIX serial emulator.
24 *#* Revision 1.8 2005/11/04 16:20:02 bernie
25 *#* Fix reference to README.devlib in header.
27 *#* Revision 1.7 2005/01/14 00:47:56 aleph
28 *#* Rename callbacks; SerialHardwareVT.txSending: New callback.
30 *#* Revision 1.6 2004/12/08 08:56:58 bernie
33 *#* Revision 1.5 2004/09/06 21:40:50 bernie
34 *#* Move buffer handling in chip-specific driver.
36 *#* Revision 1.4 2004/08/25 14:12:08 rasky
37 *#* Aggiornato il comment block dei log RCS
39 *#* Revision 1.3 2004/06/03 11:27:09 bernie
40 *#* Add dual-license information.
42 *#* Revision 1.2 2004/05/23 18:21:53 bernie
43 *#* Trim CVS logs and cleanup header info.
50 #include <cfg/compiler.h> /* size_t */
52 struct SerialHardware;
55 struct SerialHardwareVT
57 void (*init)(struct SerialHardware *ctx, struct Serial *ser);
58 void (*cleanup)(struct SerialHardware *ctx);
59 void (*setBaudrate)(struct SerialHardware *ctx, unsigned long rate);
60 void (*setParity)(struct SerialHardware *ctx, int parity);
61 void (*txStart)(struct SerialHardware *ctx);
62 bool (*txSending)(struct SerialHardware *ctx);
67 const struct SerialHardwareVT *table;
68 unsigned char *txbuffer;
69 unsigned char *rxbuffer;
74 struct SerialHardware *ser_hw_getdesc(int unit);
76 #endif /* DRV_SER_P_H */