USBD_ACM_SerialAdd

Description

Add a new CDC ACM serial emulation instance.

Files

usbd_acm_serial.h/usbd_acm_serial.c

Prototype

CPU_INT08U  USBD_ACM_SerialAdd (CPU_INT16U   line_state_interval,
                                CPU_INT16U   call_mgmt_capabilities,
                                USBD_ERR    *p_err);


Arguments

line_state_interval

Polling interval in frames or microframes for line state notification. The value must be a power of 2.

call_mgmt_capabilities

Call Management Capabilities bitmap. OR'ed of the following flags:

State eventDescription
USBD_ACM_SERIAL_CALL_MGMT_DEV
Device handles call management itself
USBD_ACM_SERIAL_CALL_MGMT_DATA_CCI_DCI
Device can send/receive call management information over a Data Class interface

p_err

Pointer to variable that will receive the return error code from this function.

USBD_ERR_NONE
USBD_ERR_ALLOC
USBD_ERR_INVALID_ARG

Returned Value

CDC ACM serial emulation subclass instance number, if no errors.

USBD_ACM_SERIAL_NBR_NONE, otherwise.

Callers

Application.

Notes / Warnings

  1. Depending on the operating system (Windows, Linux or Mac OS X), not all the possible flags combinations are supported. This table shows the different combinations and the support by each major operating system (OS):
Flags CombinationWindowsLinuxMac OS XNote
USBD_ACM_SERIAL_CALL_MGMT_DEV(tick)(tick)(error)
USBD_ACM_SERIAL_CALL_MGMT_DATA_CCI_DCI(tick)(tick)(tick)If USBD_ACM_SERIAL_CALL_MGMT_DEV is not set, USBD_ACM_SERIAL_CALL_MGMT_DATA_CCI_DCI alone is ignored by the OS
(USBD_ACM_SERIAL_CALL_MGMT_DEV |
USBD_ACM_SERIAL_CALL_MGMT_DATA_CCI_DCI)
(tick)(tick)(tick)