public class UsbCdc
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
UsbCdc.EventListener |
Modifier and Type | Field and Description |
---|---|
static int |
COMPORT_EVENT_ATTACHED |
static int |
COMPORT_EVENT_DETACHED |
android.content.BroadcastReceiver |
mReceiver |
Constructor and Description |
---|
UsbCdc(android.content.Context context,
UsbCdc.EventListener listener) |
Modifier and Type | Method and Description |
---|---|
void |
abort() |
void |
close() |
void |
destroy() |
void |
flush() |
java.lang.String |
getName() |
UsbSerialPort |
getUsbSerialPort() |
boolean |
isOpened() |
boolean |
open(java.lang.String id) |
int |
read(byte[] buff,
int to) |
boolean |
reopen() |
int |
write(byte[] buff,
int offset,
int len) |
public static final int COMPORT_EVENT_ATTACHED
public static final int COMPORT_EVENT_DETACHED
public final android.content.BroadcastReceiver mReceiver
public UsbCdc(android.content.Context context, UsbCdc.EventListener listener)
public void destroy()
public UsbSerialPort getUsbSerialPort()
public java.lang.String getName()
public boolean open(java.lang.String id)
public boolean isOpened()
public void abort()
public void close()
public boolean reopen()
public int read(byte[] buff, int to)
public int write(byte[] buff, int offset, int len)
public void flush()