/****************************************************************************** * Stop USB this stops the LowLevel Part and deregisters USB devices. */ int usb_stop(void) { asynch_allowed=1; usb_started = 0; usb_hub_reset(); return usb_lowlevel_stop(); }
/****************************************************************************** * Stop USB this stops the LowLevel Part and deregisters USB devices. */ int usb_stop(int p) { int res = 0; asynch_allowed = 1; usb_started = 0; usb_hub_reset(); res = usb_lowlevel_stop(p); return res; }
/****************************************************************************** * Stop USB this stops the LowLevel Part and deregisters USB devices. */ int usb_stop(void) { int res = 0; if (usb_started) { asynch_allowed = 1; usb_started = 0; usb_hub_reset(); res = usb_lowlevel_stop(); } return res; }
/*--- Dispatcher ---*/ int32 USBHost::dispatch(uint32 fncode) { int32 ret; D(bug("USBHost: dispatch(%u)", fncode)); ret = EINVFN; switch(fncode) { case GET_VERSION: D(bug("USBHost: getVersion")); ret = USBHOST_NFAPI_VERSION; break; case USBHOST_INTLEVEL: D(bug("USBHost: getINTlevel")); ret = INTLEVEL; break; case USBHOST_RH_PORT_STATUS: ret = rh_port_status(getParameter(0)); break; case USBHOST_LOWLEVEL_INIT: ret = usb_lowlevel_init(); break; case USBHOST_LOWLEVEL_STOP: ret = usb_lowlevel_stop(); break; case USBHOST_SUBMIT_CONTROL_MSG: ret = submit_control_msg(getParameter(0), getParameter(1), getParameter(2), getParameter(3)); break; case USBHOST_SUBMIT_INT_MSG: ret = submit_int_msg(getParameter(0), getParameter(1), getParameter(2), getParameter(3)); break; case USBHOST_SUBMIT_BULK_MSG: ret = submit_bulk_msg(getParameter(0), getParameter(1), getParameter(2)); break; default: D(bug("USBHost: unimplemented function #%d", fncode)); break; } D(bug("USBHost: function returning with 0x%08x", ret)); return ret; }
/****************************************************************************** * Stop USB this stops the LowLevel Part and deregisters USB devices. */ int usb_stop(void) { int i; if (usb_started) { asynch_allowed = 1; usb_started = 0; usb_hub_reset(); for (i = 0; i < CONFIG_USB_MAX_CONTROLLER_COUNT; i++) { if (usb_lowlevel_stop(i)) printf("failed to stop USB controller %d\n", i); } } return 0; }