4825bb86ab3a6f790eb561fe751dd1e66f379b6b
[bertos.git] / drv / ser_p.h
1 /*!
2  * \file
3  * <!--
4  * Copyright (C) 2003,2004 Develer S.r.l. (http://www.develer.com/)
5  * All Rights Reserved.
6  * -->
7  *
8  * \brief Hardware dependent serial driver (interface)
9  *
10  * \version $Id$
11  *
12  * \author Stefano Fedrigo <aleph@develer.com>
13  * \author Giovanni Bajo <rasky@develer.com>
14  */
15
16 /*
17  * $Log$
18  * Revision 1.2  2004/05/23 18:21:53  bernie
19  * Trim CVS logs and cleanup header info.
20  *
21  */
22
23 #ifndef DRV_SER_P_H
24 #define DRV_SER_P_H
25
26 struct SerialHardware;
27 struct Serial;
28
29 struct SerialHardwareVT
30 {
31         void (*init)(struct SerialHardware* ctx, struct Serial* ser);
32         void (*cleanup)(struct SerialHardware* ctx);
33         void (*setbaudrate)(struct SerialHardware* ctx, unsigned long rate);
34         void (*setparity)(struct SerialHardware* ctx, int parity);
35         void (*enabletxirq)(struct SerialHardware* ctx);
36 };
37
38 struct SerialHardware
39 {
40         const struct SerialHardwareVT* table;
41 };
42
43 struct SerialHardware* ser_hw_getdesc(int unit);
44
45 #endif /* DRV_SER_P_H */