...
usbd_phdc.h / usbd_phdc.c
Prototype
| Code Block | ||
|---|---|---|
| ||
CPU_BOOLEAN USBD_PHDC_IsConn (CPU_INT08U class_nbr); |
Arguments
class_nbr
PHDC instance number.
...
USBD_PHDC_IsConn() is typically used to verify that the device is in ‘configured’ state and that the PHDC instance is ready for communication. The following code illustrates a typical example:
| Code Block | ||
|---|---|---|
| ||
CPU_BOOLEAN conn;
conn = USBD_PHDC_IsConn(class_nbr);
while (conn != DEF_YES) {
OSTimeDlyHMSM(0, 0, 0, 250);
conn = USBD_PHDC_IsConn(class_nbr);
} |
Once the connected status is DEF_YES, the communication can start.