摘要 |
<p>A method and apparatus for implementing device simulation. A slave device without Universal Serial Bus (USB) client controller is inserted into a master device, and enumerated as a USB device. Control messages from the master device are parsed; the slave device implements transmitting data with the master device through General Purpose Input/Output (GPIO) interfaces, controls end point buffer to save the data transmitted between the master device and the slave device according to the parsed control messages. According to the method, in the situation that a device does not have a hardware USB client controller, by simulating USB data transmission through the GPIO interfaces of device chip, the master device can identify the inserted slave device as a USB device, the data transmission functions between the master device and the slave device are implemented, and it makes that the transmission based on USB can be used more widely.</p> |