Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Description

Send communication interface class notification to the host.

Files

usbd_cdc.h/usbd_cdc.c

Prototype

Arguments

class_nbr

CDC instance number.

notification

Notification code (see Note #2).

value

Notification value (see Note #2).

p_buf

Pointer to notification buffer (see Note #1).

data_len

Notification’s data section length.

p_err

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

USBD_ERR_NONE
USBD_ERR_INVALID_ARG
USBD_ERR_INVALID_CLASS_STATE
USBD_ERR_DEV_INVALID_NBR
USBD_ERR_DEV_INVALID_STATE
USBD_ERR_EP_INVALID_ADDR
USBD_ERR_EP_INVALID_STATE
USBD_ERR_EP_INVALID_TYPE
USBD_ERR_OS_TIMEOUT
USBD_ERR_OS_ABORT
USBD_ERR_OS_FAIL

Returned Value

None.

Callers

CDC Subclass drivers.

Notes / Warnings

  1. The notification buffer size must contain space for the notification header (8 bytes) and the variable-length data portion.
  2. The following table shows the relationship between CDC request and the parameters passed in the USBD_CDC_Notify() function. The bmRequestType and wIndex fields are calculated internally in the CDC module.
bmRequestTypebNotificationCodewValuewIndexwLengthData
1010001bnotificationvalueInterfacedata_lenp_buf[7] to
p_buf[data_len -1]
  • No labels