USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
Loading...
Searching...
No Matches
cdc_port Struct Reference

One CDC-ACM serial port: a single instance of the class on a device. More...

#include <classes/cdc_acm.h>

+ Collaboration diagram for cdc_port:

Data Fields

int index
 0-based port number on this device, in cdc_acm_add() order - the same order the host enumerates /dev/ttyACM<n>

 
const char * name
 cdc_acm_opts::name, or "" (never NULL)
 
void * user
 cdc_acm_opts::user, passed straight through
 
int interface_number
 The Communications interface's bInterfaceNumber.
 
uint8_t in_ep
 Bulk IN address actually assigned (a second port is relocated off the default 0x81)

 
uint8_t out_ep
 Bulk OUT address actually assigned

 
cdc_line_coding line_coding
 The line coding the host last set

 
int is_open
 Non-zero while the host asserts DTR

 
usbip_devicedev
 The owning device

 
usbip_functionfunc
 The underlying function - escape hatch to the core usbip_device.h API

 

Detailed Description

One CDC-ACM serial port: a single instance of the class on a device.

Create one with cdc_acm_add(); it stays valid for the life of the device. The fields are maintained by the class and are read-only to the app - they are here so a callback can tell which port fired and how it is configured without having to keep its own table. line_coding and is_open track the host.

It is a distinct type from the other classes' handles, so passing (say) a hid_iface to cdc_acm_send() is a compile error, not a misread state block.

Field Documentation

◆ index

int cdc_port::index

0-based port number on this device, in cdc_acm_add() order - the same order the host enumerates /dev/ttyACM<n>

◆ name

const char* cdc_port::name

cdc_acm_opts::name, or "" (never NULL)

◆ user

void* cdc_port::user

cdc_acm_opts::user, passed straight through

◆ interface_number

int cdc_port::interface_number

The Communications interface's bInterfaceNumber.

◆ in_ep

uint8_t cdc_port::in_ep

Bulk IN address actually assigned (a second port is relocated off the default 0x81)

◆ out_ep

uint8_t cdc_port::out_ep

Bulk OUT address actually assigned

◆ line_coding

cdc_line_coding cdc_port::line_coding

The line coding the host last set

◆ is_open

int cdc_port::is_open

Non-zero while the host asserts DTR

◆ dev

usbip_device* cdc_port::dev

The owning device

◆ func

usbip_function* cdc_port::func

The underlying function - escape hatch to the core usbip_device.h API


The documentation for this struct was generated from the following file: