usb_hid: 80 character limit cleanup.
This commit is contained in:
@@ -277,8 +277,8 @@ HIDDevice::MaybeScheduleTransfer()
|
|||||||
status_t result = gUSBModule->queue_interrupt(fInterruptPipe,
|
status_t result = gUSBModule->queue_interrupt(fInterruptPipe,
|
||||||
fTransferBuffer, fTransferBufferSize, _TransferCallback, this);
|
fTransferBuffer, fTransferBufferSize, _TransferCallback, this);
|
||||||
if (result != B_OK) {
|
if (result != B_OK) {
|
||||||
TRACE_ALWAYS("failed to schedule interrupt transfer 0x%08" B_PRIx32 "\n",
|
TRACE_ALWAYS("failed to schedule interrupt transfer 0x%08" B_PRIx32
|
||||||
result);
|
"\n", result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,10 +335,12 @@ HIDDevice::_TransferCallback(void *cookie, status_t status, void *data,
|
|||||||
if (status == B_DEV_STALLED && !device->fRemoved) {
|
if (status == B_DEV_STALLED && !device->fRemoved) {
|
||||||
// try clearing stalls right away, the report listeners will resubmit
|
// try clearing stalls right away, the report listeners will resubmit
|
||||||
gUSBModule->queue_request(device->fDevice,
|
gUSBModule->queue_request(device->fDevice,
|
||||||
USB_REQTYPE_STANDARD | USB_REQTYPE_ENDPOINT_OUT, USB_REQUEST_CLEAR_FEATURE,
|
USB_REQTYPE_STANDARD | USB_REQTYPE_ENDPOINT_OUT,
|
||||||
USB_FEATURE_ENDPOINT_HALT, device->fEndpointAddress, 0, NULL, _UnstallCallback, device);
|
USB_REQUEST_CLEAR_FEATURE, USB_FEATURE_ENDPOINT_HALT,
|
||||||
|
device->fEndpointAddress, 0, NULL, _UnstallCallback, device);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
atomic_set(&device->fTransferScheduled, 0);
|
atomic_set(&device->fTransferScheduled, 0);
|
||||||
device->fParser.SetReport(status, device->fTransferBuffer, actualLength);
|
device->fParser.SetReport(status, device->fTransferBuffer, actualLength);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,8 +157,8 @@ HIDReport::SetReport(status_t status, uint8 *report, size_t length)
|
|||||||
fReportStatus = status;
|
fReportStatus = status;
|
||||||
fCurrentReport = report;
|
fCurrentReport = report;
|
||||||
if (status == B_OK && length * 8 < fReportSize) {
|
if (status == B_OK && length * 8 < fReportSize) {
|
||||||
TRACE_ALWAYS("report of %lu bits too small, expected %" B_PRIu32 " bits\n",
|
TRACE_ALWAYS("report of %lu bits too small, expected %" B_PRIu32
|
||||||
length * 8, fReportSize);
|
" bits\n", length * 8, fReportSize);
|
||||||
fReportStatus = B_ERROR;
|
fReportStatus = B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -350,8 +350,8 @@ KeyboardProtocolHandler::Control(uint32 *cookie, uint32 op, void *buffer,
|
|||||||
if (RingBufferReadable() == 0 && fCurrentRepeatKey != 0
|
if (RingBufferReadable() == 0 && fCurrentRepeatKey != 0
|
||||||
&& system_time() - enterTime > fCurrentRepeatDelay) {
|
&& system_time() - enterTime > fCurrentRepeatDelay) {
|
||||||
// this case is for handling key repeats, it means no
|
// this case is for handling key repeats, it means no
|
||||||
// interrupt transfer has happened or it didn't produce any
|
// interrupt transfer has happened or it didn't produce
|
||||||
// new key events, but a repeated key down is due
|
// any new key events, but a repeated key down is due
|
||||||
_WriteKey(fCurrentRepeatKey, true);
|
_WriteKey(fCurrentRepeatKey, true);
|
||||||
|
|
||||||
// the next timeout is reduced to the repeat_rate
|
// the next timeout is reduced to the repeat_rate
|
||||||
|
|||||||
Reference in New Issue
Block a user