diff --git a/src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/DEVICE/usb_descriptors.c b/src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/DEVICE/usb_descriptors.c index 66818f10..98ef1a24 100644 --- a/src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/DEVICE/usb_descriptors.c +++ b/src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/DEVICE/usb_descriptors.c @@ -61,44 +61,26 @@ #define KEYBOARD_FEATURE_COUNT 64 const U8 usb_hid_report_descriptor_keyboard[USB_HID_REPORT_DESC_KEYBOARD] = { - 0x05, 0x01, // USAGE_PAGE (Generic Desktop) - 0x09, 0x06, // USAGE (Keyboard) - 0xa1, 0x01, // COLLECTION (Application) - // 0x85, 0x01, // REPORT_ID (1) - 0x05, 0x07, // USAGE_PAGE (Keyboard) - 0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl) - 0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI) - 0x15, 0x00, // LOGICAL_MINIMUM (0) - 0x25, 0x01, // LOGICAL_MAXIMUM (1) - 0x75, 0x01, // REPORT_SIZE (1) - 0x95, 0x08, // REPORT_COUNT (8) - 0x81, 0x02, // INPUT (Data,Var,Abs) - 0x95, 0x01, // REPORT_COUNT (1) - 0x75, 0x08, // REPORT_SIZE (8) - 0x81, 0x03, // INPUT (Cnst,Var,Abs) - 0x95, 0x05, // REPORT_COUNT (5) - 0x75, 0x01, // REPORT_SIZE (1) - 0x05, 0x08, // USAGE_PAGE (LEDs) - 0x19, 0x01, // USAGE_MINIMUM (Num Lock) - 0x29, 0x05, // USAGE_MAXIMUM (Kana) - 0x91, 0x02, // OUTPUT (Data,Var,Abs) - 0x95, 0x01, // REPORT_COUNT (1) - 0x75, 0x03, // REPORT_SIZE (3) - 0x91, 0x03, // OUTPUT (Cnst,Var,Abs) - 0x95, 0x06, // REPORT_COUNT (6) - 0x75, 0x08, // REPORT_SIZE (8) - 0x15, 0x00, // LOGICAL_MINIMUM (0) - 0x25, 0x65, // LOGICAL_MAXIMUM (101) - 0x05, 0x07, // USAGE_PAGE (Keyboard) - 0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated)) - 0x29, 0x65, // USAGE_MAXIMUM (Keyboard Application) - 0x81, 0x00, // INPUT (Data,Ary,Abs) - 0x09, 0x03, // USAGE (Keyboard ErrorUndefine) - 0x75, 0x08, // REPORT_SIZE (8) - 0x95, KEYBOARD_FEATURE_COUNT, // REPORT_COUNT (64) - 0xB1, 0x02, // FEATURE (Data,Var,Abs) - - 0xc0, // END_COLLECTION + 0x06, 0x00, 0xff, // USAGE_PAGE (Vendor-Defined) + 0x09, 0x01, // USAGE (Vendor) + 0xa1, 0x01, // COLLECTION (Application) + 0x09, 0x01, // USAGE (Input Report Data) + 0x15, 0x00, // LOGICAL_MINIMUM (0) + 0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255) + 0x75, 0x08, // REPORT_SIZE (8) + 0x95, 0x40, // REPORT_COUNT (64) + 0x81, 0x02, // INPUT (Data,Var,Abs) + 0x09, 0x02, // USAGE(Output Report Data) + 0x15, 0x00, // LOGICAL_MINIMUM (0) + 0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255) + 0x75, 0x08, // REPORT_SIZE (8) + 0x95, 0x40, // REPORT_COUNT (64) + 0x91, 0x02, // OUTPUT (Data,Var,Abs) + 0x09, 0x02, // USAGE (Keyboard ErrorUndefine) + 0x75, 0x08, // REPORT_SIZE (8) + 0x95, KEYBOARD_FEATURE_COUNT, // REPORT_COUNT (64) + 0xB1, 0x02, // FEATURE (Data,Var,Abs) */ + 0xc0, // END_COLLECTION }; // usb_user_device_descriptor diff --git a/src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/DEVICE/usb_descriptors.h b/src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/DEVICE/usb_descriptors.h index ab4fc99c..080b3f2c 100644 --- a/src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/DEVICE/usb_descriptors.h +++ b/src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/DEVICE/usb_descriptors.h @@ -130,7 +130,7 @@ -#define RELEASE_NUMBER 0x0100 +#define RELEASE_NUMBER 0x0101 #define MAN_INDEX 0x01 #define PROD_INDEX 0x02 #define SN_INDEX 0x03 @@ -262,7 +262,7 @@ #define KB_NB_ENDPOINT 1 // ! The number of endpoints this interface has #define KB_INTERFACE_CLASS HID_CLASS // ! HID Class #define KB_INTERFACE_SUB_CLASS NO_SUBCLASS // ! -#define KB_INTERFACE_PROTOCOL KEYBOARD_PROTOCOL // ! +#define KB_INTERFACE_PROTOCOL GENERIC_PROTOCOL // ! #define KB_INTERFACE_INDEX 0 // Keyboard HID descriptor diff --git a/src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/DEVICE/usb_specific_request.h b/src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/DEVICE/usb_specific_request.h index b2a22faa..4db4b533 100644 --- a/src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/DEVICE/usb_specific_request.h +++ b/src/SOFTWARE_FRAMEWORK/DRIVERS/USBB/ENUM/DEVICE/usb_specific_request.h @@ -49,7 +49,7 @@ extern const S_usb_product_string_descriptor usb_user_product_string_descriptor; extern const S_usb_serial_number usb_user_serial_number; extern const S_usb_language_id usb_user_language_id; -#define USB_HID_REPORT_DESC_KEYBOARD 71 +#define USB_HID_REPORT_DESC_KEYBOARD 42 extern const U8 usb_hid_report_descriptor_keyboard[USB_HID_REPORT_DESC_KEYBOARD]; // ! @defgroup specific_request USB device specific requests diff --git a/src/SOFTWARE_FRAMEWORK/SERVICES/USB/usb_ids.h b/src/SOFTWARE_FRAMEWORK/SERVICES/USB/usb_ids.h index 3141dd9c..16e8ac61 100644 --- a/src/SOFTWARE_FRAMEWORK/SERVICES/USB/usb_ids.h +++ b/src/SOFTWARE_FRAMEWORK/SERVICES/USB/usb_ids.h @@ -148,6 +148,7 @@ // ! @{ #define HID_CLASS 0x03 #define BOOT_SUBCLASS 0x01 +#define GENERIC_PROTOCOL 0x00 #define KEYBOARD_PROTOCOL 0x01 #define MOUSE_PROTOCOL 0x02 // ! @} diff --git a/src/global.h b/src/global.h index 4e55c593..57d9d780 100644 --- a/src/global.h +++ b/src/global.h @@ -24,7 +24,7 @@ // #include "portmacro.h" Don't use is here, system crashes #define VERSION_MAJOR 0 // 255 = debug version -#define VERSION_MINOR 52 // 0 = development +#define VERSION_MINOR 53 // 0 = development #define INTERNAL_VERSION_NR 0