This commit is contained in:
hathach
2013-06-12 14:06:41 +07:00
parent 17a27f7398
commit ee57a6f13f
8 changed files with 126 additions and 9 deletions

View File

@@ -50,7 +50,7 @@
#if defined(CAP_DEVICE_ROMDRIVER) && TUSB_CFG_DEVICE_USE_ROM_DRIVER
#include "device/dcd_nxp_romdriver.h" // TODO remove rom driver dependency
#endif
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF
@@ -325,5 +325,6 @@ ErrorCode_t HID_EpOut_Hdlr (USBD_HANDLE_T hUsb, void* data, uint32_t event)
}
return LPC_OK;
}
#endif
#endif

View File

@@ -95,10 +95,10 @@ void std_get_descriptor(uint8_t coreid)
case TUSB_DESC_TYPE_CONFIGURATION:
{
uint16_t const requested_length = min16_of(usbd_devices[coreid].setup_packet.wLength, sizeof(app_tusb_desc_configuration)-1);
for(uint16_t i=0; i<requested_length; i += 64)
{
dcd_pipe_control_write(coreid, ((uint8_t*)&app_tusb_desc_configuration) + i, min16_of(64, requested_length - i));
}
ASSERT(requested_length <= TUSB_CFG_DEVICE_CONTROL_PACKET_SIZE, (void)0 ); // multiple packets requires a task a-like
dcd_pipe_control_write(coreid, ((uint8_t*)&app_tusb_desc_configuration),
requested_length);
}
break;
@@ -157,7 +157,7 @@ tusb_error_t usbd_init (void)
ASSERT_STATUS ( dcd_init() );
uint16_t length = 0;
#if TUSB_CFG_DEVICE_HID_KEYBOARD && 0
#if TUSB_CFG_DEVICE_HID_KEYBOARD
ASSERT_STATUS( hidd_init(&app_tusb_desc_configuration.keyboard_interface, &length) );
#endif