Lines Matching refs:the

6 relies heavily on the definitions declared there.
9 device connected to the user-space controlled bus. The UHID API defines the I/O
10 events provided from the kernel to user-space and vice versa.
18 dynamically so you need to rely on udev (or similar) to create the device node.
22 device with the HID subsystem, then you need to open /dev/uhid once for each
37 The "type" field contains the ID of the event. Depending on the ID different
43 The "type" field defines the payload. For each type, there is a
44 payload-structure available in the union "u" (except for empty payloads). This
48 register the device. UHID will respond with an UHID_START event. You can now
49 start sending data to and reading data from UHID. However, unless UHID sends the
50 UHID_OPEN event, the internally attached HID Device Driver has no user attached.
51 That is, you might put your device asleep unless you receive the UHID_OPEN
52 event. If you receive the UHID_OPEN event, you should start I/O. If the last
53 user closes the HID device, you will receive an UHID_CLOSE event. This may be
59 though the device may have no users.
61 If you want to send data on the interrupt channel to the HID subsystem, you send
62 an HID_INPUT2 event with your raw data payload. If the kernel wants to send data
63 on the interrupt channel to the device, you will read an UHID_OUTPUT event.
64 Data requests on the control channel are currently limited to GET_REPORT and
65 SET_REPORT (no other data reports on the control channel are defined so far).
66 Those requests are always synchronous. That means, the kernel sends
68 the device on the control channel. Once the device responds, you must forward
69 the response via UHID_GET_REPORT_REPLY and UHID_SET_REPORT_REPLY to the kernel.
74 unregister the device. You can now send UHID_CREATE2 again to register a new
76 If you close() the fd, the device is automatically unregistered and destroyed
81 write() allows you to modify the state of the device and feed input data into
82 the kernel. The kernel will parse the event immediately and if the event ID is
83 not supported, it will return -EOPNOTSUPP. If the payload is invalid, then
84 -EINVAL is returned, otherwise, the amount of data that was read is returned and
85 the request was handled successfully. O_NONBLOCK does not affect write() as
90 This creates the internal HID device. No I/O is possible until you send this
91 event to the kernel. The payload is of type struct uhid_create2_req and
95 This destroys the internal HID device. No further I/O will be accepted. There
97 UHID_INPUT events can be sent to the kernel.
99 reopen the character device.
102 You must send UHID_CREATE2 before sending input to the kernel! This event
103 contains a data-payload. This is the raw data that you read from your device
104 on the interrupt channel. The kernel will parse the HID reports.
108 You must copy the "id" field from the request into the answer. Set the "err"
110 If "err" is 0 then you should fill the buffer of the answer with the results
111 of the GET_REPORT request and set "size" correspondingly.
114 This is the SET_REPORT equivalent of UHID_GET_REPORT_REPLY. Unlike GET_REPORT,
115 SET_REPORT never returns a data buffer, therefore, it's sufficient to set the
124 This is sent when the HID device is started. Consider this as an answer to
125 UHID_CREATE2. This is always the first event that is sent. Note that this
135 the kernel already have the report-number as prefix. Otherwise, no
136 prefix is added by the kernel.
137 For messages sent by user-space to the kernel, you must adjust the
141 This is sent when the HID device is stopped. Consider this as an answer to
143 If you didn't destroy your device via UHID_DESTROY, but the kernel sends an
144 UHID_STOP event, this should usually be ignored. It means that the kernel
145 reloaded/changed the device driver loaded on your HID device (or some other
150 This is sent when the HID device is opened. That is, the data that the HID
154 send UHID_INPUT2 events to the kernel.
157 This is sent when there are no more processes which read the HID data. It is
158 the counterpart of UHID_OPEN and you may as well ignore this event.
161 This is sent if the HID device driver wants to send raw data to the I/O
162 device on the interrupt channel. You should read the payload and forward it to
163 the device. The payload is of type "struct uhid_data_req".
167 This event is sent if the kernel driver wants to perform a GET_REPORT request
168 on the control channeld as described in the HID specs. The report-type and
169 report-number are available in the payload.
171 parallel. However, if you fail to respond with a UHID_GET_REPORT_REPLY, the
173 Once you read a GET_REPORT request, you shall forward it to the hid device and
174 remember the "id" field in the payload. Once your hid device responds to the
175 GET_REPORT (or if it fails), you must send a UHID_GET_REPORT_REPLY to the
176 kernel with the exact same "id" as in the request. If the request already
177 timed out, the kernel will ignore the response silently. The "id" field is
181 This is the SET_REPORT equivalent of UHID_GET_REPORT. On receipt, you shall
183 the kernel about it via UHID_SET_REPORT_REPLY.