OpenCores
URL https://opencores.org/ocsvn/usb_fpga_2_13/usb_fpga_2_13/trunk

Subversion Repositories usb_fpga_2_13

[/] [usb_fpga_2_13/] [trunk/] [libusbJava-src/] [ch/] [ntb/] [usb/] [Usb_Descriptor.java] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ZTEX
/*
2
 * Java libusb wrapper
3
 * Copyright (c) 2005-2006 Andreas Schläpfer <spandi at users.sourceforge.net>
4
 *
5
 * http://libusbjava.sourceforge.net
6
 * This library is covered by the LGPL, read LGPL.txt for details.
7
 */
8
package ch.ntb.usb;
9
 
10
/**
11
 * Common USB descriptor values.<br>
12
 *
13
 */
14
public class Usb_Descriptor {
15
 
16
        /**
17
         * Descriptor types.
18
         */
19
        public static final int USB_DT_DEVICE = 0x01, USB_DT_CONFIG = 0x02,
20
                        USB_DT_STRING = 0x03, USB_DT_INTERFACE = 0x04,
21
                        USB_DT_ENDPOINT = 0x05;
22
 
23
        /**
24
         * Descriptor types.
25
         */
26
        public static final int USB_DT_HID = 0x21, USB_DT_REPORT = 0x22,
27
                        USB_DT_PHYSICAL = 0x23, USB_DT_HUB = 0x29;
28
 
29
        /**
30
         * Descriptor sizes per descriptor type.
31
         */
32
        public static final int USB_DT_DEVICE_SIZE = 18, USB_DT_CONFIG_SIZE = 9,
33
                        USB_DT_INTERFACE_SIZE = 9, USB_DT_ENDPOINT_SIZE = 7,
34
                        USB_DT_ENDPOINT_AUDIO_SIZE = 9 /* Audio extension */,
35
                        USB_DT_HUB_NONVAR_SIZE = 7;
36
 
37
        private byte bLength;
38
 
39
        private byte bDescriptorType;
40
 
41
        /**
42
         * Get the type of this descriptor.<br>
43
         *
44
         * @return the type of this descriptor
45
         */
46
        public byte getBDescriptorType() {
47
                return bDescriptorType;
48
        }
49
 
50
        /**
51
         * Get the size of this descriptor in bytes.<br>
52
         *
53
         * @return the size of this descriptor in bytes
54
         */
55
        public byte getBLength() {
56
                return bLength;
57
        }
58
 
59
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.