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

Subversion Repositories usb_fpga_2_04

[/] [usb_fpga_2_04/] [trunk/] [libusbJava-src/] [ch/] [ntb/] [usb/] [Usb_Interface.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
 * Represents an USB interface.<br>
12
 * An interface is a group of alternate settings of a configuration.<br>
13
 *
14
 */
15
public class Usb_Interface {
16
 
17
        /**
18
         * Maximal number of alternate settings
19
         */
20
        public static final int USB_MAXALTSETTING = 128; /* Hard limit */
21
 
22
        private Usb_Interface_Descriptor[] altsetting;
23
 
24
        private int num_altsetting;
25
 
26
        @Override
27
        public String toString() {
28
                return "Usb_Interface num_altsetting: 0x"
29
                                + Integer.toHexString(num_altsetting);
30
        }
31
 
32
        /**
33
         * Retuns an array of interface descriptors.<br>
34
         *
35
         * @return an array of interface descriptors
36
         */
37
        public Usb_Interface_Descriptor[] getAltsetting() {
38
                return altsetting;
39
        }
40
 
41
        /**
42
         * Returns the number of alternate settings.<br>
43
         *
44
         * @return the number of alternate settings
45
         */
46
        public int getNumAltsetting() {
47
                return num_altsetting;
48
        }
49
 
50
}

powered by: WebSVN 2.1.0

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