Vai USB klaviatūras tikai nosūta signālus vai arī tie saņem tos pārāk?

Satura rādītājs:

Vai USB klaviatūras tikai nosūta signālus vai arī tie saņem tos pārāk?
Vai USB klaviatūras tikai nosūta signālus vai arī tie saņem tos pārāk?

Video: Vai USB klaviatūras tikai nosūta signālus vai arī tie saņem tos pārāk?

Video: Vai USB klaviatūras tikai nosūta signālus vai arī tie saņem tos pārāk?
Video: MUST HAVE 14” & 16” MacBook Pro Accessories for 2022! - YouTube 2024, Aprīlis
Anonim
Lielākā daļa no mums nekad nedomā par mūsu tastatūrām tik ilgi, kamēr viņi strādā labi, bet, ja jūs uz mirkli pārtraucat domāt par to, vai viņi tikai sūta signālus saviem datoriem vai arī tur ir aktīvs darbs atpakaļ un turpināšanai ? Šodienas SuperUser Q & A ziņai ir atbilde uz ziņkārīgo lasītāja jautājumu.
Lielākā daļa no mums nekad nedomā par mūsu tastatūrām tik ilgi, kamēr viņi strādā labi, bet, ja jūs uz mirkli pārtraucat domāt par to, vai viņi tikai sūta signālus saviem datoriem vai arī tur ir aktīvs darbs atpakaļ un turpināšanai ? Šodienas SuperUser Q & A ziņai ir atbilde uz ziņkārīgo lasītāja jautājumu.

Šodienas jautājumu un atbilžu sesija mums priecājas par SuperUser - Stack Exchange dalību, kas ir kopienas vadīta Q & A tīmekļa vietņu grupa.

Jautājums

SuperUser lasītājs Ne Mo vēlas zināt, vai USB tastatūras nosūta signālus vai arī tos saņem arī:

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?

Vai USB tastatūras tikai sūta signālus vai arī viņi tos saņem arī?

Atbilde

SuperUser autori LawrenceC un Dmitrijs Grigorjevs mums ir atbilde. Pirmkārt, 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

Seko Dmitrija Grigorjeva atbilde:

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.

Vai kaut ko pievienot paskaidrojumam? Skatieties komentāros. Vēlaties lasīt citas atbildes no citiem tehnoloģiju savvy Stack Exchange lietotājiem? Šeit skatiet pilnu diskusiju pavedienu.

Attēla kredīts: Lūka Jonesa (Flickr)

Ieteicams: