Import drv/ modules.
[bertos.git] / drv / ser_p.h
1 /**
2  * \file
3  * Copyright (C) 2003,2004 Develer S.r.l. (http://www.develer.com/)
4  * All Rights Reserved.
5  *
6  * \brief Hardware dependent serial driver (interface)
7  *
8  * \version $Id$
9  *
10  * \author Stefano Fedrigo <aleph@develer.com>
11  * \author Giovanni Bajo <rasky@develer.com>
12  */
13
14 /*
15  * $Log$
16  * Revision 1.1  2004/05/23 18:10:11  bernie
17  * Import drv/ modules.
18  *
19  * Revision 1.1  2004/05/14 12:47:26  rasky
20  * Importato nuovo supporto seriale per AVR da Stefano
21  *
22  * Revision 1.3  2004/05/08 13:59:08  aleph
23  * Fix header guard
24  *
25  * Revision 1.2  2004/05/08 13:58:36  aleph
26  * Add log comment
27  *
28  */
29
30 #ifndef _DRV_SER_P_H
31 #define _DRV_SER_P_H
32
33 struct SerialHardware;
34 struct Serial;
35
36 struct SerialHardwareVT
37 {
38         void (*init)(struct SerialHardware* ctx, struct Serial* ser);
39         void (*cleanup)(struct SerialHardware* ctx);
40         void (*setbaudrate)(struct SerialHardware* ctx, unsigned long rate);
41         void (*setparity)(struct SerialHardware* ctx, int parity);
42         void (*enabletxirq)(struct SerialHardware* ctx);
43 };
44
45 struct SerialHardware
46 {
47         const struct SerialHardwareVT* table;
48 };
49
50 struct SerialHardware* ser_hw_getdesc(int unit);
51
52 #endif // _DRV_SER_P_H