Ejemplo n.º 1
0
usb_status usb_class_cdc_unbind_data_interfaces
   (
      cdc_class_call_struct_t *            ccs_ptr
   ) 
{
    cdc_class_call_struct_t *    data_parser;

    #ifdef _HOST_DEBUG_
        DEBUG_LOG_TRACE("usb_class_cdc_unbind_data_interfaces");
    #endif
             
    for (data_parser = data_anchor; data_parser != NULL; data_parser = data_parser->next) 
    {
        if (usb_class_cdc_intf_validate(data_parser))
            if (((usb_data_class_intf_struct_t *) (data_parser->class_intf_handle))->BOUND_CONTROL_INTERFACE == ccs_ptr)
                ((usb_data_class_intf_struct_t *) (data_parser->class_intf_handle))->BOUND_CONTROL_INTERFACE = NULL;
    }
    /* Delete control interface for data interfaces included later */
    usb_class_cdc_unregister_interface(ccs_ptr, &ctrl_anchor);
   
    #ifdef _HOST_DEBUG_
        DEBUG_LOG_TRACE("usb_class_cdc_unbind_data_interfaces, SUCCESSFULL");
    #endif

    return USB_OK;
}
USB_STATUS usb_class_cdc_unbind_acm_interface
   (
      CLASS_CALL_STRUCT_PTR            ccs_ptr
   )
{
    USB_DATA_CLASS_INTF_STRUCT_PTR       if_ptr;

    if (usb_host_class_intf_validate(ccs_ptr)) {
        if_ptr = (USB_DATA_CLASS_INTF_STRUCT_PTR) ccs_ptr->class_intf_handle;
        usb_class_cdc_unregister_interface(ccs_ptr, &data_anchor);
        if_ptr->BOUND_CONTROL_INTERFACE = NULL;
    }

    return USB_OK;
}
USB_STATUS usb_class_cdc_unbind_data_interfaces
   (
      CLASS_CALL_STRUCT_PTR            ccs_ptr
   ) 
{
    CLASS_CALL_STRUCT_PTR    data_parser;

    for (data_parser = data_anchor; data_parser != NULL; data_parser = data_parser->next) 
    {
        if (usb_host_class_intf_validate(data_parser))
            if (((USB_DATA_CLASS_INTF_STRUCT_PTR) (data_parser->class_intf_handle))->BOUND_CONTROL_INTERFACE == ccs_ptr)
                ((USB_DATA_CLASS_INTF_STRUCT_PTR) (data_parser->class_intf_handle))->BOUND_CONTROL_INTERFACE = NULL;
    }
    /* Delete control interface for data interfaces included later */
    usb_class_cdc_unregister_interface(ccs_ptr, &ctrl_anchor);

    return USB_OK;
}
Ejemplo n.º 4
0
usb_status usb_class_cdc_unbind_acm_interface
   (
      cdc_class_call_struct_t *            ccs_ptr
   )
{
    usb_data_class_intf_struct_t *       if_ptr;
   
    #ifdef _HOST_DEBUG_
        DEBUG_LOG_TRACE("usb_class_cdc_unbind_acm_interface");
    #endif

    if (usb_class_cdc_intf_validate(ccs_ptr)) {
        if_ptr = (usb_data_class_intf_struct_t *) ccs_ptr->class_intf_handle;
        usb_class_cdc_unregister_interface(ccs_ptr, &data_anchor);
        if_ptr->BOUND_CONTROL_INTERFACE = NULL;
    }

    #ifdef _HOST_DEBUG_
        DEBUG_LOG_TRACE("usb_class_cdc_unbind_acm_interface, SUCCESSFULL");
    #endif

    return USB_OK;
}