File tree Expand file tree Collapse file tree
java-does-usb/src/main/java/net/codecrete/usb Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ public interface UsbAlternateInterface {
2424 * Gets the alternate setting number.
2525 * <p>
2626 * It is equal to the {@code bAlternateSetting} field of the interface descriptor.
27+ * </p>
2728 *
2829 * @return the alternate setting number
2930 */
@@ -60,7 +61,7 @@ public interface UsbAlternateInterface {
6061 int getProtocolCode ();
6162
6263 /**
63- * Gets the endpoints of this alternate interface settings .
64+ * Gets the endpoints of this alternate interface setting .
6465 * <p>
6566 * The endpoint list does not include endpoint 0, which
6667 * is always available and reserved for control transfers.
Original file line number Diff line number Diff line change 2020 *
2121 * @param requestType request type (bits 5 and 6 of {@code bmRequestType})
2222 * @param recipient recipient (bits 0–4 of {@code bmRequestType})
23- * @param request request code (value between 0 and 255, called {@code bRequest} in USB specification)
24- * @param value value (value between 0 and 65535, called {@code wValue} in USB specification)
25- * @param index index (value between 0 and 65535, called {@code wIndex} in USB specification).
23+ * @param request request code (value between 0 and 255, called {@code bRequest} in the USB specification)
24+ * @param value value (value between 0 and 65535, called {@code wValue} in the USB specification)
25+ * @param index index (value between 0 and 65535, called {@code wIndex} in the USB specification)
2626 */
2727public record UsbControlTransfer (
2828 UsbRequestType requestType ,
Original file line number Diff line number Diff line change 1818 * USB device.
1919 * <p>
2020 * In order to make control requests and transfer data, the device must be
21- * opened and an interface must be claimed. In the open state, this current
21+ * opened and an interface must be claimed. In the open state, the current
2222 * process has exclusive access to the device.
2323 * </p>
2424 * <p>
@@ -50,14 +50,14 @@ public interface UsbDevice {
5050 String getProduct ();
5151
5252 /**
53- * Manufacturer name
53+ * Manufacturer name.
5454 *
5555 * @return manufacturer name or {@code null} if not provided by the device
5656 */
5757 String getManufacturer ();
5858
5959 /**
60- * Serial number
60+ * Serial number.
6161 * <p>
6262 * Even though this is supposed to be a human-readable string,
6363 * some devices are known to provide binary data.
@@ -144,7 +144,7 @@ public interface UsbDevice {
144144 * <p>
145145 * On Linux, this method changes the behavior of {@link #claimInterface(int)}. Standard drivers will no longer be
146146 * detached when the interface is claimed. Standard drivers are automatically reattached when the interfaces
147- * are released, at the lasted when the device is closed.
147+ * are released, at the latest when the device is closed.
148148 * </p>
149149 * <p>
150150 * On Windows, this method does nothing.
Original file line number Diff line number Diff line change @@ -23,12 +23,12 @@ public interface UsbDevicePredicate {
2323 * Evaluates this predicate on the given USB device.
2424 *
2525 * @param device the USB device
26- * @return {@code true} of the devices matches the predicate, otherwise {@code false}
26+ * @return {@code true} if the device matches the predicate, otherwise {@code false}
2727 */
2828 boolean matches (@ NotNull UsbDevice device );
2929
3030 /**
31- * Test if the USB devices matches any of the filter conditions.
31+ * Tests whether the USB device matches any of the filter conditions.
3232 *
3333 * @param device the USB device
3434 * @param predicates a list of filter predicates
Original file line number Diff line number Diff line change @@ -40,15 +40,15 @@ public interface UsbInterface {
4040 /**
4141 * Gets the currently selected alternate interface setting.
4242 * <p>
43- * Initially, the alternate settings with number 0 is selected.
43+ * Initially, the alternate setting with number 0 is selected.
4444 * </p>
4545 *
4646 * @return the alternate interface setting.
4747 */
4848 @ NotNull UsbAlternateInterface getCurrentAlternate ();
4949
5050 /**
51- * Gets the alternate interface settings with the specified number.
51+ * Gets the alternate interface setting with the specified number.
5252 *
5353 * @param alternateNumber alternate setting number
5454 * @return alternate interface setting
Original file line number Diff line number Diff line change 1010import org .jetbrains .annotations .NotNull ;
1111
1212/**
13- * Exception thrown if a communication on a USB endpoint failed .
13+ * Exception thrown if communication on a USB endpoint fails .
1414 * <p>
1515 * If a USB endpoint stalls, it is halted and the halt condition must be cleared
1616 * using {@link UsbDevice#clearHalt(UsbDirection, int)} before communication can resume.
1717 * </p>
1818 * <p>
19- * If the control endpoint 0 stalls, it throws this exception but is not halted.
19+ * If the control endpoint 0 stalls, this exception is thrown but the endpoint is not halted.
2020 * </p>
2121 */
2222public class UsbStallException extends UsbException {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public final class Version {
1919 * <p>
2020 * {@code bcdVersion} contains the version: the high byte is the major
2121 * version. The low byte is split into two nibbles (4 bits), the high one
22- * is minor version, the low one is the subminor version. As an example,
22+ * is the minor version, the low one is the subminor version. As an example,
2323 * 0x0321 represents the version 3.2.1.
2424 * </p>
2525 *
You can’t perform that action at this time.
0 commit comments