Hi,
I'm using MCB4300 with MDK4 ( V4.60 )
Is there an uninit function for usbd stack? I can see only uninit for usbh stack...
In case I'd like to init my USB0 as device and than as host, Am I right with the functions need to be called and the order of appearance ?
usbd_init connect(TRUE) ... Working as a device ... switching to host
connect(FALSE) usbh_init(0) ... Working as a host
Thanks in advance, Idan
Yes, that is not completely clean solution as there are some threads created by stack that will be left running, but you can try to uninitialize the USB controller peripheral, and then it will no longer provide any interrupts to the stack so threads will not do anything and once you call usbd_init again hopefully threads will continue working once USB controller interrupts are routed to device again.
Of course even better solution is to go with latest Middleware.