make device keyboard buildable & runnable with ea4357
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,105 +1,114 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<projectDescription>
|
<projectDescription>
|
||||||
<name>device_keyboard</name>
|
<name>device_keyboard</name>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
</projects>
|
||||||
<buildSpec>
|
<buildSpec>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
<triggers>clean,full,incremental,</triggers>
|
<triggers>clean,full,incremental,</triggers>
|
||||||
<arguments>
|
<arguments>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>?name?</key>
|
<key>?name?</key>
|
||||||
<value></value>
|
<value></value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||||
<value>all</value>
|
<value>all</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||||
<value></value>
|
<value></value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||||
<value>make</value>
|
<value>make</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||||
<value>${workspace_loc:/device_keyboard/Debug}</value>
|
<value>${workspace_loc:/device_keyboard/Debug}</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||||
<value>clean</value>
|
<value>clean</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.contents</key>
|
<key>org.eclipse.cdt.make.core.contents</key>
|
||||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||||
<value>false</value>
|
<value>false</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||||
<value>all</value>
|
<value>all</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
<dictionary>
|
<dictionary>
|
||||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
</dictionary>
|
</dictionary>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||||
<triggers>full,incremental,</triggers>
|
<triggers>full,incremental,</triggers>
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
</buildSpec>
|
</buildSpec>
|
||||||
<natures>
|
<natures>
|
||||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
<linkedResources>
|
<linkedResources>
|
||||||
<link>
|
<link>
|
||||||
<name>bsp</name>
|
<name>bsp</name>
|
||||||
<type>2</type>
|
<type>2</type>
|
||||||
<locationURI>PARENT-2-PROJECT_LOC/bsp</locationURI>
|
<locationURI>PARENT-2-PROJECT_LOC/bsp</locationURI>
|
||||||
</link>
|
</link>
|
||||||
<link>
|
<link>
|
||||||
<name>tinyusb</name>
|
<name>tinyusb</name>
|
||||||
<type>2</type>
|
<type>2</type>
|
||||||
<locationURI>PARENT-3-PROJECT_LOC/tinyusb</locationURI>
|
<locationURI>PARENT-3-PROJECT_LOC/tinyusb</locationURI>
|
||||||
</link>
|
</link>
|
||||||
</linkedResources>
|
</linkedResources>
|
||||||
<filteredResources>
|
<filteredResources>
|
||||||
<filter>
|
<filter>
|
||||||
<id>1369631005268</id>
|
<id>1382883671880</id>
|
||||||
<name></name>
|
<name></name>
|
||||||
<type>26</type>
|
<type>26</type>
|
||||||
<matcher>
|
<matcher>
|
||||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
<arguments>1.0-name-matches-false-false-startup_keil</arguments>
|
<arguments>1.0-name-matches-false-false-startup_keil</arguments>
|
||||||
</matcher>
|
</matcher>
|
||||||
</filter>
|
</filter>
|
||||||
</filteredResources>
|
<filter>
|
||||||
</projectDescription>
|
<id>1382883671891</id>
|
||||||
|
<name></name>
|
||||||
|
<type>26</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||||
|
<arguments>1.0-name-matches-false-false-startup_iar</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
</filteredResources>
|
||||||
|
</projectDescription>
|
||||||
|
@@ -65,7 +65,7 @@
|
|||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// HOST CONFIGURATION
|
// HOST CONFIGURATION
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
#define TUSB_CFG_HOST_DEVICE_MAX 2
|
#define TUSB_CFG_HOST_DEVICE_MAX 1
|
||||||
#define TUSB_CFG_CONFIGURATION_MAX 1
|
#define TUSB_CFG_CONFIGURATION_MAX 1
|
||||||
|
|
||||||
//------------- USBD -------------//
|
//------------- USBD -------------//
|
||||||
@@ -73,8 +73,8 @@
|
|||||||
|
|
||||||
//------------- CLASS -------------//
|
//------------- CLASS -------------//
|
||||||
#define TUSB_CFG_HOST_HUB 0
|
#define TUSB_CFG_HOST_HUB 0
|
||||||
#define TUSB_CFG_HOST_HID_KEYBOARD 1
|
#define TUSB_CFG_HOST_HID_KEYBOARD 0
|
||||||
#define TUSB_CFG_HOST_HID_MOUSE 1
|
#define TUSB_CFG_HOST_HID_MOUSE 0
|
||||||
#define TUSB_CFG_HOST_HID_GENERIC 0
|
#define TUSB_CFG_HOST_HID_GENERIC 0
|
||||||
#define TUSB_CFG_HOST_MSC 0
|
#define TUSB_CFG_HOST_MSC 0
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -67,102 +67,6 @@ STATIC_ hidd_interface_t keyboard_intf =
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tusb_error_t hidd_control_request(uint8_t coreid, tusb_control_request_t const * p_request)
|
|
||||||
{
|
|
||||||
#if TUSB_CFG_DEVICE_HID_KEYBOARD
|
|
||||||
if (p_request->bmRequestType.type == TUSB_REQUEST_TYPE_STANDARD) // standard request to hid
|
|
||||||
{
|
|
||||||
uint8_t const desc_type = u16_high_u8(p_request->wValue);
|
|
||||||
uint8_t const desc_index = u16_low_u8 (p_request->wValue);
|
|
||||||
|
|
||||||
if ( p_request->bRequest == TUSB_REQUEST_GET_DESCRIPTOR &&
|
|
||||||
desc_type == HID_DESC_TYPE_REPORT)
|
|
||||||
{
|
|
||||||
dcd_pipe_control_write(coreid, keyboard_intf.p_report_desc,
|
|
||||||
keyboard_intf.p_hid_desc->wReportLength);
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
ASSERT_STATUS(TUSB_ERROR_FAILED);
|
|
||||||
}
|
|
||||||
}else if ( p_request->wIndex == keyboard_intf.p_interface_desc->bInterfaceNumber) // class request
|
|
||||||
{
|
|
||||||
switch(p_request->bRequest)
|
|
||||||
{
|
|
||||||
case HID_REQUEST_CONTROL_SET_IDLE:
|
|
||||||
// TODO hidd idle rate, no data phase
|
|
||||||
break;
|
|
||||||
|
|
||||||
case HID_REQUEST_CONTROL_SET_REPORT:
|
|
||||||
// TODO hidd set report, has data phase
|
|
||||||
// TODO verify data read from control pipe
|
|
||||||
// ; uint8_t hehe[10]= { 0 };
|
|
||||||
// dcd_pipe_control_read(coreid, hehe, p_request->wLength);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case HID_REQUEST_CONTROL_GET_REPORT:
|
|
||||||
case HID_REQUEST_CONTROL_GET_IDLE:
|
|
||||||
case HID_REQUEST_CONTROL_GET_PROTOCOL:
|
|
||||||
case HID_REQUEST_CONTROL_SET_PROTOCOL:
|
|
||||||
default:
|
|
||||||
ASSERT_STATUS(TUSB_ERROR_NOT_SUPPORTED_YET);
|
|
||||||
return TUSB_ERROR_NOT_SUPPORTED_YET;
|
|
||||||
}
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
ASSERT_STATUS(TUSB_ERROR_FAILED);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return TUSB_ERROR_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
tusb_error_t hidd_init(uint8_t coreid, tusb_descriptor_interface_t const * p_interface_desc, uint16_t *p_length)
|
|
||||||
{
|
|
||||||
uint8_t const *p_desc = (uint8_t const *) p_interface_desc;
|
|
||||||
|
|
||||||
//------------- HID descriptor -------------//
|
|
||||||
p_desc += p_desc[DESCRIPTOR_OFFSET_LENGTH];
|
|
||||||
tusb_hid_descriptor_hid_t const *p_desc_hid = (tusb_hid_descriptor_hid_t const *) p_desc;
|
|
||||||
ASSERT_INT(HID_DESC_TYPE_HID, p_desc_hid->bDescriptorType, TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE);
|
|
||||||
|
|
||||||
//------------- Endpoint Descriptor -------------//
|
|
||||||
p_desc += p_desc[DESCRIPTOR_OFFSET_LENGTH];
|
|
||||||
tusb_descriptor_endpoint_t const *p_desc_endpoint = (tusb_descriptor_endpoint_t const *) p_desc;
|
|
||||||
ASSERT_INT(TUSB_DESC_TYPE_ENDPOINT, p_desc_endpoint->bDescriptorType, TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE);
|
|
||||||
|
|
||||||
if (p_interface_desc->bInterfaceSubClass == HID_SUBCLASS_BOOT)
|
|
||||||
{
|
|
||||||
switch(p_interface_desc->bInterfaceProtocol)
|
|
||||||
{
|
|
||||||
#if TUSB_CFG_DEVICE_HID_KEYBOARD
|
|
||||||
case HID_PROTOCOL_KEYBOARD:
|
|
||||||
ASSERT_STATUS( dcd_pipe_open(coreid, p_desc_endpoint) );
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if TUSB_CFG_DEVICE_HID_MOUSE
|
|
||||||
case HID_PROTOCOL_MOUSE:
|
|
||||||
ASSERT_STATUS( hidd_interface_init(p_interface_desc,
|
|
||||||
app_tusb_mouse_desc_report, p_desc_hid->wReportLength,
|
|
||||||
hidd_mouse_buffer , sizeof(hidd_mouse_buffer)) );
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
default: // TODO unknown, unsupported protocol --> skip this interface
|
|
||||||
return TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE;
|
|
||||||
}
|
|
||||||
*p_length = sizeof(tusb_descriptor_interface_t) + sizeof(tusb_hid_descriptor_hid_t) + sizeof(tusb_descriptor_endpoint_t);
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
// open generic
|
|
||||||
*p_length = 0;
|
|
||||||
return TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return TUSB_ERROR_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(CAP_DEVICE_ROMDRIVER) && TUSB_CFG_DEVICE_USE_ROM_DRIVER
|
#if defined(CAP_DEVICE_ROMDRIVER) && TUSB_CFG_DEVICE_USE_ROM_DRIVER
|
||||||
#include "device/dcd_nxp_romdriver.h" // TODO remove rom driver dependency
|
#include "device/dcd_nxp_romdriver.h" // TODO remove rom driver dependency
|
||||||
|
|
||||||
@@ -256,8 +160,7 @@ tusb_error_t hidd_configured(void)
|
|||||||
|
|
||||||
return TUSB_ERROR_NONE;
|
return TUSB_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
tusb_error_t hidd_init(uint8_t coreid, tusb_descriptor_interface_t const * p_interface_desc, uint16_t *p_length)
|
||||||
tusb_error_t hidd_init(tusb_descriptor_interface_t const * p_interface_desc, uint16_t *p_length)
|
|
||||||
{
|
{
|
||||||
uint8_t const *p_desc = (uint8_t const *) p_interface_desc;
|
uint8_t const *p_desc = (uint8_t const *) p_interface_desc;
|
||||||
|
|
||||||
@@ -266,7 +169,7 @@ tusb_error_t hidd_init(tusb_descriptor_interface_t const * p_interface_desc, uin
|
|||||||
tusb_hid_descriptor_hid_t const *p_desc_hid = (tusb_hid_descriptor_hid_t const *) p_desc;
|
tusb_hid_descriptor_hid_t const *p_desc_hid = (tusb_hid_descriptor_hid_t const *) p_desc;
|
||||||
ASSERT_INT(HID_DESC_TYPE_HID, p_desc_hid->bDescriptorType, TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE);
|
ASSERT_INT(HID_DESC_TYPE_HID, p_desc_hid->bDescriptorType, TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE);
|
||||||
|
|
||||||
if (p_interface_desc->bInterfaceSubClass == HID_SUBCLASS_BOOT)
|
if (p_interface_desc->bInterfaceSubClass == HID_SUBCLASS_BOOT)
|
||||||
{
|
{
|
||||||
switch(p_interface_desc->bInterfaceProtocol)
|
switch(p_interface_desc->bInterfaceProtocol)
|
||||||
{
|
{
|
||||||
@@ -439,6 +342,104 @@ ErrorCode_t HID_EpOut_Hdlr (USBD_HANDLE_T hUsb, void* data, uint32_t event)
|
|||||||
}
|
}
|
||||||
return LPC_OK;
|
return LPC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else // not use the rom driver
|
||||||
|
|
||||||
|
tusb_error_t hidd_control_request(uint8_t coreid, tusb_control_request_t const * p_request)
|
||||||
|
{
|
||||||
|
#if TUSB_CFG_DEVICE_HID_KEYBOARD
|
||||||
|
if (p_request->bmRequestType_bit.type == TUSB_REQUEST_TYPE_STANDARD) // standard request to hid
|
||||||
|
{
|
||||||
|
uint8_t const desc_type = u16_high_u8(p_request->wValue);
|
||||||
|
uint8_t const desc_index = u16_low_u8 (p_request->wValue);
|
||||||
|
|
||||||
|
if ( p_request->bRequest == TUSB_REQUEST_GET_DESCRIPTOR &&
|
||||||
|
desc_type == HID_DESC_TYPE_REPORT)
|
||||||
|
{
|
||||||
|
dcd_pipe_control_write(coreid, keyboard_intf.p_report_desc,
|
||||||
|
keyboard_intf.p_hid_desc->wReportLength);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
ASSERT_STATUS(TUSB_ERROR_FAILED);
|
||||||
|
}
|
||||||
|
}else if ( p_request->wIndex == keyboard_intf.p_interface_desc->bInterfaceNumber) // class request
|
||||||
|
{
|
||||||
|
switch(p_request->bRequest)
|
||||||
|
{
|
||||||
|
case HID_REQUEST_CONTROL_SET_IDLE:
|
||||||
|
// TODO hidd idle rate, no data phase
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HID_REQUEST_CONTROL_SET_REPORT:
|
||||||
|
// TODO hidd set report, has data phase
|
||||||
|
// TODO verify data read from control pipe
|
||||||
|
// ; uint8_t hehe[10]= { 0 };
|
||||||
|
// dcd_pipe_control_read(coreid, hehe, p_request->wLength);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HID_REQUEST_CONTROL_GET_REPORT:
|
||||||
|
case HID_REQUEST_CONTROL_GET_IDLE:
|
||||||
|
case HID_REQUEST_CONTROL_GET_PROTOCOL:
|
||||||
|
case HID_REQUEST_CONTROL_SET_PROTOCOL:
|
||||||
|
default:
|
||||||
|
ASSERT_STATUS(TUSB_ERROR_NOT_SUPPORTED_YET);
|
||||||
|
return TUSB_ERROR_NOT_SUPPORTED_YET;
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
ASSERT_STATUS(TUSB_ERROR_FAILED);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return TUSB_ERROR_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
tusb_error_t hidd_init(uint8_t coreid, tusb_descriptor_interface_t const * p_interface_desc, uint16_t *p_length)
|
||||||
|
{
|
||||||
|
uint8_t const *p_desc = (uint8_t const *) p_interface_desc;
|
||||||
|
|
||||||
|
//------------- HID descriptor -------------//
|
||||||
|
p_desc += p_desc[DESCRIPTOR_OFFSET_LENGTH];
|
||||||
|
tusb_hid_descriptor_hid_t const *p_desc_hid = (tusb_hid_descriptor_hid_t const *) p_desc;
|
||||||
|
ASSERT_INT(HID_DESC_TYPE_HID, p_desc_hid->bDescriptorType, TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE);
|
||||||
|
|
||||||
|
//------------- Endpoint Descriptor -------------//
|
||||||
|
p_desc += p_desc[DESCRIPTOR_OFFSET_LENGTH];
|
||||||
|
tusb_descriptor_endpoint_t const *p_desc_endpoint = (tusb_descriptor_endpoint_t const *) p_desc;
|
||||||
|
ASSERT_INT(TUSB_DESC_TYPE_ENDPOINT, p_desc_endpoint->bDescriptorType, TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE);
|
||||||
|
|
||||||
|
if (p_interface_desc->bInterfaceSubClass == HID_SUBCLASS_BOOT)
|
||||||
|
{
|
||||||
|
switch(p_interface_desc->bInterfaceProtocol)
|
||||||
|
{
|
||||||
|
#if TUSB_CFG_DEVICE_HID_KEYBOARD
|
||||||
|
case HID_PROTOCOL_KEYBOARD:
|
||||||
|
ASSERT_STATUS( dcd_pipe_open(coreid, p_desc_endpoint) );
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if TUSB_CFG_DEVICE_HID_MOUSE
|
||||||
|
case HID_PROTOCOL_MOUSE:
|
||||||
|
ASSERT_STATUS( hidd_interface_init(p_interface_desc,
|
||||||
|
app_tusb_mouse_desc_report, p_desc_hid->wReportLength,
|
||||||
|
hidd_mouse_buffer , sizeof(hidd_mouse_buffer)) );
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
default: // TODO unknown, unsupported protocol --> skip this interface
|
||||||
|
return TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE;
|
||||||
|
}
|
||||||
|
*p_length = sizeof(tusb_descriptor_interface_t) + sizeof(tusb_hid_descriptor_hid_t) + sizeof(tusb_descriptor_endpoint_t);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
// open generic
|
||||||
|
*p_length = 0;
|
||||||
|
return TUSB_ERROR_HIDD_DESCRIPTOR_INTERFACE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return TUSB_ERROR_NONE;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -78,7 +78,7 @@
|
|||||||
#define CAP_MODE_HOST
|
#define CAP_MODE_HOST
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MCU == MCU_LPC43XX || MCU == MCU_LPC18XX || MCU == MCU_LPC11UXX || MCU == MCU_LPC13UXX
|
#if MCU == MCU_LPC43XX || MCU == MCU_LPC18XX || MCU == MCU_LPC11UXX || MCU == MCU_LPC13XX_12ADC
|
||||||
#define CAP_DEVICE_ROMDRIVER
|
#define CAP_DEVICE_ROMDRIVER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user