mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-30 04:20:26 +00:00
technically, mouse + keyboard device demo also work on lpc13uxx
This commit is contained in:
parent
9a81cbcd59
commit
d8f32a79fc
@ -46,7 +46,7 @@
|
||||
//--------------------------------------------------------------------+
|
||||
// MACRO CONSTANT TYPEDEF
|
||||
//--------------------------------------------------------------------+
|
||||
hid_keyboard_report_t keyboard_report TUSB_CFG_ATTR_USBRAM;
|
||||
ATTR_USB_MIN_ALIGNMENT hid_keyboard_report_t keyboard_report TUSB_CFG_ATTR_USBRAM;
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// INTERNAL OBJECT & FUNCTION DECLARATION
|
||||
|
@ -50,7 +50,7 @@
|
||||
//--------------------------------------------------------------------+
|
||||
// INTERNAL OBJECT & FUNCTION DECLARATION
|
||||
//--------------------------------------------------------------------+
|
||||
hid_mouse_report_t mouse_report TUSB_CFG_ATTR_USBRAM;
|
||||
ATTR_USB_MIN_ALIGNMENT hid_mouse_report_t mouse_report TUSB_CFG_ATTR_USBRAM;
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// IMPLEMENTATION
|
||||
|
@ -89,11 +89,11 @@
|
||||
#define TUSB_CFG_DEVICE_CONTROL_ENDOINT_SIZE 64
|
||||
|
||||
//------------- CLASS -------------//
|
||||
#define TUSB_CFG_DEVICE_HID_KEYBOARD 0
|
||||
#define TUSB_CFG_DEVICE_HID_MOUSE 0
|
||||
#define TUSB_CFG_DEVICE_HID_KEYBOARD 1
|
||||
#define TUSB_CFG_DEVICE_HID_MOUSE 1
|
||||
#define TUSB_CFG_DEVICE_HID_GENERIC 0
|
||||
#define TUSB_CFG_DEVICE_MSC 0
|
||||
#define TUSB_CFG_DEVICE_CDC 1
|
||||
#define TUSB_CFG_DEVICE_CDC 0
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// COMMON CONFIGURATION
|
||||
|
@ -165,6 +165,8 @@ tusb_error_t hidd_control_request(uint8_t coreid, tusb_control_request_t const *
|
||||
|
||||
case HID_REQUEST_CONTROL_SET_REPORT:
|
||||
{
|
||||
return TUSB_ERROR_DCD_CONTROL_REQUEST_NOT_SUPPORT;
|
||||
// TODO HIDD set report support
|
||||
hid_request_report_type_t report_type = u16_high_u8(p_request->wValue);
|
||||
uint8_t report_id = u16_low_u8(p_request->wValue);
|
||||
|
||||
|
@ -182,7 +182,7 @@ static void bus_reset(void)
|
||||
{
|
||||
memclr_(&dcd_data, sizeof(dcd_lpc13xx_data_t));
|
||||
for(uint8_t ep_id = 2; ep_id < DCD_LPC13XX_QHD; ep_id++)
|
||||
{
|
||||
{ // disable all non-control endpoints on bus reset
|
||||
dcd_data.qhd[ep_id][0].disable = dcd_data.qhd[ep_id][1].disable = 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user