/* Handle Bulk Out Endpoint Events. 
The function handles Bulk Out endpoint events. It calls USBD_CDC_ACM_EP_BULKOUT_HandleData function to handle received data unless data was being accessed in which case function just acknowledges that there is data to be handled later. */
void USBD_CDC_ACM_EP_BULKOUT_Event(uint32_t event)
/* Handle Bulk Out Endpoint Events. 
The function handles Bulk Out endpoint events. It calls USBD_CDC_ACM_EP_BULKOUT_HandleData function to handle received data unless data was being accessed in which case function just acknowledges that there is data to be handled later. */
void USBD_CDC_ACM_EP_BULKOUT_Event(uint32_t event)
{
    if (data_read_access) {
        data_received_pending_pckts++;
        return;
    }
    data_read_access = 1;
    data_receive_int_access = 1;
    USBD_CDC_ACM_EP_BULKOUT_HandleData();
    data_receive_int_access = 0;
    data_read_access = 0;
    if (ptr_data_received != ptr_data_read) {
        USBD_CDC_ACM_DataReceived(ptr_data_received - ptr_data_read);
    }
}