Skip to content

Commit 53ff8a3

Browse files
fredizzimojackhumbert
authored andcommitted
Merge ChibiOS and LUFA descriptor support (qmk#2362)
* Move lufa descriptor to protocol/usb_descriptor * Try to compile usb_descriptor on ChibiOS * Add lufa_utils for ChibiOS Lufa USB descriptors for ChibiOS * More lufa_util compatibility fixes * First compiling version of shared USB descriptor * Send the usb descriptors * Fix the CONSOLE output on ChibiOS * Add errors for unsupported interfaces * Enable support for vitual serial port USB descriptors * Implement virtual serial port for ChibiOS * Cleanup the lufa_utils Use the default lufa header files * Add raw hid support for ChibiOS This is completely untested * Enable midi compilation on ChibiOS * Move midi functionality out of lufa.c * Don't register sysex callback when not needed * ChibiOS compilation fixes * Update ChibiOS submodule * Fix the Midi USB descriptor It didn't work properly when both Midi and Virtual serial port was enabled. * Add MIDI support for ChibiOS * Fix USB descriptor strings on ChibiOS * Use serial usb driver for raw hid * Generalize the ChibiOS stream like drivers This makes the initialization much more simple and eliminates a lot of the code duplication. * Convert console output to chibios stream driver * Fixes for ChibiOS update * Update the ChibiOS contrib submodule To include the usb data toggle synchronization fixes * Fix duplicate reset enumeration on ChibiOS * Add missing include * Add number of endpoints check for ChibiOS * Enable serial USB driver on all keyboards * Add missing includes when API is enabled withot midi * Add another missing inlcude
1 parent 63c16f4 commit 53ff8a3

File tree

38 files changed

+752
-1228
lines changed

38 files changed

+752
-1228
lines changed

build_keyboard.mk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ else
121121
endif
122122

123123
ifeq ($(PLATFORM),CHIBIOS)
124-
include $(TMK_PATH)/protocol/chibios.mk
125124
include $(TMK_PATH)/chibios.mk
126125
OPT_OS = chibios
127126
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/bootloader_defs.h)","")
@@ -197,7 +196,7 @@ else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","")
197196
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
198197
else ifneq ($(LAYOUTS),)
199198
include build_layout.mk
200-
else
199+
else
201200
$(error Could not find keymap)
202201
# this state should never be reached
203202
endif
@@ -247,6 +246,10 @@ endif
247246
include $(TMK_PATH)/avr.mk
248247
endif
249248

249+
ifeq ($(PLATFORM),CHIBIOS)
250+
include $(TMK_PATH)/protocol/chibios.mk
251+
endif
252+
250253
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
251254
VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer
252255
VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer

keyboards/chibios_test/config.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2424
#define DEVICE_VER 0x0001
2525
/* in python2: list(u"whatever".encode('utf-16-le')) */
2626
/* at most 32 characters or the ugly hack in usb_main.c borks */
27-
#define MANUFACTURER "QMK"
28-
#define USBSTR_MANUFACTURER 'T', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', '\xc6', '\x00'
29-
#define PRODUCT "ChibiOS QMK test"
30-
#define USBSTR_PRODUCT 'C', '\x00', 'h', '\x00', 'i', '\x00', 'b', '\x00', 'i', '\x00', 'O', '\x00', 'S', '\x00', ' ', '\x00', 'Q', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', 't', '\x00', 'e', '\x00', 's', '\x00', 't', '\x00'
31-
#define DESCRIPTION "QMK keyboard firmware test for ChibiOS"
27+
#define MANUFACTURER QMK
28+
#define PRODUCT ChibiOS QMK test
29+
#define DESCRIPTION QMK keyboard firmware test for ChibiOS
3230

3331
/* key matrix size */
3432
#define MATRIX_ROWS 1

keyboards/chibios_test/stm32_f072_onekey/halconf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
* @brief Enables the SERIAL over USB subsystem.
140140
*/
141141
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
142-
#define HAL_USE_SERIAL_USB FALSE
142+
#define HAL_USE_SERIAL_USB TRUE
143143
#endif
144144

145145
/**

keyboards/chibios_test/stm32_f103_onekey/halconf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
* @brief Enables the SERIAL over USB subsystem.
140140
*/
141141
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
142-
#define HAL_USE_SERIAL_USB FALSE
142+
#define HAL_USE_SERIAL_USB TRUE
143143
#endif
144144

145145
/**

keyboards/chibios_test/teensy_lc_onekey/halconf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
* @brief Enables the SERIAL over USB subsystem.
140140
*/
141141
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
142-
#define HAL_USE_SERIAL_USB FALSE
142+
#define HAL_USE_SERIAL_USB TRUE
143143
#endif
144144

145145
/**

keyboards/clueboard/60/config.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@
2222
#define VENDOR_ID 0xC1ED
2323
#define PRODUCT_ID 0x2350
2424
#define DEVICE_VER 0x0001
25-
#define MANUFACTURER "Clueboard"
26-
#define USBSTR_MANUFACTURER 'C', '\x00', 'l', '\x00', 'u', '\x00', 'e', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00'
27-
#define PRODUCT "Clueboard60"
28-
#define USBSTR_PRODUCT 'C', '\x00', 'l', '\x00', 'u', '\x00', 'e', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', ' ', '\x00', '6', '\x00', '0', '\x00', '%', '\x00'
29-
#define DESCRIPTION "Clueboard 60%"
25+
#define MANUFACTURER Clueboard
26+
#define PRODUCT Clueboard 60%
27+
#define DESCRIPTION Clueboard 60%
3028

3129
/* key matrix size */
3230
#define MATRIX_ROWS 5

keyboards/ergodox_infinity/config.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
#define VENDOR_ID 0xFEED
2424
#define PRODUCT_ID 0x6464
2525
#define DEVICE_VER 0x0001
26-
/* in python2: list(u"whatever".encode('utf-16-le')) */
27-
/* at most 32 characters or the ugly hack in usb_main.c borks */
28-
#define MANUFACTURER "TMK"
29-
#define USBSTR_MANUFACTURER 'T', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00'
30-
#define PRODUCT "Infinity keyboard/TMK"
31-
#define USBSTR_PRODUCT 'I', '\x00', 'n', '\x00', 'f', '\x00', 'i', '\x00', 'n', '\x00', 'i', '\x00', 't', '\x00', 'y', '\x00', ' ', '\x00', 'k', '\x00', 'e', '\x00', 'y', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', '/', '\x00', 'T', '\x00', 'M', '\x00', 'K', '\x00'
26+
#define MANUFACTURER Input Club
27+
#define PRODUCT Ergodox Infinity (QMK)
3228

3329
#define MOUSEKEY_INTERVAL 20
3430
#define MOUSEKEY_DELAY 0

keyboards/infinity60/config.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2626
#define DEVICE_VER 0x0001
2727
/* in python2: list(u"whatever".encode('utf-16-le')) */
2828
/* at most 32 characters or the ugly hack in usb_main.c borks */
29-
#define MANUFACTURER "Input Club"
30-
#define USBSTR_MANUFACTURER 'I', '\x00', 'n', '\x00', 'p', '\x00', 'u', '\x00', 't', '\x00', ' ', '\x00', 'C', '\x00', 'l', '\x00', 'u', '\x00', 'b', '\x00'
31-
#define PRODUCT "Infinity keyboard/QMK"
32-
#define USBSTR_PRODUCT 'I', '\x00', 'n', '\x00', 'f', '\x00', 'i', '\x00', 'n', '\x00', 'i', '\x00', 't', '\x00', 'y', '\x00', ' ', '\x00', 'k', '\x00', 'e', '\x00', 'y', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', '/', '\x00', 'Q', '\x00', 'M', '\x00', 'K', '\x00'
29+
#define MANUFACTURER Input Club
30+
#define PRODUCT Infinity 60% keyboard (QMK)
3331
/* key matrix size */
3432
#define MATRIX_ROWS 9
3533
#define MATRIX_COLS 7

keyboards/infinity60/halconf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
* @brief Enables the SERIAL over USB subsystem.
140140
*/
141141
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
142-
#define HAL_USE_SERIAL_USB FALSE
142+
#define HAL_USE_SERIAL_USB TRUE
143143
#endif
144144

145145
/**

keyboards/jm60/config.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2626
#define DEVICE_VER 0x0001
2727
/* in python2: list(u"whatever".encode('utf-16-le')) */
2828
/* at most 32 characters or the ugly hack in usb_main.c borks */
29-
#define MANUFACTURER "JMWS"
30-
#define USBSTR_MANUFACTURER 'J', '\x00', 'M', '\x00', 'W', '\x00', 'S', '\x00'
31-
#define PRODUCT "JM60 RGB Keyboard(QMK)"
32-
#define USBSTR_PRODUCT 'J', '\x00', 'M', '\x00', '6', '\x00', '0', '\x00', ' ', '\x00', 'R', '\x00', 'G', '\x00', 'B', '\x00', ' ', '\x00', 'K', '\x00', 'e', '\x00', 'y', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', '(', '\x00', 'Q', '\x00', 'M', '\x00', 'K', '\x00', ')', '\x00'
33-
#define DESCRIPTION "QMK keyboard firmware for JM60 RGB Keyboard"
29+
#define MANUFACTURER JMWS
30+
#define PRODUCT JM60 RGB Keyboard(QMK)
31+
#define DESCRIPTION QMK keyboard firmware for JM60 RGB Keyboard
3432

3533
/* key matrix size */
3634
#define MATRIX_ROWS 5

0 commit comments

Comments
 (0)