Compare commits

..
5 Commits
Author SHA1 Message Date
Joel Challis 5b91c3e0a0 Fix cformat processing files within ignore folders (#8063) 2020-02-02 16:33:17 +00:00
fauxpark 1877736fa4 Update dirty submodule make message (#8065) 2020-02-02 13:24:29 +00:00
James Young c096be3831 [Docs] future branch housekeeping 2020-02-01 21:36:59 -08:00
QMK Bot 4888a118c3 format code according to conventions [skip ci] 2020-02-02 02:40:30 +00:00
fauxpark e036b94a21 Align ATSAM HID descriptors with LUFA/ChibiOS (#7651)
* Align ATSAM HID descriptors with LUFA/ChibiOS

* Don't hardcode raw endpoint size
2020-02-02 13:10:57 +11:00
4 changed files with 161 additions and 148 deletions

No files matched your search

+2 -2
View File
@@ -15,8 +15,8 @@ The next Breaking Change is scheduled for February 29, 2020.
### Important Dates ### Important Dates
* [x] 2019 Sep 21 - `future` is created. It will be rebased weekly. * [x] 2019 Sep 21 - `future` is created. It will be rebased weekly.
* [ ] 2020 Feb 1 - `future` closed to new PR's. * [x] 2020 Feb 1 - `future` closed to new PR's.
* [ ] 2020 Feb 1 - Call for testers. * [x] 2020 Feb 1 - Call for testers.
* [ ] 2020 Feb 26 - `master` is locked, no PR's merged. * [ ] 2020 Feb 26 - `master` is locked, no PR's merged.
* [ ] 2020 Feb 28 - Merge `future` to `master`. * [ ] 2020 Feb 28 - Merge `future` to `master`.
* [ ] 2020 Feb 29 - `master` is unlocked. PR's can be merged again. * [ ] 2020 Feb 29 - `master` is unlocked. PR's can be merged again.
+1
View File
@@ -29,6 +29,7 @@ def cformat(cli):
for dirpath, dirnames, filenames in os.walk(dir): for dirpath, dirnames, filenames in os.walk(dir):
if any(i in dirpath for i in ignores): if any(i in dirpath for i in ignores):
dirnames.clear() dirnames.clear()
continue
for name in filenames: for name in filenames:
if name.endswith(('.c', '.h', '.cpp')): if name.endswith(('.c', '.h', '.cpp')):
+2 -5
View File
@@ -54,11 +54,8 @@ MSG_COMPILING_CXX = Compiling:
MSG_ASSEMBLING = Assembling: MSG_ASSEMBLING = Assembling:
MSG_CLEANING = Cleaning project: MSG_CLEANING = Cleaning project:
MSG_CREATING_LIBRARY = Creating library: MSG_CREATING_LIBRARY = Creating library:
MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \ MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR) Some git submodules are out of date or modified.\n\
Some git sub-modules are out of date or modified, please consider running:$(BOLD)\n\ Please consider running $(BOLD)make git-submodule$(NO_COLOR).\n\n
make git-submodule\n\
You can ignore this warning if you are not compiling any ChibiOS keyboards,\n\
or if you have modified the ChibiOS libraries yourself. \n\n$(NO_COLOR)
MSG_NO_CMP = $(ERROR_COLOR)Error:$(NO_COLOR)$(BOLD) cmp command not found, please install diffutils\n$(NO_COLOR) MSG_NO_CMP = $(ERROR_COLOR)Error:$(NO_COLOR)$(BOLD) cmp command not found, please install diffutils\n$(NO_COLOR)
define GENERATE_MSG_MAKE_KB define GENERATE_MSG_MAKE_KB
+156 -141
View File
@@ -98,30 +98,36 @@ UDC_DESC_STORAGE udi_hid_kbd_report_desc_t udi_hid_kbd_report_desc = {{
0x05, 0x01, // Usage Page (Generic Desktop) 0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x06, // Usage (Keyboard) 0x09, 0x06, // Usage (Keyboard)
0xA1, 0x01, // Collection (Application) 0xA1, 0x01, // Collection (Application)
// Modifiers (8 bits)
0x05, 0x07, // Usage Page (Keyboard) 0x05, 0x07, // Usage Page (Keyboard)
0x19, 0xE0, // Usage Minimum (224) 0x19, 0xE0, // Usage Minimum (Keyboard Left Control)
0x29, 0xE7, // Usage Maximum (231) 0x29, 0xE7, // Usage Maximum (Keyboard Right GUI)
0x15, 0x00, // Logical Minimum (0) 0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1) 0x25, 0x01, // Logical Maximum (1)
0x75, 0x01, // Report Size (1)
0x95, 0x08, // Report Count (8) 0x95, 0x08, // Report Count (8)
0x75, 0x01, // Report Size (1)
0x81, 0x02, // Input (Data, Variable, Absolute) 0x81, 0x02, // Input (Data, Variable, Absolute)
// Reserved (1 byte)
0x81, 0x01, // Input (Constant) 0x81, 0x01, // Input (Constant)
// Keycodes (6 bytes)
0x19, 0x00, // Usage Minimum (0) 0x19, 0x00, // Usage Minimum (0)
0x29, 0xFF, // Usage Maximum (255) 0x29, 0xFF, // Usage Maximum (255)
0x15, 0x00, // Logical Minimum (0) 0x15, 0x00, // Logical Minimum (0)
0x25, 0xFF, // Logical Maximum (255) 0x25, 0xFF, // Logical Maximum (255)
0x75, 0x08, // Report Size (8)
0x95, 0x06, // Report Count (6) 0x95, 0x06, // Report Count (6)
0x81, 0x00, // Input (Data, Array) 0x75, 0x08, // Report Size (8)
0x81, 0x00, // Input (Data, Array, Absolute)
// Status LEDs (5 bits)
0x05, 0x08, // Usage Page (LED) 0x05, 0x08, // Usage Page (LED)
0x19, 0x01, // Usage Minimum (1) 0x19, 0x01, // Usage Minimum (Num Lock)
0x29, 0x05, // Usage Maximum (5) 0x29, 0x05, // Usage Maximum (Kana)
0x15, 0x00, // Logical Minimum (0) 0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1) 0x25, 0x01, // Logical Maximum (1)
0x75, 0x01, // Report Size (1)
0x95, 0x05, // Report Count (5) 0x95, 0x05, // Report Count (5)
0x75, 0x01, // Report Size (1)
0x91, 0x02, // Output (Data, Variable, Absolute) 0x91, 0x02, // Output (Data, Variable, Absolute)
// LED padding (3 bits)
0x95, 0x03, // Report Count (3) 0x95, 0x03, // Report Count (3)
0x91, 0x01, // Output (Constant) 0x91, 0x01, // Output (Constant)
0xC0 // End Collection 0xC0 // End Collection
@@ -231,43 +237,41 @@ static uint8_t udi_hid_nkro_report_trans[UDI_HID_NKRO_REPORT_SIZE];
COMPILER_WORD_ALIGNED COMPILER_WORD_ALIGNED
UDC_DESC_STORAGE udi_hid_nkro_report_desc_t udi_hid_nkro_report_desc = {{ UDC_DESC_STORAGE udi_hid_nkro_report_desc_t udi_hid_nkro_report_desc = {{
0x05, 0x01, // Usage Page (Generic Desktop), 0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x06, // Usage (Keyboard), 0x09, 0x06, // Usage (Keyboard)
0xA1, 0x01, // Collection (Application) - Keyboard, 0xA1, 0x01, // Collection (Application)
// Mods // Modifiers (8 bits)
0x75, 0x01, // Report Size (1), 0x05, 0x07, // Usage Page (Keyboard/Keypad)
0x95, 0x08, // Report Count (8), 0x19, 0xE0, // Usage Minimum (Keyboard Left Control)
0x15, 0x00, // Logical Minimum (0), 0x29, 0xE7, // Usage Maximum (Keyboard Right GUI)
0x25, 0x01, // Logical Maximum (1), 0x15, 0x00, // Logical Minimum (0)
0x05, 0x07, // Usage Page (Key Codes), 0x25, 0x01, // Logical Maximum (1)
0x19, 0xE0, // Usage Minimum (224), 0x95, 0x08, // Report Count (8)
0x29, 0xE7, // Usage Maximum (231), 0x75, 0x01, // Report Size (1)
0x81, 0x02, // Input (Data, Variable, Absolute), 0x81, 0x02, // Input (Data, Variable, Absolute)
// Keycodes
0x05, 0x07, // Usage Page (Keyboard/Keypad)
0x19, 0x00, // Usage Minimum (0)
0x29, 0xF7, // Usage Maximum (247)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x95, 0xF8, // Report Count (248)
0x75, 0x01, // Report Size (1)
0x81, 0x02, // Input (Data, Variable, Absolute, Bitfield)
// LED Report // Status LEDs (5 bits)
0x75, 0x01, // Report Size (1), 0x05, 0x08, // Usage Page (LED)
0x95, 0x05, // Report Count (5), 0x19, 0x01, // Usage Minimum (Num Lock)
0x05, 0x08, // Usage Page (LEDs), 0x29, 0x05, // Usage Maximum (Kana)
0x19, 0x01, // Usage Minimum (1), 0x95, 0x05, // Report Count (5)
0x29, 0x05, // Usage Maximum (5), 0x75, 0x01, // Report Size (1)
0x91, 0x02, // Output (Data, Variable, Absolute), 0x91, 0x02, // Output (Data, Variable, Absolute)
// LED padding (3 bits)
// LED Report Padding 0x95, 0x01, // Report Count (1)
0x75, 0x03, // Report Size (3), 0x75, 0x03, // Report Size (3)
0x95, 0x01, // Report Count (1), 0x91, 0x03, // Output (Constant)
0x91, 0x03, // Output (Constant), 0xC0 // End Collection
// Main keys
0x75, 0x01, // Report Size (1),
0x95, 0xF8, // Report Count (248),
0x15, 0x00, // Logical Minimum (0),
0x25, 0x01, // Logical Maximum (1),
0x05, 0x07, // Usage Page (Key Codes),
0x19, 0x00, // Usage Minimum (0),
0x29, 0xF7, // Usage Maximum (247),
0x81, 0x02, // Input (Data, Variable, Absolute, Bitfield),
0xc0, // End Collection - Keyboard
}}; }};
static bool udi_hid_nkro_setreport(void); static bool udi_hid_nkro_setreport(void);
@@ -373,35 +377,39 @@ static uint8_t udi_hid_exk_report_trans[UDI_HID_EXK_REPORT_SIZE];
COMPILER_WORD_ALIGNED COMPILER_WORD_ALIGNED
UDC_DESC_STORAGE udi_hid_exk_report_desc_t udi_hid_exk_report_desc = {{ UDC_DESC_STORAGE udi_hid_exk_report_desc_t udi_hid_exk_report_desc = {{
// System Control Collection (8 bits) 0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x80, // Usage (System Control)
0xA1, 0x01, // Collection (Application)
0x85, REPORT_ID_SYSTEM, // Report ID
0x1A, 0x81,
0x00, // Usage Minimum (81) (System Power Down)
0x2A, 0x83,
0x00, // Usage Maximum (83) (System Wake Up)
0x16, 0x01,
0x00, // Logical Minimum (1)
0x26, 0x03,
0x00, // Logical Maximum (3)
0x95, 0x01, // Report Count (1)
0x75, 0x10, // Report Size (16)
0x81, 0x00, // Input (Data, Array, Absolute)
0xC0, // End Collection
0x05, 0x01, // Usage Page (Generic Desktop), 0x05, 0x0C, // Usage Page (Consumer)
0x09, 0x80, // Usage (System Control), 0x09, 0x01, // Usage (Consumer Control)
0xA1, 0x01, // Collection (Application), 0xA1, 0x01, // Collection (Application)
0x85, REPORT_ID_SYSTEM, // Report ID (2) (System), 0x85, REPORT_ID_CONSUMER, // Report ID
0x16, 0x01, 0x00, // Logical Minimum (1), 0x1A, 0x01,
0x26, 0x03, 0x00, // Logical Maximum (3), 0x00, // Usage Minimum (Consumer Control)
0x1A, 0x81, 0x00, // Usage Minimum (81) (System Power Down), 0x2A, 0x9C,
0x2A, 0x83, 0x00, // Usage Maximum (83) (System Wake Up), 0x02, // Usage Maximum (AC Distribute Vertically)
0x75, 0x10, // Report Size (16), 0x16, 0x01,
0x95, 0x01, // Report Count (1), 0x00, // Logical Minimum
0x81, 0x00, // Input (Data, Array), 0x26, 0x9C,
0xC0, // End Collection - System Control 0x02, // Logical Maximum
0x95, 0x01, // Report Count (1)
// Consumer Control Collection - Media Keys (16 bits) 0x75, 0x10, // Report Size (16)
0x81, 0x00, // Input (Data, Array, Absolute)
0x05, 0x0C, // Usage Page (Consumer), 0xC0 // End Collection
0x09, 0x01, // Usage (Consumer Control),
0xA1, 0x01, // Collection (Application),
0x85, REPORT_ID_CONSUMER, // Report ID (3) (Consumer),
0x16, 0x01, 0x00, // Logical Minimum (1),
0x26, 0x9C, 0x02, // Logical Maximum (668),
0x1A, 0x01, 0x00, // Usage Minimum (1),
0x2A, 0x9C, 0x02, // Usage Maximum (668),
0x75, 0x10, // Report Size (16),
0x95, 0x01, // Report Count (1),
0x81, 0x00, // Input (Data, Array),
0xC0, // End Collection - Consumer Control
}}; }};
static bool udi_hid_exk_setreport(void); static bool udi_hid_exk_setreport(void);
@@ -506,49 +514,53 @@ static uint8_t udi_hid_mou_report_trans[UDI_HID_MOU_REPORT_SIZE];
COMPILER_WORD_ALIGNED COMPILER_WORD_ALIGNED
UDC_DESC_STORAGE udi_hid_mou_report_desc_t udi_hid_mou_report_desc = {{ UDC_DESC_STORAGE udi_hid_mou_report_desc_t udi_hid_mou_report_desc = {{
0x05, 0x01, // Usage Page (Generic Desktop), 0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x02, // Usage (Mouse), 0x09, 0x02, // Usage (Mouse)
0xA1, 0x01, // Collection (Application), 0xA1, 0x01, // Collection (Application)
0x09, 0x01, // Usage (Pointer), 0x09, 0x01, // Usage (Pointer)
0xA1, 0x00, // Collection (Physical), 0xA1, 0x00, // Collection (Physical)
0x05, 0x09, // Usage Page (Buttons), // Buttons (5 bits)
0x19, 0x01, // Usage Minimum (01), 0x05, 0x09, // Usage Page (Button)
0x29, 0x05, // Usage Maximun (05), 0x19, 0x01, // Usage Minimum (Button 1)
0x15, 0x00, // Logical Minimum (0), 0x29, 0x05, // Usage Maximun (Button 5)
0x25, 0x01, // Logical Maximum (1), 0x15, 0x00, // Logical Minimum (0)
0x95, 0x05, // Report Count (5), 0x25, 0x01, // Logical Maximum (1)
0x75, 0x01, // Report Size (1), 0x95, 0x05, // Report Count (5)
0x81, 0x02, // Input (Data, Variable, Absolute), ;5 button bits 0x75, 0x01, // Report Size (1)
0x95, 0x01, // Report Count (1), 0x81, 0x02, // Input (Data, Variable, Absolute)
0x75, 0x03, // Report Size (3), // Button padding (3 bits)
0x81, 0x01, // Input (Constant), ;3 bit padding, 0x95, 0x01, // Report Count (1)
0x75, 0x03, // Report Size (3)
0x81, 0x01, // Input (Constant)
0x05, 0x01, // Usage Page (Generic Desktop), // X/Y position (2 bytes)
0x09, 0x30, // Usage (X), 0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x31, // Usage (Y), 0x09, 0x30, // Usage (X)
0x15, 0x81, // Logical Minimum (-127), 0x09, 0x31, // Usage (Y)
0x25, 0x7F, // Logical Maximum (127), 0x15, 0x81, // Logical Minimum (-127)
0x95, 0x02, // Report Count (2), 0x25, 0x7F, // Logical Maximum (127)
0x75, 0x08, // Report Size (8), 0x95, 0x02, // Report Count (2)
0x81, 0x06, // Input (Data, Variable, Relative), ;2 position bytes (X & Y), 0x75, 0x08, // Report Size (8)
0x81, 0x06, // Input (Data, Variable, Relative)
0x09, 0x38, // Usage (Wheel), // Vertical wheel (1 byte)
0x15, 0x81, // Logical Minimum (-127), 0x09, 0x38, // Usage (Wheel)
0x25, 0x7F, // Logical Maximum (127), 0x15, 0x81, // Logical Minimum (-127)
0x95, 0x01, // Report Count (1), 0x25, 0x7F, // Logical Maximum (127)
0x75, 0x08, // Report Size (8), 0x95, 0x01, // Report Count (1)
0x81, 0x06, // Input (Data, Variable, Relative), 0x75, 0x08, // Report Size (8)
0x81, 0x06, // Input (Data, Variable, Relative)
0x05, 0x0C, // Usage Page (Consumer), // Horizontal wheel (1 byte)
0x0A, 0x38, 0x02, // Usage (AC Pan (Horizontal wheel)), 0x05, 0x0C, // Usage Page (Consumer)
0x15, 0x81, // Logical Minimum (-127), 0x0A, 0x38, 0x02, // Usage (AC Pan)
0x25, 0x7F, // Logical Maximum (127), 0x15, 0x81, // Logical Minimum (-127)
0x95, 0x01, // Report Count (1), 0x25, 0x7F, // Logical Maximum (127)
0x75, 0x08, // Report Size (8), 0x95, 0x01, // Report Count (1)
0x81, 0x06, // Input (Data, Variable, Relative), 0x75, 0x08, // Report Size (8)
0x81, 0x06, // Input (Data, Variable, Relative)
0xC0, // End Collection, 0xC0, // End Collection
0xC0, // End Collection 0xC0 // End Collection
}}; }};
static void udi_hid_mou_report_sent(udd_ep_status_t status, iram_size_t nb_sent, udd_ep_id_t ep); static void udi_hid_mou_report_sent(udd_ep_status_t status, iram_size_t nb_sent, udd_ep_id_t ep);
@@ -636,20 +648,21 @@ static uint8_t udi_hid_raw_report_trans[UDI_HID_RAW_REPORT_SIZE];
COMPILER_WORD_ALIGNED COMPILER_WORD_ALIGNED
UDC_DESC_STORAGE udi_hid_raw_report_desc_t udi_hid_raw_report_desc = {{ UDC_DESC_STORAGE udi_hid_raw_report_desc_t udi_hid_raw_report_desc = {{
0x06, // Usage Page (Vendor Defined) 0x06, 0x60, 0xFF, // Usage Page (Vendor Defined)
0xFF, 0xFF, 0x09, 0x61, // Usage (Vendor Defined)
0x0A, // Usage (Mouse) 0xA1, 0x01, // Collection (Application)
0xFF, 0xFF, 0xA1, 0x01, // Collection (Application) 0x75, 0x08, // Report Size (8)
0x75, 0x08, // Report Size (8) 0x15, 0x00, // Logical Minimum (0)
0x15, 0x00, // Logical Minimum (0) 0x25, 0xFF, // Logical Maximum (255)
0x25, 0xFF, // Logical Maximum (255) // Data to host
0x95, 0x40, // Report Count 0x09, 0x62, // Usage (Vendor Defined)
0x09, 0x01, // Usage (Input) 0x95, RAW_EPSIZE, // Report Count
0x81, 0x02, // Input (Data 0x81, 0x02, // Input (Data, Variable, Absolute)
0x95, 0x40, // Report Count // Data from host
0x09, 0x02, // Usage (Output) 0x09, 0x63, // Usage (Vendor Defined)
0x91, 0x02, // Output (Data 0x95, RAW_EPSIZE, // Report Count
0xC0, // End Collection - Consumer Control 0x91, 0x02, // Output (Data, Variable, Absolute)
0xC0 // End Collection
}}; }};
static bool udi_hid_raw_setreport(void); static bool udi_hid_raw_setreport(void);
@@ -753,22 +766,24 @@ static uint8_t udi_hid_con_report_trans[UDI_HID_CON_REPORT_SIZE];
COMPILER_WORD_ALIGNED COMPILER_WORD_ALIGNED
UDC_DESC_STORAGE udi_hid_con_report_desc_t udi_hid_con_report_desc = {{ UDC_DESC_STORAGE udi_hid_con_report_desc_t udi_hid_con_report_desc = {{
0x06, 0x31, 0xFF, // Vendor Page (PJRC Teensy compatible) 0x06, 0x31, 0xFF, // Usage Page (Vendor Defined - PJRC Teensy compatible)
0x09, 0x74, // Vendor Usage (PJRC Teensy compatible) 0x09, 0x74, // Usage (Vendor Defined - PJRC Teensy compatible)
0xA1, 0x01, // Collection (Application) 0xA1, 0x01, // Collection (Application)
0x09, 0x75, // Usage (Vendor) // Data to host
0x15, 0x00, // Logical Minimum (0x00) 0x09, 0x75, // Usage (Vendor Defined)
0x26, 0xFF, 0x00, // Logical Maximum (0x00FF) 0x15, 0x00, // Logical Minimum (0x00)
0x95, CONSOLE_EPSIZE, // Report Count 0x26, 0xFF, 0x00, // Logical Maximum (0x00FF)
0x75, 0x08, // Report Size (8) 0x95, CONSOLE_EPSIZE, // Report Count
0x81, 0x02, // Input (Data) 0x75, 0x08, // Report Size (8)
0x09, 0x76, // Usage (Vendor) 0x81, 0x02, // Input (Data, Variable, Absolute)
0x15, 0x00, // Logical Minimum (0x00) // Data from host
0x26, 0xFF, 0x00, // Logical Maximum (0x00FF) 0x09, 0x76, // Usage (Vendor Defined)
0x95, CONSOLE_EPSIZE, // Report Count 0x15, 0x00, // Logical Minimum (0x00)
0x75, 0x08, // Report Size (8) 0x26, 0xFF, 0x00, // Logical Maximum (0x00FF)
0x91, 0x02, // Output (Data) 0x95, CONSOLE_EPSIZE, // Report Count
0xC0, // End Collection 0x75, 0x08, // Report Size (8)
0x91, 0x02, // Output (Data)
0xC0 // End Collection
}}; }};
static bool udi_hid_con_setreport(void); static bool udi_hid_con_setreport(void);