USBUART
A library for reading/wring data via USB-UART adapters
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules
Classes | Namespaces | Typedefs | Enumerations | Functions
usbuart.h File Reference

API header for USBUART Library. More...

Go to the source code of this file.

Classes

struct  usbuart::eia_tia_232_info
 
struct  usbuart::channel
 I/O channel, represented by a pair of file descriptors. More...
 
struct  usbuart::device_addr
 Device address in terms bus ID, device number. More...
 
struct  usbuart::device_id
 Device ID (Vendor ID/Product ID). More...
 
class  usbuart::context
 USBUART API facade class. More...
 

Namespaces

 usbuart
 USBUART namespace.
 

Typedefs

typedef uint32_t usbuart::baudrate_t
 Baud rate data type. More...
 
typedef enum usbuart::parity_enum usbuart::parity_t
 Parity enum. More...
 
typedef enum
usbuart::stop_bits_enum 
usbuart::stop_bits_t
 Stop bits enum. More...
 
typedef enum
usbuart::flow_control_enum 
usbuart::flow_control_t
 Flow control enum. More...
 
typedef enum usbuart::status_enum usbuart::status_t
 Channel status flags. More...
 

Enumerations

enum  usbuart::parity_enum {
  none, odd, even, mark,
  space
}
 Parity enum. More...
 
enum  usbuart::stop_bits_enum { one, _1_5, two }
 Stop bits enum. More...
 
enum  usbuart::flow_control_enum { none_, rts_cts, dtr_dsr, xon_xoff }
 Flow control enum. More...
 
enum  usbuart::status_enum { read_pipe_ok = 1, write_pipe_ok = 2, usb_dev_ok = 4, alles_gute = read_pipe_ok | write_pipe_ok | usb_dev_ok }
 Channel status flags. More...
 
enum  loglevel_t {
  silent, error, warning, info,
  debug
}
 
enum  usbuart::error_t {
  success, usbuart::error_t::no_channels, usbuart::error_t::not_implemented, usbuart::error_t::invalid_param,
  usbuart::error_t::no_channel, usbuart::error_t::no_access, usbuart::error_t::not_supported, usbuart::error_t::no_device,
  usbuart::error_t::no_interface, usbuart::error_t::interface_busy, usbuart::error_t::libusb_error, usbuart::error_t::usb_error,
  usbuart::error_t::device_error, usbuart::error_t::bad_baudrate, usbuart::error_t::probe_mismatch, usbuart::error_t::control_error,
  usbuart::error_t::io_error, usbuart::error_t::fcntl_error, usbuart::error_t::poll_error, usbuart::error_t::pipe_error,
  usbuart::error_t::out_of_memory, usbuart::error_t::jni_error, usbuart::error_t::unknown_error
}
 API Error codes. More...
 

Functions

int usbuart::usbuart_pipe_byaddr (struct device_addr ba, struct channel *ch, const struct eia_tia_232_info *pi)
 Create two pipes and attach their ends to the USB device using BUS/ADDR. More...
 
struct channel usbuart::usbuart_pipe_bydevid (struct device_id, struct channel *ch, const struct eia_tia_232_info *)
 Create two pipes and attach their ends to the USB device using VID/PID. More...
 
int usbuart::usbuart_attach_byaddr (struct device_addr, struct channel, const struct eia_tia_232_info *)
 Attach pair of file descriptors to the USB device using BUS/ADDR. More...
 
int usbuart::usbuart_attach_bydevid (struct device_id id, struct channel ch, const struct eia_tia_232_info *pi)
 Attach pair of file descriptors to the USB device using VID/PID. More...
 
int usbuart::usbuart_status (struct channel)
 Returns channel status as combination of status_t bits. More...
 
void usbuart::usbuart_close (struct channel)
 Close pipes and detach USB device. More...
 
void usbuart::usbuart_reset (struct channel)
 Resets USB device. More...
 
void usbuart::usbuart_break (struct channel)
 Send RS232 break signal to the USB device. More...
 
int usbuart::usbuart_loop (int timeout)
 Run libusb and async I/O message loops. More...