Move USB_{KEYBOARD,MOUSE}_REPORT_LENGTH to hid_{keyboard,mouse}.h
This commit is contained in:
@@ -71,9 +71,9 @@ usb_status_t UsbKeyboardCallback(class_handle_t handle, uint32_t event, void *pa
|
||||
return error;
|
||||
}
|
||||
|
||||
usb_status_t UsbKeyboardSetConfigure(class_handle_t handle, uint8_t configure)
|
||||
usb_status_t UsbKeyboardSetConfigure(class_handle_t handle, uint8_t configuration)
|
||||
{
|
||||
if (USB_COMPOSITE_CONFIGURATION_INDEX == configure) {
|
||||
if (USB_COMPOSITE_CONFIGURATION_INDEX == configuration) {
|
||||
return UsbKeyboardAction();
|
||||
}
|
||||
return kStatus_USB_Error;
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __USB_DEVICE_HID_KEYBOARD_H__
|
||||
#define __USB_DEVICE_HID_KEYBOARD_H__
|
||||
|
||||
// Macros:
|
||||
|
||||
#define USB_KEYBOARD_REPORT_LENGTH (0x08U)
|
||||
|
||||
// Typedefs:
|
||||
|
||||
typedef struct _usb_device_hid_keyboard_struct {
|
||||
@@ -10,9 +14,9 @@
|
||||
|
||||
// Functions:
|
||||
|
||||
extern usb_status_t UsbKeyboardInit(usb_device_composite_struct_t *deviceComposite);
|
||||
extern usb_status_t UsbKeyboardInit(usb_device_composite_struct_t *compositeDevice);
|
||||
extern usb_status_t UsbKeyboardCallback(class_handle_t handle, uint32_t event, void *param);
|
||||
extern usb_status_t UsbKeyboardSetConfigure(class_handle_t handle, uint8_t configure);
|
||||
extern usb_status_t UsbKeyboardSetConfigure(class_handle_t handle, uint8_t configuration);
|
||||
extern usb_status_t UsbKeyboardSetInterface(class_handle_t handle, uint8_t interface, uint8_t alternateSetting);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef __USB_DEVICE_HID_MOUSE_H__
|
||||
#define __USB_DEVICE_HID_MOUSE_H__
|
||||
|
||||
// Macros:
|
||||
|
||||
#define USB_MOUSE_REPORT_LENGTH (0x04U)
|
||||
|
||||
// Typedefs:
|
||||
|
||||
typedef struct usb_device_hid_mouse_struct {
|
||||
@@ -10,7 +14,7 @@
|
||||
|
||||
// Functions:
|
||||
|
||||
extern usb_status_t UsbMouseInit(usb_device_composite_struct_t *deviceComposite);
|
||||
extern usb_status_t UsbMouseInit(usb_device_composite_struct_t *compositeDevice);
|
||||
extern usb_status_t UsbMouseCallback(class_handle_t handle, uint32_t event, void *param);
|
||||
extern usb_status_t UsbMouseSetConfigure(class_handle_t handle, uint8_t configure);
|
||||
extern usb_status_t UsbMouseSetInterface(class_handle_t handle, uint8_t interface, uint8_t alternateSetting);
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#define USB_KEYBOARD_INTERRUPT_IN_PACKET_SIZE (8U)
|
||||
#define USB_KEYBOARD_INTERRUPT_IN_INTERVAL (0x04U)
|
||||
|
||||
#define USB_KEYBOARD_REPORT_LENGTH (0x08U)
|
||||
#define USB_KEYBOARD_REPORT_DESCRIPTOR_LENGTH (63U)
|
||||
#define USB_KEYBOARD_STRING_DESCRIPTOR_LENGTH (40U)
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#define USB_MOUSE_INTERRUPT_IN_PACKET_SIZE (8U)
|
||||
#define USB_MOUSE_INTERRUPT_IN_INTERVAL (0x04U)
|
||||
|
||||
#define USB_MOUSE_REPORT_LENGTH (0x04U)
|
||||
#define USB_MOUSE_REPORT_DESCRIPTOR_LENGTH (52U)
|
||||
#define USB_MOUSE_STRING_DESCRIPTOR_LENGTH (34U)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user