Make the keyboard + mouse composite USB device work based on the KSDK 2.0 usb_device_composite_hid_mouse_hid_keyboard demo.

This commit is contained in:
László Monda
2016-02-06 02:00:47 +01:00
parent 946de98ac5
commit 4beab991ed
37 changed files with 5510 additions and 1913 deletions

21
right/composite.h Normal file
View File

@@ -0,0 +1,21 @@
#ifndef __USB_DEVICE_COMPOSITE_H__
#define __USB_DEVICE_COMPOSITE_H__
/* Macros: */
#define CONTROLLER_ID kUSB_ControllerKhci0
#define USB_DEVICE_INTERRUPT_PRIORITY (3U)
/* Type defines: */
typedef struct _usb_device_composite_struct {
usb_device_handle deviceHandle;
class_handle_t hidMouseHandle;
class_handle_t hidKeyboardHandle;
uint8_t speed;
uint8_t attach;
uint8_t currentConfiguration;
uint8_t currentInterfaceAlternateSetting[USB_COMPOSITE_INTERFACE_COUNT];
} usb_device_composite_struct_t;
#endif