- Detection of the USB role of the device
- Virtually any USB OTG transceiver can be used
- Simple interface to OTG-hardware
- Seamless integration with emUSB-Host and emUSB-Device
USB On-The-Go (OTG) introduces the dual-role device, meaning a device capable of functioning as either host or peripheral. USB OTG retains the standard USB host/peripheral model, in which a single host talks to USB peripherals. emUSB OTG offers a simple interface in order to detect the role of the USB OTG controller.
Example Code Included
An example application which uses the API is provided with any shipment or eval-software including emUSB-Host-OTG. This example starts the OTG stack and waits until a valid session is detected. As soon as a valid session is detected, the ID-pin state is checked to detect whether emUSB-Device or emUSB-Host shall then be initialized. For emUSB-Device a simple mouse sample is used. On emUSB-Host side an MSD-sample is used that detects a USB memory stick and shows information about the detected stick.
Resource Usage by this Class
|ROM usage||RAM usage|
|App. 350 Byte + (emUSB-Host core incl. driver + emUSB-Device core incl. driver)||4 Byte + (emUSB-Host core incl. driver + emUSB-Device core incl. driver)|