Apakah USB Keyboard Hanya Mengirim Sinyal atau Apakah Mereka Menerima Mereka Juga?

Daftar Isi:

Apakah USB Keyboard Hanya Mengirim Sinyal atau Apakah Mereka Menerima Mereka Juga?
Apakah USB Keyboard Hanya Mengirim Sinyal atau Apakah Mereka Menerima Mereka Juga?

Video: Apakah USB Keyboard Hanya Mengirim Sinyal atau Apakah Mereka Menerima Mereka Juga?

Video: Apakah USB Keyboard Hanya Mengirim Sinyal atau Apakah Mereka Menerima Mereka Juga?
Video: How to Alias a Command (in Linux and Mac Terminal) - YouTube 2024, Maret
Anonim
Sebagian besar dari kita tidak pernah terlalu memikirkan keyboard kita selama mereka bekerja dengan baik, tetapi jika Anda berhenti memikirkannya sejenak, apakah mereka hanya mengirim sinyal ke komputer kita atau apakah ada proses bolak-balik yang aktif di tempat kerja ? Posting SuperUser Q & A saat ini memiliki jawaban untuk pertanyaan pembaca yang ingin tahu.
Sebagian besar dari kita tidak pernah terlalu memikirkan keyboard kita selama mereka bekerja dengan baik, tetapi jika Anda berhenti memikirkannya sejenak, apakah mereka hanya mengirim sinyal ke komputer kita atau apakah ada proses bolak-balik yang aktif di tempat kerja ? Posting SuperUser Q & A saat ini memiliki jawaban untuk pertanyaan pembaca yang ingin tahu.

Sesi Tanya & Jawab Hari ini hadir untuk memberi kami SuperUser - subdivisi Stack Exchange, pengelompokan situs web Q & A berbasis komunitas.

Pertanyaan

Pembaca SuperUser, Ne Mo ingin tahu apakah keyboard USB hanya mengirim sinyal atau jika mereka menerimanya juga:

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?

Apakah keyboard USB hanya mengirim sinyal atau apakah mereka menerimanya juga?

Jawabannya

Kontributor superuser LawrenceC dan Dmitry Grigoryev punya jawabannya untuk kami. Pertama, 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

Diikuti oleh jawaban dari Dmitry Grigoryev:

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.

Memiliki sesuatu untuk ditambahkan ke penjelasan? Bicaralah di komentar. Ingin membaca lebih banyak jawaban dari pengguna Stack Exchange yang paham teknologi lainnya? Lihat diskusi lengkap di sini.

Kredit Gambar: Luke Jones (Flickr)

Direkomendasikan: