Kas USB-klaviatuurid saadavad ainult signaale või saavad nad ka liiga?

Sisukord:

Kas USB-klaviatuurid saadavad ainult signaale või saavad nad ka liiga?
Kas USB-klaviatuurid saadavad ainult signaale või saavad nad ka liiga?

Video: Kas USB-klaviatuurid saadavad ainult signaale või saavad nad ka liiga?

Video: Kas USB-klaviatuurid saadavad ainult signaale või saavad nad ka liiga?
Video: Топ 5 скрытых полезных программ Windows 10 - YouTube 2024, Aprill
Anonim
Enamik meist ei anna kunagi mõelnud oma klaviatuurid, kui nad töötavad hästi, kuid kui te lõpetate mõtlema sellele hetkeks, nad ainult signaale meie arvutid või on aktiivne tagasi edasi-protsess tööl ? Tänane SuperUseri Q & A postitus on vastuseks uudishimulikule lugeja küsimusele.
Enamik meist ei anna kunagi mõelnud oma klaviatuurid, kui nad töötavad hästi, kuid kui te lõpetate mõtlema sellele hetkeks, nad ainult signaale meie arvutid või on aktiivne tagasi edasi-protsess tööl ? Tänane SuperUseri Q & A postitus on vastuseks uudishimulikule lugeja küsimusele.

Tänane küsimuste ja vastuste seanss jõuab meile viisakalt SuperUserini - Stack Exchange'i ja kogukonnapõhiste Q & A veebisaitide rühmitusse.

Küsimus

SuperUser lugeja Ne Mo tahab teada, kas USB klaviatuurid ainult signaale või kui nad saavad neid ka:

A USB keyboard does not need to receive any signals from a computer, just power, right? Or does it need to receive signals as well as send them?

Kas USB klaviatuurid saadavad ainult signaale või saavad nad ka neid?

Vastus

SuperUseri kaasautorid LawrenceC ja Dmitri Grigorjev on meie jaoks vastus. Esiteks, LawrenceC:

From the “Device Class Definition for Human Interface Devices (HID)” specification:

To change the keyboard LEDs, the keyboard accepts a command to do so. So it is not an “input-only” device (meaning it only outputs data to the host). That being said, there is a negotiation and enumeration process with all USB devices that require a back-and-forth conversation between the host and the device. You cannot have a “read-only” USB device. Even before USB, the computer’s keyboard controller would accept commands because it did a few things besides read the keyboard (reference):
To change the keyboard LEDs, the keyboard accepts a command to do so. So it is not an “input-only” device (meaning it only outputs data to the host). That being said, there is a negotiation and enumeration process with all USB devices that require a back-and-forth conversation between the host and the device. You cannot have a “read-only” USB device. Even before USB, the computer’s keyboard controller would accept commands because it did a few things besides read the keyboard (reference):
Image
Image

Järgneb Dmitri Grigorjevi vastus:

Any USB device regardless of its class requires bidirectional communication to function. Every USB device (or function in terms of USB specifications) is represented as a set of endpoints which can be thought of as buffers which accept or receive data. However, even endpoints which can only send data wait for a special packet called a token before they can reply:

The gray boxes represent the USB host while the white boxes represent USB functions (chart source).
The gray boxes represent the USB host while the white boxes represent USB functions (chart source).

Even so-called interrupt transfers are done in this way, with the USB host polling connected devices using token packets. What differs between regular (bulk) transfers and interrupt transfers is that the polling time is small and guaranteed in the latter case. Still, all transfers are initiated by the host.

Kas teil on seletamiseks midagi lisada? Helistage kommentaarides. Kas soovite lugeda rohkem vastuseid teistelt tech-savvy Stack Exchange'i kasutajatelt? Tutvu täieliku arutelu teemaga siit.

Kujutise krediit: Luke Jones (Flickr)

Soovitan: