mirror of
https://github.com/mik3y/usb-serial-for-android
synced 2025-06-08 00:16:13 +00:00
mention close of UsbDeviceConnection in javadoc comment
This commit is contained in:
parent
ce73857825
commit
963729924b
@ -124,7 +124,7 @@ public interface UsbSerialPort extends Closeable {
|
||||
public void open(UsbDeviceConnection connection) throws IOException;
|
||||
|
||||
/**
|
||||
* Closes the port.
|
||||
* Closes the port and {@link UsbDeviceConnection}
|
||||
*
|
||||
* @throws IOException on error closing the port.
|
||||
*/
|
||||
@ -156,13 +156,11 @@ public interface UsbSerialPort extends Closeable {
|
||||
* @param baudRate baud rate as an integer, for example {@code 115200}.
|
||||
* @param dataBits one of {@link #DATABITS_5}, {@link #DATABITS_6},
|
||||
* {@link #DATABITS_7}, or {@link #DATABITS_8}.
|
||||
* @param stopBits one of {@link #STOPBITS_1}, {@link #STOPBITS_1_5}, or
|
||||
* {@link #STOPBITS_2}.
|
||||
* @param stopBits one of {@link #STOPBITS_1}, {@link #STOPBITS_1_5}, or {@link #STOPBITS_2}.
|
||||
* @param parity one of {@link #PARITY_NONE}, {@link #PARITY_ODD},
|
||||
* {@link #PARITY_EVEN}, {@link #PARITY_MARK}, or
|
||||
* {@link #PARITY_SPACE}.
|
||||
* {@link #PARITY_EVEN}, {@link #PARITY_MARK}, or {@link #PARITY_SPACE}.
|
||||
* @throws IOException on error setting the port parameters
|
||||
* @throws UnsupportedOperationException if not supported by a specific device
|
||||
* @throws UnsupportedOperationException if values are not supported by a specific device
|
||||
*/
|
||||
public void setParameters(int baudRate, int dataBits, int stopBits, int parity) throws IOException;
|
||||
|
||||
@ -235,7 +233,7 @@ public interface UsbSerialPort extends Closeable {
|
||||
* Requires less USB calls than calling getRTS() + ... + getRI() individually.
|
||||
*
|
||||
* @return EnumSet.contains(...) is {@code true} if set, else {@code false}
|
||||
* @throws IOException
|
||||
* @throws IOException if an error occurred during reading
|
||||
*/
|
||||
public EnumSet<ControlLine> getControlLines() throws IOException;
|
||||
|
||||
@ -243,12 +241,13 @@ public interface UsbSerialPort extends Closeable {
|
||||
* Gets all control line supported flags.
|
||||
*
|
||||
* @return EnumSet.contains(...) is {@code true} if supported, else {@code false}
|
||||
* @throws IOException
|
||||
* @throws IOException if an error occurred during reading
|
||||
*/
|
||||
public EnumSet<ControlLine> getSupportedControlLines() throws IOException;
|
||||
|
||||
/**
|
||||
* purge non-transmitted output data and / or non-read input data
|
||||
* Purge non-transmitted output data and / or non-read input data.
|
||||
*
|
||||
* @param purgeWriteBuffers {@code true} to discard non-transmitted output data
|
||||
* @param purgeReadBuffers {@code true} to discard non-read input data
|
||||
* @return {@code true} if the operation was successful, or
|
||||
@ -258,7 +257,7 @@ public interface UsbSerialPort extends Closeable {
|
||||
public boolean purgeHwBuffers(boolean purgeWriteBuffers, boolean purgeReadBuffers) throws IOException;
|
||||
|
||||
/**
|
||||
* @return the current state of the connection
|
||||
* Returns the current state of the connection.
|
||||
*/
|
||||
public boolean isOpen();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user