5 ms·
There is a common misconception that the host would be polling the keyboard state every time. It is actually polling to ask the device if it has a new packet to
by Findecanor 4y ago
There is a common misconception that the host would be polling the keyboard state every time. It is actually polling to ask the device if it has a new packet to send. If the keyboard's state hasn't changed then there is no new packet and there isn't any input processing done by the CPU.
The host polls because it is in control of scheduling all activity on the bus. It must be scheduled because there can be multiple devices (and multiple interfaces per device) with different characteristics on the same bus, and they must be kept from interfering with one-another.
- oconnor663 4y agoIs this done by a CPU thread, or by dedicated hardware in the USB controller? Does the controller ever interrupt the CPU?