USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
Loading...
Searching...
No Matches
CDC-ACM - Virtual serial port
+ Collaboration diagram for CDC-ACM - Virtual serial port:

Files

file  cdc_acm.h
 CDC-ACM (virtual serial) device class, app-facing API.
 

Data Structures

struct  cdc_line_coding
 Serial line parameters (USB CDC "line coding"). More...
 
struct  cdc_port
 One CDC-ACM serial port: a single instance of the class on a device. More...
 
struct  cdc_acm_opts
 App callbacks and per-port settings. More...
 

Functions

cdc_portcdc_acm_add (usbip_device *dev, const cdc_acm_opts *opts)
 Add a CDC-ACM serial port to a device.
 
int cdc_acm_send (cdc_port *port, const void *data, int len)
 Transmit bytes to the host (device -> host).
 

Variables

const usbip_device_class usbip_device_cdc_acm
 The CDC-ACM class, for usbip_device_add_class()
 

Detailed Description

Function Documentation

◆ cdc_acm_add()

cdc_port * cdc_acm_add ( usbip_device dev,
const cdc_acm_opts opts 
)

Add a CDC-ACM serial port to a device.

Call it once per port.

Parameters
devthe device.
optsapp callbacks and settings (see cdc_acm_opts), or NULL for a silent port.
Returns
the port handle, or NULL on error.

◆ cdc_acm_send()

int cdc_acm_send ( cdc_port port,
const void *  data,
int  len 
)

Transmit bytes to the host (device -> host).

Parameters
portthe port.
datathe bytes to send.
lennumber of bytes.
Returns
the number of bytes queued/sent (>= 0), or a negative USB_ERROR code.

Variable Documentation

◆ usbip_device_cdc_acm

const usbip_device_class usbip_device_cdc_acm
extern

The CDC-ACM class, for usbip_device_add_class()