Kernel - Added 'Flags' param to VFS Read/Write/FindDir
[tpg/acess2.git] / KernelLand / Modules / USB / Core / usb_info.c
1 /*
2  * Acess 2 USB Stack
3  * - By John Hodge (thePowersGang)
4  *
5  * usb_info.c
6  * - USB Device Information Functions (helpers for drivers)
7  */
8 #include <usb_core.h>
9 #include "usb.h"
10 #include "usb_lowlevel.h"
11
12 // === CODE ===
13 Uint32 USB_GetInterfaceClass(tUSBInterface *Dev)
14 {
15         return ((Uint32)Dev->IfaceDesc.InterfaceClass << 16)
16                 |((Uint32)Dev->IfaceDesc.InterfaceSubClass << 8)
17                 |((Uint32)Dev->IfaceDesc.InterfaceProtocol << 0);
18 }
19
20 void USB_GetDeviceVendor(tUSBInterface *Dev, Uint16 *VendorID, Uint16 *DeviceID)
21 {
22         *VendorID = LittleEndian16( Dev->Dev->DevDesc.VendorID );
23         *DeviceID = LittleEndian16( Dev->Dev->DevDesc.DeviceID );
24 }
25 char *USB_GetSerialNumber(tUSBInterface *Dev)
26 {
27         return USB_int_GetDeviceString(Dev->Dev, 0, Dev->Dev->DevDesc.SerialNumberStr);
28 }
29

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