瀏覽代碼

Fix LUFA host driver for unconfigured state

tags/v1.9
tmk 11 年之前
父節點
當前提交
1eb67303ee
共有 1 個檔案被更改,包括 12 行新增0 行删除
  1. 12
    0
      protocol/lufa/lufa.c

+ 12
- 0
protocol/lufa/lufa.c 查看文件

{ {
uint8_t timeout = 0; uint8_t timeout = 0;


if (USB_DeviceState != DEVICE_STATE_Configured)
return;

// TODO: handle NKRO report // TODO: handle NKRO report
/* Select the Keyboard Report Endpoint */ /* Select the Keyboard Report Endpoint */
Endpoint_SelectEndpoint(KEYBOARD_IN_EPNUM); Endpoint_SelectEndpoint(KEYBOARD_IN_EPNUM);
#ifdef MOUSE_ENABLE #ifdef MOUSE_ENABLE
uint8_t timeout = 0; uint8_t timeout = 0;


if (USB_DeviceState != DEVICE_STATE_Configured)
return;

/* Select the Mouse Report Endpoint */ /* Select the Mouse Report Endpoint */
Endpoint_SelectEndpoint(MOUSE_IN_EPNUM); Endpoint_SelectEndpoint(MOUSE_IN_EPNUM);


{ {
uint8_t timeout = 0; uint8_t timeout = 0;


if (USB_DeviceState != DEVICE_STATE_Configured)
return;

report_extra_t r = { report_extra_t r = {
.report_id = REPORT_ID_SYSTEM, .report_id = REPORT_ID_SYSTEM,
.usage = data .usage = data
{ {
uint8_t timeout = 0; uint8_t timeout = 0;


if (USB_DeviceState != DEVICE_STATE_Configured)
return;

report_extra_t r = { report_extra_t r = {
.report_id = REPORT_ID_CONSUMER, .report_id = REPORT_ID_CONSUMER,
.usage = data .usage = data

Loading…
取消
儲存