d92c7729ca520443ce1a94675cdeb15dd7942150
[tpg/acess2.git] / Modules / USB / Core / main.c
1 /*
2  * Acess2
3  * USB Stack
4  */
5 #define VERSION ( (0<<8)| 5 )
6 #define DEBUG   1
7 #include <acess.h>
8 #include <vfs.h>
9 #include <fs_devfs.h>
10 #include <modules.h>
11 #include "usb.h"
12
13 // === PROTOTYPES ===
14  int    USB_Install(char **Arguments);
15 void    USB_Cleanup(void);
16 char    *USB_ReadDir(tVFS_Node *Node, int Pos);
17 tVFS_Node       *USB_FindDir(tVFS_Node *Node, const char *Name);
18  int    USB_IOCtl(tVFS_Node *Node, int Id, void *Data);
19
20 // === GLOBALS ===
21 MODULE_DEFINE(0, VERSION, USB_Core, USB_Install, NULL, NULL);
22 tDevFS_Driver   gUSB_DrvInfo = {
23         NULL, "usb", {
24                 .NumACLs = 1,
25                 .ACLs = &gVFS_ACL_EveryoneRX,
26                 .Flags = VFS_FFLAG_DIRECTORY,
27                 .ReadDir = USB_ReadDir,
28                 .FindDir = USB_FindDir,
29                 .IOCtl = USB_IOCtl
30         }
31 };
32 tUSBHost        *gUSB_Hosts = NULL;
33
34 // === CODE ===
35 /**
36  * \brief Called once module is loaded
37  */
38 int USB_Install(char **Arguments)
39 {
40         Log_Warning("USB", "Not Complete - Devel Only");
41         return MODULE_ERR_OK;
42 }
43
44 /**
45  * \brief Called just before module is unloaded
46  */
47 void USB_Cleanup()
48 {
49 }
50
51 /**
52  * \fn char *USB_ReadDir(tVFS_Node *Node, int Pos)
53  * \brief Read from the USB root
54  */
55 char *USB_ReadDir(tVFS_Node *Node, int Pos)
56 {
57         return NULL;
58 }
59
60 /**
61  * \fn tVFS_Node *USB_FindDir(tVFS_Node *Node, const char *Name)
62  * \brief Locate an entry in the USB root
63  */
64 tVFS_Node *USB_FindDir(tVFS_Node *Node, const char *Name)
65 {
66         return NULL;
67 }
68
69 /**
70  * \brief Handles IOCtl Calls to the USB driver
71  */
72 int USB_IOCtl(tVFS_Node *Node, int Id, void *Data)
73 {
74         return 0;
75 }

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