USBD_ACM_SerialLineCodingReg

Description

Register line coding change notification callback.

Files

usbd_acm_serial.h/usbd_acm_serial.c

Prototype

void  USBD_ACM_SerialLineCodingReg(CPU_INT08U                          subclass_nbr,
                                   USBD_ACM_SERIAL_LINE_CODING_CHNGD   line_coding_chngd,
                                   void                               *p_arg,
                                   USBD_ERR                           *p_err);


Arguments

subclass_nbr

CDC ACM serial emulation subclass instance number.

line_coding_chngd

Line coding change notification callback (see Note #1).

p_arg

Pointer to callback argument.

p_err

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

USBD_ERR_NONE
USBD_ERR_INVALID_ARG

Returned Value

None.

Callers

Application.

Notes / Warnings

The callback specified by line_coding_chngd argument is used to notify changes in the control signals to the application. The line control notification function has the following prototype:

CPU_BOOLEAN  AppLineCodingChngd (CPU_INT08U                    subclass_nbr,
                                 USBD_ACM_SERIAL_LINE_CODING  *p_line_coding,
                                 void                         *p_arg);


Arguments

subclass_nbr

CDC ACM serial emulation subclass instance number.

p_line_coding

Pointer to line coding structure.

p_arg

Pointer to callback argument.

Returned value:

DEF_OK, If line coding is supported by the application.

DEF_FAIL, Otherwise.