Patent ID: 7415546
Filing Date: 2008-08-19
Classification: G06F

Abstract:
1. A method for interfacing a peripheral device corresponding to the detection of interface, being adopted by an apparatus activated by a firmware arranged inside the peripheral device connecting to a computer, the apparatus comprising a regulator, an USB physical layer with switch controller, an analog switch, a first pull-high switch resistor, a second pull-high switch resistor, a third pull-high switch resistor, and a fourth pull-high switch resistor, the method comprising the steps of: (a) turning on the third and the fourth switch resistors, that can prevent the second data signal line from floating; (b) turning on the analog switch and setting the default mode of the apparatus to be an USB mode; (c) clearing a counter defining a specific time interval; (d) entering an idle mode while setting up the firmware for making an evaluation to determine whether a complete USB token had been received; (e) ensuring the USB mode is enabled while keeping the analog switch to stay on and turning off the first, the second, the third, and the fourth pull-high switch resistors; (f) using the firmware to determine whether a complete PS2 command had been received; (g) ensuring the PS2 mode is enabled while turning off the analog switch, the third, and the fourth pull-high switch resistors and turning on the first and the second pull-high switch resistors; (h) using the firmware to determine whether the specific time interval had been reached; (i) switching to PS2 mode by the firmware and issuing a PS2 code while clearing the counter; and (j) making an evaluation to determine whether the issued PS2 code is responded to correctly by the computer; if so, the flow proceeds to step (g); otherwise, the flow proceeds to step (d).