/* check cdc acm is ready for data transfer  */
uint8_t cdc_acm_check_ready(usb_dev *udev)
/* check cdc acm is ready for data transfer  */
uint8_t cdc_acm_check_ready(usb_dev *udev)
{
    if (udev->dev.class_data[CDC_COM_INTERFACE] != NULL) {
        usb_cdc_handler *cdc = (usb_cdc_handler *)udev->dev.class_data[CDC_COM_INTERFACE];
        if ((1U == cdc->packet_receive) && (1U == cdc->packet_sent)) {
            return 0U;
        }
    }
    return 1U;
}