-// ----------------------------------------------------------------------------
-// VFS Interface
-// ----------------------------------------------------------------------------
-char *HID_Mouse_Root_ReadDir(tVFS_Node *Node, int Pos)
-{
- char data[3];
- if(Pos < 0 || Pos >= Node->Size) return NULL;
-
- snprintf(data, 3, "%i", Pos);
- return strdup(data);
-}
-
-tVFS_Node *HID_Mouse_Root_FindDir(tVFS_Node *Node, const char *Name)
-{
- int ID;
- int ofs;
- tHID_Mouse *mouse;
-
- if( Name[0] == '\0' )
- return NULL;
-
- ofs = ParseInt(Name, &ID);
- if( ofs == 0 || Name[ofs] != '\0' )
- return NULL;
-
- // Scan list, locate item
- Mutex_Acquire(&glHID_MouseListLock);
- for( mouse = gpHID_FirstMouse; mouse && ID --; mouse = mouse->Next ) ;
- mouse->Node.ReferenceCount ++;
- Mutex_Release(&glHID_MouseListLock);
-
- return &mouse->Node;
-}
-
-Uint64 HID_Mouse_Dev_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer)
-{
- tHID_Mouse *info = Node->ImplPtr;
-
- if( Offset > FILE_SIZE ) return 0;
-
- if( Length > FILE_SIZE ) Length = FILE_SIZE;
- if( Offset + Length > FILE_SIZE ) Length = FILE_SIZE - Offset;
-
- memcpy( Buffer, info->FileData + Offset, Length );
-
- return Length;
-}
-
-static const char *csaDevIOCtls[] = {DRV_IOCTLNAMES, DRV_JOY_IOCTLNAMES, NULL};
-int HID_Mouse_Dev_IOCtl(tVFS_Node *Node, int ID, void *Data)
-{
- switch(ID)
- {
- BASE_IOCTLS(DRV_TYPE_JOYSTICK, "USBMouse", 0x050, csaDevIOCtls);
- }
- return -1;
-}
-void HID_Mouse_Dev_Reference(tVFS_Node *Node)
-{
- Node->ReferenceCount ++;
-}
-void HID_Mouse_Dev_Close(tVFS_Node *Node)
-{
- Node->ReferenceCount --;
-}
-