USBD_MSC_IsConn

Description

Get MSC connection state of the device.

Files

usbd_msc.h / usbd_msc.c

Prototype

CPU_BOOLEAN  USBD_MSC_IsConn (CPU_INT08U  class_nbr);


Arguments

class_nbr

MSC instance number.

Returned Value

DEF_YES, if MSC is connected.
DEF_NO, otherwise.

Callers

Application.

Notes / Warnings

USBD_MSC_IsConn() is typically used to verify that the device is in ‘configured’ state and that the MSC instance is ready for communication. The following code illustrates a typical example:


CPU_BOOLEAN  conn;
 
conn = USBD_MSC_IsConn(class_nbr);
if (conn != DEF_YES) {
    USBD_MSC_OS_EnumSignalPend((CPU_INT16U)0,
                                          &os_err);
}


Once the connected status is DEF_YES, the communication can start.