Added IO Cache Library, Moved FDD Driver to Modules Tree, Fixed Doxygen commenting
[tpg/acess2.git] / Kernel / include / tpl_drv_common.h
1 /*
2  * Acess2
3  * - Common Driver Interface
4  */
5 /**
6  * \file tpl_drv_common.h
7  * \brief Common Driver Interface Definitions
8  */
9 #ifndef _TPL_COMMON_H
10 #define _TPL_COMMON_H
11
12 /**
13  * \enum eTplDrv_IOCtl
14  * \brief Common IOCtl Calls
15  */
16 enum eTplDrv_IOCtl {
17         /// \brief Driver Type - Return an ::eTplDrv_Type value
18         DRV_IOCTL_TYPE,
19         /// \brief Get driver identifier - (char *dest[4])
20         DRV_IOCTL_IDENT,
21         /// \brief Get driver version - (int *ver)
22         DRV_IOCTL_VERSION,
23         /// \brief Get a IOCtl from a symbolic name
24         DRV_IOCTL_LOOKUP
25 };
26
27 /**
28  * \enum eTplDrv_Type
29  * \brief Driver Types returned by DRV_IOCTL_TYPE
30  */
31 enum eTplDrv_Type {
32         DRV_TYPE_NULL,          //!< NULL Type - Custom Interface
33         DRV_TYPE_MISC,          //!< Miscelanious Compilant - Supports the core calls
34         DRV_TYPE_TERMINAL,      //!< Terminal
35         DRV_TYPE_VIDEO,         //!< Video - LFB
36         DRV_TYPE_SOUND,         //!< Audio
37         DRV_TYPE_DISK,          //!< Disk
38         DRV_TYPE_KEYBOARD,      //!< Keyboard
39         DRV_TYPE_MOUSE,         //!< Mouse
40         DRV_TYPE_JOYSTICK,      //!< Joystick / Gamepad
41         DRV_TYPE_NETWORK        //!< Network Device
42 };
43
44 // === FUNCTIONS ===
45 /**
46  * \fn int GetIOCtlId(int Class, char *Name)
47  * \brief Transforms a symbolic name into an ID
48  * \param Class ::eTplDrv_Type type to use
49  * \param Name  Symbolic name to resolve
50  * 
51  * This function is designed to be used by device drivers to implement
52  * ::eTplDrv_IOCtl.DRV_IOCTL_LOOKUP easily given that they conform to
53  * the standard interfaces (::eTplDrv_Type except DRV_TYPE_MISC) and do
54  * not add their own call numbers.
55  */
56 extern int      GetIOCtlId(int Class, char *Name);
57
58 #endif

UCC git Repository :: git.ucc.asn.au