I am developing an application that uses both USB peripheral and host modes. I have used both the usb audio and shell browser examples to support my development thus far.
I would like to be able to detect the type of device that is detected(A or B) and based on the result load the appropriate USB libraries. What is your recommendation for performing this detection? What sequence should this be carried out in? I understand that I can begin a session by setting the session bit in USB_OTG_DEV_CTL. Unfortunately, this operation alone does not seem to reflect a difference in the register bits between a A and B device connection. I am using a EZKIT BF527.
I am using the system service libraries as well. Would this be better handled via the USB dev driver? If so how?