2015-04-09 16:32:04 +00:00
/*
Copyright 2011 Jun Wako < wakojun @ gmail . com >
This program is free software : you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 2 of the License , or
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
# include <stdint.h>
# include <stdbool.h>
Add ChibiOS support for QMK (#465)
* Modularity and gcc warnings fixes.
* Add ChibiOS support (USB stack + support files).
* Make usb_main more USB_DRIVER #define independent.
* Move chibios to tool.
* Implement jump-to-bootloader.
* Small updates.
* Fix bootloader-jump compiling.
* Move AVR specific sleep_led.c into avr.
* Add basic sleep_led for chibios.
* Update chibios README.
* NKRO fixes.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Add ARM Teensies bootloader code.
* Fix chibios/usb_main GET_REPORT handing.
* Add missing #include to keymap.c.
* Make bootmagic.c code portable (_delay_ms -> wait_ms).
* Move declaration of keymap_config.
Should really not declare variables in .h files - since it's included
in different .c files, a proper linker then complains that the same
variable is declared more than once (once for each .c file that the
offending .h is included in).
* Add eeprom support for chibios/kinetis.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Chibios: use WFI in idle. WIP suspend stuff.
* ChibiOS/kinetis: sending remote wakeup.
* ChibiOS/STM32: send remote wakeup.
* Fix report size of boot protocol.
* Fix drop key stroke
Keyboard report should be checked if its transfer finishs successfully.
Otherwise key stroke can be missing when other key event occurs
before the last report transfer is done.
Boot protocol 10ms interval probably causes this problem in case
it receives key events in a row within the period. NKRO protocol
suffers less or nothing due to its interval 1ms.
* Chibios/usb_main: rename a variable for clarity.
* Add correct chibios/bootloader_jump for infinity KB.
* ChibiOS: make reset request more CMSISy.
* Chibios: Add breathing sleep LED on Kinetis MCUs.
* ChibiOS: Update infinity bootloader code to match updated ChibiOS.
* ChibiOS: prettify/document sleep_led code.
* Chibios: Remove the wait in the main loop.
* Add maple mini code.
* Do timeout when writing to CONSOLE EP queue.
Fixes TMK bug #266.
* Chibios: add 'core/protocol' to the makefiles' search path.
* Chibios: Update to new USB API.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Add update for chibios in README
* Chibios: Fix a HardFault bug (wait after start).
* Chibios: cleanup usb_main code.
* Chibios: Revert common.mk change (fix AVR linking problem).
* core: Fix chibios user compile options
Compile options can be defined in project Makefile such as UDEFS, UADEFS, UINCDIR, ULIBDIR and ULIBS.
* Sysv format for ChibiOS arm-none-eabi-size
Some new patches to ChibiOS puts heap as it's own section. So the
berkeley format is now useless, as the heap will be included in the
BSS report. The sysv format displays the bss size correctly.
* Fix hard-coded path of CHIBIOS
* Add support for new version of ChibiOS and Contrib
The Kinetis support has moved to a separate Contrib repository in
the newest version of Chibios. There has also been some structure
changes. So this adds support for those, while maintaining back-
wards compability.
* Update ChibiOS instructions
* Chibios: implement sleep LED for STM32.
* Chibios: Update the main chibios README.
* Chibios: fix STM32_BOOTLOADER_ADDRESS name.
* Chibios: make the default bootloader_jump redefinable (weak).
* Chibios: disable LTO (link-time optimisation).
With LTO enabled, sometimes things fail for mysterious reasons
(e.g. bootloader jump on WF with LEDs enabled), just because the
linker optimisation is too aggressive.
* Chibios: add default location for chibios-contrib.
* ChibiOS: update mk to match chibios/master.
* ChibiOS: update instructions.md.
* Add chibi_onekey example.
* Add comments to chibi_onekey Makefile.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Add Teensy LC onekey example.
* Chibios: use WFI in idle. WIP suspend stuff.
* Update chibi/teensy instructions.
* Update chibios/Teensy instructions.
* Add infinity_chibios
* Add keymap_hasu.c
* Infinity_chibios: select correct bootloader_jump.
* Infinity_chibios: improve comments.
* Add generic STM32F103C8T6 example.
* Add maple mini code.
* STM32F103x fixes.
* Add maple mini pinout pic.
* Chibios: updates for 3.0.4 git.
* Chibios: rename example stm32_onekey -> stm32_f072_onekey.
* Chibios: add makefiles for Teensy 3.x examples.
* Chibios: update Teensy 3.x instructions.
* Chibios: Tsy LC is cortex-m0plus.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Change README for chibios
* Chibios: update examples to current chibios git.
Match the changes in mainline chibios:
- update chconf.h
- update supplied ld scripts structure
- update Teensy instructions (switch to official
chibios and introduce contrib)
* Add ChibiOS and ChibiOS-Contrib submodules
Also fix the makefile path for them.
* Moves chibios keyboards to keyboards folder
* First version of ChibiOS compilation
Only the stm32_f072_onkey keyboard is ported at the moment. It
compiles, but still doesn't link.
* More chibios fixes
It now compiles without warnings and links
* Move the teensy_lc_onekey to the keyboards folder
* Clean up the make file rule structure
* Remove keymap_fn_to_action
* Update more ChibiOS keyboards to QMK
Most of them does not compile at the moment though.
* Use older version of Chibios libraries
The newest ones have problems with compilation
* Remove USB_UNCONFIGURED event
It isn't present in the older version of ChibiOS
* Fix the infinity_chibios compilation
* Fix potentially uninitialized variable
* Add missing include
* Fix the ChibiOS makefile
* Fix some Chibios keyboard compilation
* Revert the rules.mk file back to master version
* Combine the chibios and AVR makefiles
With just the required overrides in the respective platform
specific one.
* Slight makefile restrucuring
Platform specific compiler options
* Move avr specific targets out of the main rules
* Fix ChibiOS objcopy
The ChibiOS objcopy needs different parameters, so the parameters
are moved to the corresponding platform rule file
* Fix the objcopy for real this time
The comands were moved around, so chibios used avr and the ohter
way around.
Also change the objsize output format
* Fix the thumb flags
* Fix the infinity hasu keymap
* Per platform cpp flags
* Add gcc-arm-none-eabi package to travis
* Add arm-none-eabi-newlib to travis
* Fix the name of the libnewlib-arm-none-eabi lib
* Fix the ChibiOS paths
So that they are properly relative, and builds don't generate
extra folders
* Fix the board path of stm32_f103_onekey
* Only consider folders with Makefiles as subproject
2016-07-01 14:04:53 +00:00
# include "wait.h"
2015-04-09 16:32:04 +00:00
# include "keycode.h"
# include "host.h"
# include "keymap.h"
# include "print.h"
# include "debug.h"
# include "util.h"
# include "timer.h"
# include "keyboard.h"
# include "bootloader.h"
# include "action_layer.h"
# include "action_util.h"
# include "eeconfig.h"
# include "sleep_led.h"
# include "led.h"
# include "command.h"
2016-05-24 15:56:53 +00:00
# include "quantum.h"
2016-08-08 08:27:15 +00:00
# include "version.h"
2015-04-09 16:32:04 +00:00
2019-10-17 16:48:58 +00:00
# ifdef BACKLIGHT_ENABLE
# include "backlight.h"
# endif
2020-05-19 11:29:20 +00:00
# if defined(MOUSEKEY_ENABLE) && !defined(MK_3_SPEED)
2019-08-30 18:19:03 +00:00
# include "mousekey.h"
2015-04-09 16:32:04 +00:00
# endif
2016-04-18 01:14:37 +00:00
# ifdef AUDIO_ENABLE
2019-08-30 18:19:03 +00:00
# include "audio.h"
2016-04-18 01:14:37 +00:00
# endif /* AUDIO_ENABLE */
2015-04-09 16:32:04 +00:00
static bool command_common ( uint8_t code ) ;
static void command_common_help ( void ) ;
2016-03-28 05:03:21 +00:00
static void print_version ( void ) ;
static void print_status ( void ) ;
2015-04-09 16:32:04 +00:00
static bool command_console ( uint8_t code ) ;
static void command_console_help ( void ) ;
2020-05-19 11:29:20 +00:00
# if defined(MOUSEKEY_ENABLE) && !defined(MK_3_SPEED)
2015-04-09 16:32:04 +00:00
static bool mousekey_console ( uint8_t code ) ;
static void mousekey_console_help ( void ) ;
# endif
static void switch_default_layer ( uint8_t layer ) ;
command_state_t command_state = ONESHOT ;
2019-08-30 18:19:03 +00:00
bool command_proc ( uint8_t code ) {
2015-04-09 16:32:04 +00:00
switch ( command_state ) {
case ONESHOT :
2019-08-30 18:19:03 +00:00
if ( ! IS_COMMAND ( ) ) return false ;
2015-04-09 16:32:04 +00:00
return ( command_extra ( code ) | | command_common ( code ) ) ;
break ;
case CONSOLE :
if ( IS_COMMAND ( ) )
return ( command_extra ( code ) | | command_common ( code ) ) ;
else
return ( command_console_extra ( code ) | | command_console ( code ) ) ;
break ;
2020-05-19 11:29:20 +00:00
# if defined(MOUSEKEY_ENABLE) && !defined(MK_3_SPEED)
2015-04-09 16:32:04 +00:00
case MOUSEKEY :
mousekey_console ( code ) ;
break ;
# endif
default :
command_state = ONESHOT ;
return false ;
}
return true ;
}
/* TODO: Refactoring is needed. */
/* This allows to define extra commands. return false when not processed. */
2019-08-30 18:19:03 +00:00
bool command_extra ( uint8_t code ) __attribute__ ( ( weak ) ) ;
bool command_extra ( uint8_t code ) {
Add ChibiOS support for QMK (#465)
* Modularity and gcc warnings fixes.
* Add ChibiOS support (USB stack + support files).
* Make usb_main more USB_DRIVER #define independent.
* Move chibios to tool.
* Implement jump-to-bootloader.
* Small updates.
* Fix bootloader-jump compiling.
* Move AVR specific sleep_led.c into avr.
* Add basic sleep_led for chibios.
* Update chibios README.
* NKRO fixes.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Add ARM Teensies bootloader code.
* Fix chibios/usb_main GET_REPORT handing.
* Add missing #include to keymap.c.
* Make bootmagic.c code portable (_delay_ms -> wait_ms).
* Move declaration of keymap_config.
Should really not declare variables in .h files - since it's included
in different .c files, a proper linker then complains that the same
variable is declared more than once (once for each .c file that the
offending .h is included in).
* Add eeprom support for chibios/kinetis.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Chibios: use WFI in idle. WIP suspend stuff.
* ChibiOS/kinetis: sending remote wakeup.
* ChibiOS/STM32: send remote wakeup.
* Fix report size of boot protocol.
* Fix drop key stroke
Keyboard report should be checked if its transfer finishs successfully.
Otherwise key stroke can be missing when other key event occurs
before the last report transfer is done.
Boot protocol 10ms interval probably causes this problem in case
it receives key events in a row within the period. NKRO protocol
suffers less or nothing due to its interval 1ms.
* Chibios/usb_main: rename a variable for clarity.
* Add correct chibios/bootloader_jump for infinity KB.
* ChibiOS: make reset request more CMSISy.
* Chibios: Add breathing sleep LED on Kinetis MCUs.
* ChibiOS: Update infinity bootloader code to match updated ChibiOS.
* ChibiOS: prettify/document sleep_led code.
* Chibios: Remove the wait in the main loop.
* Add maple mini code.
* Do timeout when writing to CONSOLE EP queue.
Fixes TMK bug #266.
* Chibios: add 'core/protocol' to the makefiles' search path.
* Chibios: Update to new USB API.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Add update for chibios in README
* Chibios: Fix a HardFault bug (wait after start).
* Chibios: cleanup usb_main code.
* Chibios: Revert common.mk change (fix AVR linking problem).
* core: Fix chibios user compile options
Compile options can be defined in project Makefile such as UDEFS, UADEFS, UINCDIR, ULIBDIR and ULIBS.
* Sysv format for ChibiOS arm-none-eabi-size
Some new patches to ChibiOS puts heap as it's own section. So the
berkeley format is now useless, as the heap will be included in the
BSS report. The sysv format displays the bss size correctly.
* Fix hard-coded path of CHIBIOS
* Add support for new version of ChibiOS and Contrib
The Kinetis support has moved to a separate Contrib repository in
the newest version of Chibios. There has also been some structure
changes. So this adds support for those, while maintaining back-
wards compability.
* Update ChibiOS instructions
* Chibios: implement sleep LED for STM32.
* Chibios: Update the main chibios README.
* Chibios: fix STM32_BOOTLOADER_ADDRESS name.
* Chibios: make the default bootloader_jump redefinable (weak).
* Chibios: disable LTO (link-time optimisation).
With LTO enabled, sometimes things fail for mysterious reasons
(e.g. bootloader jump on WF with LEDs enabled), just because the
linker optimisation is too aggressive.
* Chibios: add default location for chibios-contrib.
* ChibiOS: update mk to match chibios/master.
* ChibiOS: update instructions.md.
* Add chibi_onekey example.
* Add comments to chibi_onekey Makefile.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Add Teensy LC onekey example.
* Chibios: use WFI in idle. WIP suspend stuff.
* Update chibi/teensy instructions.
* Update chibios/Teensy instructions.
* Add infinity_chibios
* Add keymap_hasu.c
* Infinity_chibios: select correct bootloader_jump.
* Infinity_chibios: improve comments.
* Add generic STM32F103C8T6 example.
* Add maple mini code.
* STM32F103x fixes.
* Add maple mini pinout pic.
* Chibios: updates for 3.0.4 git.
* Chibios: rename example stm32_onekey -> stm32_f072_onekey.
* Chibios: add makefiles for Teensy 3.x examples.
* Chibios: update Teensy 3.x instructions.
* Chibios: Tsy LC is cortex-m0plus.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Change README for chibios
* Chibios: update examples to current chibios git.
Match the changes in mainline chibios:
- update chconf.h
- update supplied ld scripts structure
- update Teensy instructions (switch to official
chibios and introduce contrib)
* Add ChibiOS and ChibiOS-Contrib submodules
Also fix the makefile path for them.
* Moves chibios keyboards to keyboards folder
* First version of ChibiOS compilation
Only the stm32_f072_onkey keyboard is ported at the moment. It
compiles, but still doesn't link.
* More chibios fixes
It now compiles without warnings and links
* Move the teensy_lc_onekey to the keyboards folder
* Clean up the make file rule structure
* Remove keymap_fn_to_action
* Update more ChibiOS keyboards to QMK
Most of them does not compile at the moment though.
* Use older version of Chibios libraries
The newest ones have problems with compilation
* Remove USB_UNCONFIGURED event
It isn't present in the older version of ChibiOS
* Fix the infinity_chibios compilation
* Fix potentially uninitialized variable
* Add missing include
* Fix the ChibiOS makefile
* Fix some Chibios keyboard compilation
* Revert the rules.mk file back to master version
* Combine the chibios and AVR makefiles
With just the required overrides in the respective platform
specific one.
* Slight makefile restrucuring
Platform specific compiler options
* Move avr specific targets out of the main rules
* Fix ChibiOS objcopy
The ChibiOS objcopy needs different parameters, so the parameters
are moved to the corresponding platform rule file
* Fix the objcopy for real this time
The comands were moved around, so chibios used avr and the ohter
way around.
Also change the objsize output format
* Fix the thumb flags
* Fix the infinity hasu keymap
* Per platform cpp flags
* Add gcc-arm-none-eabi package to travis
* Add arm-none-eabi-newlib to travis
* Fix the name of the libnewlib-arm-none-eabi lib
* Fix the ChibiOS paths
So that they are properly relative, and builds don't generate
extra folders
* Fix the board path of stm32_f103_onekey
* Only consider folders with Makefiles as subproject
2016-07-01 14:04:53 +00:00
( void ) code ;
2015-04-09 16:32:04 +00:00
return false ;
}
2019-08-30 18:19:03 +00:00
bool command_console_extra ( uint8_t code ) __attribute__ ( ( weak ) ) ;
bool command_console_extra ( uint8_t code ) {
Add ChibiOS support for QMK (#465)
* Modularity and gcc warnings fixes.
* Add ChibiOS support (USB stack + support files).
* Make usb_main more USB_DRIVER #define independent.
* Move chibios to tool.
* Implement jump-to-bootloader.
* Small updates.
* Fix bootloader-jump compiling.
* Move AVR specific sleep_led.c into avr.
* Add basic sleep_led for chibios.
* Update chibios README.
* NKRO fixes.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Add ARM Teensies bootloader code.
* Fix chibios/usb_main GET_REPORT handing.
* Add missing #include to keymap.c.
* Make bootmagic.c code portable (_delay_ms -> wait_ms).
* Move declaration of keymap_config.
Should really not declare variables in .h files - since it's included
in different .c files, a proper linker then complains that the same
variable is declared more than once (once for each .c file that the
offending .h is included in).
* Add eeprom support for chibios/kinetis.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Chibios: use WFI in idle. WIP suspend stuff.
* ChibiOS/kinetis: sending remote wakeup.
* ChibiOS/STM32: send remote wakeup.
* Fix report size of boot protocol.
* Fix drop key stroke
Keyboard report should be checked if its transfer finishs successfully.
Otherwise key stroke can be missing when other key event occurs
before the last report transfer is done.
Boot protocol 10ms interval probably causes this problem in case
it receives key events in a row within the period. NKRO protocol
suffers less or nothing due to its interval 1ms.
* Chibios/usb_main: rename a variable for clarity.
* Add correct chibios/bootloader_jump for infinity KB.
* ChibiOS: make reset request more CMSISy.
* Chibios: Add breathing sleep LED on Kinetis MCUs.
* ChibiOS: Update infinity bootloader code to match updated ChibiOS.
* ChibiOS: prettify/document sleep_led code.
* Chibios: Remove the wait in the main loop.
* Add maple mini code.
* Do timeout when writing to CONSOLE EP queue.
Fixes TMK bug #266.
* Chibios: add 'core/protocol' to the makefiles' search path.
* Chibios: Update to new USB API.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Add update for chibios in README
* Chibios: Fix a HardFault bug (wait after start).
* Chibios: cleanup usb_main code.
* Chibios: Revert common.mk change (fix AVR linking problem).
* core: Fix chibios user compile options
Compile options can be defined in project Makefile such as UDEFS, UADEFS, UINCDIR, ULIBDIR and ULIBS.
* Sysv format for ChibiOS arm-none-eabi-size
Some new patches to ChibiOS puts heap as it's own section. So the
berkeley format is now useless, as the heap will be included in the
BSS report. The sysv format displays the bss size correctly.
* Fix hard-coded path of CHIBIOS
* Add support for new version of ChibiOS and Contrib
The Kinetis support has moved to a separate Contrib repository in
the newest version of Chibios. There has also been some structure
changes. So this adds support for those, while maintaining back-
wards compability.
* Update ChibiOS instructions
* Chibios: implement sleep LED for STM32.
* Chibios: Update the main chibios README.
* Chibios: fix STM32_BOOTLOADER_ADDRESS name.
* Chibios: make the default bootloader_jump redefinable (weak).
* Chibios: disable LTO (link-time optimisation).
With LTO enabled, sometimes things fail for mysterious reasons
(e.g. bootloader jump on WF with LEDs enabled), just because the
linker optimisation is too aggressive.
* Chibios: add default location for chibios-contrib.
* ChibiOS: update mk to match chibios/master.
* ChibiOS: update instructions.md.
* Add chibi_onekey example.
* Add comments to chibi_onekey Makefile.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Add Teensy LC onekey example.
* Chibios: use WFI in idle. WIP suspend stuff.
* Update chibi/teensy instructions.
* Update chibios/Teensy instructions.
* Add infinity_chibios
* Add keymap_hasu.c
* Infinity_chibios: select correct bootloader_jump.
* Infinity_chibios: improve comments.
* Add generic STM32F103C8T6 example.
* Add maple mini code.
* STM32F103x fixes.
* Add maple mini pinout pic.
* Chibios: updates for 3.0.4 git.
* Chibios: rename example stm32_onekey -> stm32_f072_onekey.
* Chibios: add makefiles for Teensy 3.x examples.
* Chibios: update Teensy 3.x instructions.
* Chibios: Tsy LC is cortex-m0plus.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Change README for chibios
* Chibios: update examples to current chibios git.
Match the changes in mainline chibios:
- update chconf.h
- update supplied ld scripts structure
- update Teensy instructions (switch to official
chibios and introduce contrib)
* Add ChibiOS and ChibiOS-Contrib submodules
Also fix the makefile path for them.
* Moves chibios keyboards to keyboards folder
* First version of ChibiOS compilation
Only the stm32_f072_onkey keyboard is ported at the moment. It
compiles, but still doesn't link.
* More chibios fixes
It now compiles without warnings and links
* Move the teensy_lc_onekey to the keyboards folder
* Clean up the make file rule structure
* Remove keymap_fn_to_action
* Update more ChibiOS keyboards to QMK
Most of them does not compile at the moment though.
* Use older version of Chibios libraries
The newest ones have problems with compilation
* Remove USB_UNCONFIGURED event
It isn't present in the older version of ChibiOS
* Fix the infinity_chibios compilation
* Fix potentially uninitialized variable
* Add missing include
* Fix the ChibiOS makefile
* Fix some Chibios keyboard compilation
* Revert the rules.mk file back to master version
* Combine the chibios and AVR makefiles
With just the required overrides in the respective platform
specific one.
* Slight makefile restrucuring
Platform specific compiler options
* Move avr specific targets out of the main rules
* Fix ChibiOS objcopy
The ChibiOS objcopy needs different parameters, so the parameters
are moved to the corresponding platform rule file
* Fix the objcopy for real this time
The comands were moved around, so chibios used avr and the ohter
way around.
Also change the objsize output format
* Fix the thumb flags
* Fix the infinity hasu keymap
* Per platform cpp flags
* Add gcc-arm-none-eabi package to travis
* Add arm-none-eabi-newlib to travis
* Fix the name of the libnewlib-arm-none-eabi lib
* Fix the ChibiOS paths
So that they are properly relative, and builds don't generate
extra folders
* Fix the board path of stm32_f103_onekey
* Only consider folders with Makefiles as subproject
2016-07-01 14:04:53 +00:00
( void ) code ;
2015-04-09 16:32:04 +00:00
return false ;
}
/***********************************************************
* Command common
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2019-08-30 18:19:03 +00:00
static void command_common_help ( void ) {
print ( " \n \t - Magic - \n " STR ( MAGIC_KEY_DEBUG ) " : Debug Message Toggle \n " STR ( MAGIC_KEY_DEBUG_MATRIX ) " : Matrix Debug Mode Toggle - Show keypresses in matrix grid \n " STR ( MAGIC_KEY_DEBUG_KBD ) " : Keyboard Debug Toggle - Show keypress report \n " STR ( MAGIC_KEY_DEBUG_MOUSE ) " : Debug Mouse Toggle \n " STR ( MAGIC_KEY_VERSION ) " : Version \n " STR ( MAGIC_KEY_STATUS ) " : Status \n " STR ( MAGIC_KEY_CONSOLE ) " : Activate Console Mode \n "
2016-04-17 17:54:32 +00:00
2016-03-28 05:03:21 +00:00
# if MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
2019-08-30 18:19:03 +00:00
STR ( MAGIC_KEY_LAYER0 ) " : Switch to Layer 0 \n " STR ( MAGIC_KEY_LAYER1 ) " : Switch to Layer 1 \n " STR ( MAGIC_KEY_LAYER2 ) " : Switch to Layer 2 \n " STR ( MAGIC_KEY_LAYER3 ) " : Switch to Layer 3 \n " STR ( MAGIC_KEY_LAYER4 ) " : Switch to Layer 4 \n " STR ( MAGIC_KEY_LAYER5 ) " : Switch to Layer 5 \n " STR ( MAGIC_KEY_LAYER6 ) " : Switch to Layer 6 \n " STR ( MAGIC_KEY_LAYER7 ) " : Switch to Layer 7 \n " STR ( MAGIC_KEY_LAYER8 ) " : Switch to Layer 8 \n " STR ( MAGIC_KEY_LAYER9 ) " : Switch to Layer 9 \n "
2016-03-28 05:03:21 +00:00
# endif
2016-04-17 17:54:32 +00:00
# if MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
2019-08-30 18:19:03 +00:00
" F1-F10: Switch to Layer 0-9 (F10 = L0) \n "
2016-03-28 05:03:21 +00:00
# endif
2016-04-17 17:54:32 +00:00
# if MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
2019-08-30 18:19:03 +00:00
" 0-9: Switch to Layer 0-9 \n "
2016-03-28 05:03:21 +00:00
# endif
2019-08-30 18:19:03 +00:00
STR ( MAGIC_KEY_LAYER0_ALT ) " : Switch to Layer 0 (alternate) \n "
2019-02-18 06:23:32 +00:00
2019-08-30 18:19:03 +00:00
STR ( MAGIC_KEY_BOOTLOADER ) " : Jump to Bootloader \n " STR ( MAGIC_KEY_BOOTLOADER_ALT ) " : Jump to Bootloader (alternate) \n "
2015-05-13 06:29:30 +00:00
# ifdef KEYBOARD_LOCK_ENABLE
2019-08-30 18:19:03 +00:00
STR ( MAGIC_KEY_LOCK ) " : Lock Keyboard \n "
2015-05-13 06:29:30 +00:00
# endif
2019-08-30 18:19:03 +00:00
STR ( MAGIC_KEY_EEPROM ) " : Print EEPROM Settings \n " STR ( MAGIC_KEY_EEPROM_CLEAR ) " : Clear EEPROM \n "
2015-05-13 06:29:30 +00:00
2015-04-09 16:32:04 +00:00
# ifdef NKRO_ENABLE
2019-08-30 18:19:03 +00:00
STR ( MAGIC_KEY_NKRO ) " : NKRO Toggle \n "
2015-05-13 06:29:30 +00:00
# endif
# ifdef SLEEP_LED_ENABLE
2019-08-30 18:19:03 +00:00
STR ( MAGIC_KEY_SLEEP_LED ) " : Sleep LED Test \n "
2015-04-09 16:32:04 +00:00
# endif
2015-05-13 06:29:30 +00:00
) ;
2015-04-09 16:32:04 +00:00
}
2019-08-30 18:19:03 +00:00
static void print_version ( void ) {
// print version & information
2016-03-28 05:03:21 +00:00
print ( " \n \t - Version - \n " ) ;
print ( " VID: " STR ( VENDOR_ID ) " ( " STR ( MANUFACTURER ) " ) "
2019-08-30 18:19:03 +00:00
" PID: " STR ( PRODUCT_ID ) " ( " STR ( PRODUCT ) " ) "
" VER: " STR ( DEVICE_VER ) " \n " ) ;
2018-12-15 05:31:56 +00:00
print ( " BUILD: ( " __DATE__ " ) \n " ) ;
2020-12-31 06:20:56 +00:00
# ifndef SKIP_VERSION
2020-02-29 20:00:00 +00:00
# ifdef PROTOCOL_CHIBIOS
print ( " CHIBIOS: " STR ( CHIBIOS_VERSION ) " , CONTRIB: " STR ( CHIBIOS_CONTRIB_VERSION ) " \n " ) ;
# endif
2018-12-15 05:31:56 +00:00
# endif
2016-03-28 05:03:21 +00:00
/* build options */
print ( " OPTIONS: "
# ifdef PROTOCOL_LUFA
2019-08-30 18:19:03 +00:00
" LUFA "
2016-03-28 05:03:21 +00:00
# endif
# ifdef PROTOCOL_VUSB
2019-08-30 18:19:03 +00:00
" VUSB "
2016-03-28 05:03:21 +00:00
# endif
# ifdef BOOTMAGIC_ENABLE
2019-08-30 18:19:03 +00:00
" BOOTMAGIC "
2016-03-28 05:03:21 +00:00
# endif
# ifdef MOUSEKEY_ENABLE
2019-08-30 18:19:03 +00:00
" MOUSEKEY "
2016-03-28 05:03:21 +00:00
# endif
# ifdef EXTRAKEY_ENABLE
2019-08-30 18:19:03 +00:00
" EXTRAKEY "
2016-03-28 05:03:21 +00:00
# endif
# ifdef CONSOLE_ENABLE
2019-08-30 18:19:03 +00:00
" CONSOLE "
2016-03-28 05:03:21 +00:00
# endif
# ifdef COMMAND_ENABLE
2019-08-30 18:19:03 +00:00
" COMMAND "
2016-03-28 05:03:21 +00:00
# endif
# ifdef NKRO_ENABLE
2019-08-30 18:19:03 +00:00
" NKRO "
2016-03-28 05:03:21 +00:00
# endif
2020-08-22 08:21:06 +00:00
# ifdef LTO_ENABLE
2020-02-29 20:00:00 +00:00
" LTO "
# endif
2016-03-28 05:03:21 +00:00
2019-08-30 18:19:03 +00:00
" " STR ( BOOTLOADER_SIZE ) " \n " ) ;
2016-03-28 05:03:21 +00:00
print ( " GCC: " STR ( __GNUC__ ) " . " STR ( __GNUC_MINOR__ ) " . " STR ( __GNUC_PATCHLEVEL__ )
Add ChibiOS support for QMK (#465)
* Modularity and gcc warnings fixes.
* Add ChibiOS support (USB stack + support files).
* Make usb_main more USB_DRIVER #define independent.
* Move chibios to tool.
* Implement jump-to-bootloader.
* Small updates.
* Fix bootloader-jump compiling.
* Move AVR specific sleep_led.c into avr.
* Add basic sleep_led for chibios.
* Update chibios README.
* NKRO fixes.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Add ARM Teensies bootloader code.
* Fix chibios/usb_main GET_REPORT handing.
* Add missing #include to keymap.c.
* Make bootmagic.c code portable (_delay_ms -> wait_ms).
* Move declaration of keymap_config.
Should really not declare variables in .h files - since it's included
in different .c files, a proper linker then complains that the same
variable is declared more than once (once for each .c file that the
offending .h is included in).
* Add eeprom support for chibios/kinetis.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Chibios: use WFI in idle. WIP suspend stuff.
* ChibiOS/kinetis: sending remote wakeup.
* ChibiOS/STM32: send remote wakeup.
* Fix report size of boot protocol.
* Fix drop key stroke
Keyboard report should be checked if its transfer finishs successfully.
Otherwise key stroke can be missing when other key event occurs
before the last report transfer is done.
Boot protocol 10ms interval probably causes this problem in case
it receives key events in a row within the period. NKRO protocol
suffers less or nothing due to its interval 1ms.
* Chibios/usb_main: rename a variable for clarity.
* Add correct chibios/bootloader_jump for infinity KB.
* ChibiOS: make reset request more CMSISy.
* Chibios: Add breathing sleep LED on Kinetis MCUs.
* ChibiOS: Update infinity bootloader code to match updated ChibiOS.
* ChibiOS: prettify/document sleep_led code.
* Chibios: Remove the wait in the main loop.
* Add maple mini code.
* Do timeout when writing to CONSOLE EP queue.
Fixes TMK bug #266.
* Chibios: add 'core/protocol' to the makefiles' search path.
* Chibios: Update to new USB API.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Add update for chibios in README
* Chibios: Fix a HardFault bug (wait after start).
* Chibios: cleanup usb_main code.
* Chibios: Revert common.mk change (fix AVR linking problem).
* core: Fix chibios user compile options
Compile options can be defined in project Makefile such as UDEFS, UADEFS, UINCDIR, ULIBDIR and ULIBS.
* Sysv format for ChibiOS arm-none-eabi-size
Some new patches to ChibiOS puts heap as it's own section. So the
berkeley format is now useless, as the heap will be included in the
BSS report. The sysv format displays the bss size correctly.
* Fix hard-coded path of CHIBIOS
* Add support for new version of ChibiOS and Contrib
The Kinetis support has moved to a separate Contrib repository in
the newest version of Chibios. There has also been some structure
changes. So this adds support for those, while maintaining back-
wards compability.
* Update ChibiOS instructions
* Chibios: implement sleep LED for STM32.
* Chibios: Update the main chibios README.
* Chibios: fix STM32_BOOTLOADER_ADDRESS name.
* Chibios: make the default bootloader_jump redefinable (weak).
* Chibios: disable LTO (link-time optimisation).
With LTO enabled, sometimes things fail for mysterious reasons
(e.g. bootloader jump on WF with LEDs enabled), just because the
linker optimisation is too aggressive.
* Chibios: add default location for chibios-contrib.
* ChibiOS: update mk to match chibios/master.
* ChibiOS: update instructions.md.
* Add chibi_onekey example.
* Add comments to chibi_onekey Makefile.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Add Teensy LC onekey example.
* Chibios: use WFI in idle. WIP suspend stuff.
* Update chibi/teensy instructions.
* Update chibios/Teensy instructions.
* Add infinity_chibios
* Add keymap_hasu.c
* Infinity_chibios: select correct bootloader_jump.
* Infinity_chibios: improve comments.
* Add generic STM32F103C8T6 example.
* Add maple mini code.
* STM32F103x fixes.
* Add maple mini pinout pic.
* Chibios: updates for 3.0.4 git.
* Chibios: rename example stm32_onekey -> stm32_f072_onekey.
* Chibios: add makefiles for Teensy 3.x examples.
* Chibios: update Teensy 3.x instructions.
* Chibios: Tsy LC is cortex-m0plus.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Change README for chibios
* Chibios: update examples to current chibios git.
Match the changes in mainline chibios:
- update chconf.h
- update supplied ld scripts structure
- update Teensy instructions (switch to official
chibios and introduce contrib)
* Add ChibiOS and ChibiOS-Contrib submodules
Also fix the makefile path for them.
* Moves chibios keyboards to keyboards folder
* First version of ChibiOS compilation
Only the stm32_f072_onkey keyboard is ported at the moment. It
compiles, but still doesn't link.
* More chibios fixes
It now compiles without warnings and links
* Move the teensy_lc_onekey to the keyboards folder
* Clean up the make file rule structure
* Remove keymap_fn_to_action
* Update more ChibiOS keyboards to QMK
Most of them does not compile at the moment though.
* Use older version of Chibios libraries
The newest ones have problems with compilation
* Remove USB_UNCONFIGURED event
It isn't present in the older version of ChibiOS
* Fix the infinity_chibios compilation
* Fix potentially uninitialized variable
* Add missing include
* Fix the ChibiOS makefile
* Fix some Chibios keyboard compilation
* Revert the rules.mk file back to master version
* Combine the chibios and AVR makefiles
With just the required overrides in the respective platform
specific one.
* Slight makefile restrucuring
Platform specific compiler options
* Move avr specific targets out of the main rules
* Fix ChibiOS objcopy
The ChibiOS objcopy needs different parameters, so the parameters
are moved to the corresponding platform rule file
* Fix the objcopy for real this time
The comands were moved around, so chibios used avr and the ohter
way around.
Also change the objsize output format
* Fix the thumb flags
* Fix the infinity hasu keymap
* Per platform cpp flags
* Add gcc-arm-none-eabi package to travis
* Add arm-none-eabi-newlib to travis
* Fix the name of the libnewlib-arm-none-eabi lib
* Fix the ChibiOS paths
So that they are properly relative, and builds don't generate
extra folders
* Fix the board path of stm32_f103_onekey
* Only consider folders with Makefiles as subproject
2016-07-01 14:04:53 +00:00
# if defined(__AVR__)
2019-08-30 18:19:03 +00:00
" AVR-LIBC: " __AVR_LIBC_VERSION_STRING__ " AVR_ARCH: avr " STR ( __AVR_ARCH__ )
Add ChibiOS support for QMK (#465)
* Modularity and gcc warnings fixes.
* Add ChibiOS support (USB stack + support files).
* Make usb_main more USB_DRIVER #define independent.
* Move chibios to tool.
* Implement jump-to-bootloader.
* Small updates.
* Fix bootloader-jump compiling.
* Move AVR specific sleep_led.c into avr.
* Add basic sleep_led for chibios.
* Update chibios README.
* NKRO fixes.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Add ARM Teensies bootloader code.
* Fix chibios/usb_main GET_REPORT handing.
* Add missing #include to keymap.c.
* Make bootmagic.c code portable (_delay_ms -> wait_ms).
* Move declaration of keymap_config.
Should really not declare variables in .h files - since it's included
in different .c files, a proper linker then complains that the same
variable is declared more than once (once for each .c file that the
offending .h is included in).
* Add eeprom support for chibios/kinetis.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Chibios: use WFI in idle. WIP suspend stuff.
* ChibiOS/kinetis: sending remote wakeup.
* ChibiOS/STM32: send remote wakeup.
* Fix report size of boot protocol.
* Fix drop key stroke
Keyboard report should be checked if its transfer finishs successfully.
Otherwise key stroke can be missing when other key event occurs
before the last report transfer is done.
Boot protocol 10ms interval probably causes this problem in case
it receives key events in a row within the period. NKRO protocol
suffers less or nothing due to its interval 1ms.
* Chibios/usb_main: rename a variable for clarity.
* Add correct chibios/bootloader_jump for infinity KB.
* ChibiOS: make reset request more CMSISy.
* Chibios: Add breathing sleep LED on Kinetis MCUs.
* ChibiOS: Update infinity bootloader code to match updated ChibiOS.
* ChibiOS: prettify/document sleep_led code.
* Chibios: Remove the wait in the main loop.
* Add maple mini code.
* Do timeout when writing to CONSOLE EP queue.
Fixes TMK bug #266.
* Chibios: add 'core/protocol' to the makefiles' search path.
* Chibios: Update to new USB API.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Add update for chibios in README
* Chibios: Fix a HardFault bug (wait after start).
* Chibios: cleanup usb_main code.
* Chibios: Revert common.mk change (fix AVR linking problem).
* core: Fix chibios user compile options
Compile options can be defined in project Makefile such as UDEFS, UADEFS, UINCDIR, ULIBDIR and ULIBS.
* Sysv format for ChibiOS arm-none-eabi-size
Some new patches to ChibiOS puts heap as it's own section. So the
berkeley format is now useless, as the heap will be included in the
BSS report. The sysv format displays the bss size correctly.
* Fix hard-coded path of CHIBIOS
* Add support for new version of ChibiOS and Contrib
The Kinetis support has moved to a separate Contrib repository in
the newest version of Chibios. There has also been some structure
changes. So this adds support for those, while maintaining back-
wards compability.
* Update ChibiOS instructions
* Chibios: implement sleep LED for STM32.
* Chibios: Update the main chibios README.
* Chibios: fix STM32_BOOTLOADER_ADDRESS name.
* Chibios: make the default bootloader_jump redefinable (weak).
* Chibios: disable LTO (link-time optimisation).
With LTO enabled, sometimes things fail for mysterious reasons
(e.g. bootloader jump on WF with LEDs enabled), just because the
linker optimisation is too aggressive.
* Chibios: add default location for chibios-contrib.
* ChibiOS: update mk to match chibios/master.
* ChibiOS: update instructions.md.
* Add chibi_onekey example.
* Add comments to chibi_onekey Makefile.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Add Teensy LC onekey example.
* Chibios: use WFI in idle. WIP suspend stuff.
* Update chibi/teensy instructions.
* Update chibios/Teensy instructions.
* Add infinity_chibios
* Add keymap_hasu.c
* Infinity_chibios: select correct bootloader_jump.
* Infinity_chibios: improve comments.
* Add generic STM32F103C8T6 example.
* Add maple mini code.
* STM32F103x fixes.
* Add maple mini pinout pic.
* Chibios: updates for 3.0.4 git.
* Chibios: rename example stm32_onekey -> stm32_f072_onekey.
* Chibios: add makefiles for Teensy 3.x examples.
* Chibios: update Teensy 3.x instructions.
* Chibios: Tsy LC is cortex-m0plus.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Change README for chibios
* Chibios: update examples to current chibios git.
Match the changes in mainline chibios:
- update chconf.h
- update supplied ld scripts structure
- update Teensy instructions (switch to official
chibios and introduce contrib)
* Add ChibiOS and ChibiOS-Contrib submodules
Also fix the makefile path for them.
* Moves chibios keyboards to keyboards folder
* First version of ChibiOS compilation
Only the stm32_f072_onkey keyboard is ported at the moment. It
compiles, but still doesn't link.
* More chibios fixes
It now compiles without warnings and links
* Move the teensy_lc_onekey to the keyboards folder
* Clean up the make file rule structure
* Remove keymap_fn_to_action
* Update more ChibiOS keyboards to QMK
Most of them does not compile at the moment though.
* Use older version of Chibios libraries
The newest ones have problems with compilation
* Remove USB_UNCONFIGURED event
It isn't present in the older version of ChibiOS
* Fix the infinity_chibios compilation
* Fix potentially uninitialized variable
* Add missing include
* Fix the ChibiOS makefile
* Fix some Chibios keyboard compilation
* Revert the rules.mk file back to master version
* Combine the chibios and AVR makefiles
With just the required overrides in the respective platform
specific one.
* Slight makefile restrucuring
Platform specific compiler options
* Move avr specific targets out of the main rules
* Fix ChibiOS objcopy
The ChibiOS objcopy needs different parameters, so the parameters
are moved to the corresponding platform rule file
* Fix the objcopy for real this time
The comands were moved around, so chibios used avr and the ohter
way around.
Also change the objsize output format
* Fix the thumb flags
* Fix the infinity hasu keymap
* Per platform cpp flags
* Add gcc-arm-none-eabi package to travis
* Add arm-none-eabi-newlib to travis
* Fix the name of the libnewlib-arm-none-eabi lib
* Fix the ChibiOS paths
So that they are properly relative, and builds don't generate
extra folders
* Fix the board path of stm32_f103_onekey
* Only consider folders with Makefiles as subproject
2016-07-01 14:04:53 +00:00
# endif
2019-08-30 18:19:03 +00:00
" \n " ) ;
2016-03-28 05:03:21 +00:00
2019-08-30 18:19:03 +00:00
return ;
2016-03-28 05:03:21 +00:00
}
2019-08-30 18:19:03 +00:00
static void print_status ( void ) {
2016-03-28 05:03:21 +00:00
print ( " \n \t - Status - \n " ) ;
print_val_hex8 ( host_keyboard_leds ( ) ) ;
2017-01-21 17:30:06 +00:00
# ifndef PROTOCOL_VUSB
2017-01-21 22:09:17 +00:00
// these aren't set on the V-USB protocol, so we just ignore them for now
2016-03-28 05:03:21 +00:00
print_val_hex8 ( keyboard_protocol ) ;
print_val_hex8 ( keyboard_idle ) ;
2017-01-21 17:30:06 +00:00
# endif
2016-03-28 05:03:21 +00:00
# ifdef NKRO_ENABLE
2016-09-07 04:19:01 +00:00
print_val_hex8 ( keymap_config . nkro ) ;
2016-03-28 05:03:21 +00:00
# endif
Add ChibiOS support for QMK (#465)
* Modularity and gcc warnings fixes.
* Add ChibiOS support (USB stack + support files).
* Make usb_main more USB_DRIVER #define independent.
* Move chibios to tool.
* Implement jump-to-bootloader.
* Small updates.
* Fix bootloader-jump compiling.
* Move AVR specific sleep_led.c into avr.
* Add basic sleep_led for chibios.
* Update chibios README.
* NKRO fixes.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Add ARM Teensies bootloader code.
* Fix chibios/usb_main GET_REPORT handing.
* Add missing #include to keymap.c.
* Make bootmagic.c code portable (_delay_ms -> wait_ms).
* Move declaration of keymap_config.
Should really not declare variables in .h files - since it's included
in different .c files, a proper linker then complains that the same
variable is declared more than once (once for each .c file that the
offending .h is included in).
* Add eeprom support for chibios/kinetis.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Chibios: use WFI in idle. WIP suspend stuff.
* ChibiOS/kinetis: sending remote wakeup.
* ChibiOS/STM32: send remote wakeup.
* Fix report size of boot protocol.
* Fix drop key stroke
Keyboard report should be checked if its transfer finishs successfully.
Otherwise key stroke can be missing when other key event occurs
before the last report transfer is done.
Boot protocol 10ms interval probably causes this problem in case
it receives key events in a row within the period. NKRO protocol
suffers less or nothing due to its interval 1ms.
* Chibios/usb_main: rename a variable for clarity.
* Add correct chibios/bootloader_jump for infinity KB.
* ChibiOS: make reset request more CMSISy.
* Chibios: Add breathing sleep LED on Kinetis MCUs.
* ChibiOS: Update infinity bootloader code to match updated ChibiOS.
* ChibiOS: prettify/document sleep_led code.
* Chibios: Remove the wait in the main loop.
* Add maple mini code.
* Do timeout when writing to CONSOLE EP queue.
Fixes TMK bug #266.
* Chibios: add 'core/protocol' to the makefiles' search path.
* Chibios: Update to new USB API.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Add update for chibios in README
* Chibios: Fix a HardFault bug (wait after start).
* Chibios: cleanup usb_main code.
* Chibios: Revert common.mk change (fix AVR linking problem).
* core: Fix chibios user compile options
Compile options can be defined in project Makefile such as UDEFS, UADEFS, UINCDIR, ULIBDIR and ULIBS.
* Sysv format for ChibiOS arm-none-eabi-size
Some new patches to ChibiOS puts heap as it's own section. So the
berkeley format is now useless, as the heap will be included in the
BSS report. The sysv format displays the bss size correctly.
* Fix hard-coded path of CHIBIOS
* Add support for new version of ChibiOS and Contrib
The Kinetis support has moved to a separate Contrib repository in
the newest version of Chibios. There has also been some structure
changes. So this adds support for those, while maintaining back-
wards compability.
* Update ChibiOS instructions
* Chibios: implement sleep LED for STM32.
* Chibios: Update the main chibios README.
* Chibios: fix STM32_BOOTLOADER_ADDRESS name.
* Chibios: make the default bootloader_jump redefinable (weak).
* Chibios: disable LTO (link-time optimisation).
With LTO enabled, sometimes things fail for mysterious reasons
(e.g. bootloader jump on WF with LEDs enabled), just because the
linker optimisation is too aggressive.
* Chibios: add default location for chibios-contrib.
* ChibiOS: update mk to match chibios/master.
* ChibiOS: update instructions.md.
* Add chibi_onekey example.
* Add comments to chibi_onekey Makefile.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Add Teensy LC onekey example.
* Chibios: use WFI in idle. WIP suspend stuff.
* Update chibi/teensy instructions.
* Update chibios/Teensy instructions.
* Add infinity_chibios
* Add keymap_hasu.c
* Infinity_chibios: select correct bootloader_jump.
* Infinity_chibios: improve comments.
* Add generic STM32F103C8T6 example.
* Add maple mini code.
* STM32F103x fixes.
* Add maple mini pinout pic.
* Chibios: updates for 3.0.4 git.
* Chibios: rename example stm32_onekey -> stm32_f072_onekey.
* Chibios: add makefiles for Teensy 3.x examples.
* Chibios: update Teensy 3.x instructions.
* Chibios: Tsy LC is cortex-m0plus.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Change README for chibios
* Chibios: update examples to current chibios git.
Match the changes in mainline chibios:
- update chconf.h
- update supplied ld scripts structure
- update Teensy instructions (switch to official
chibios and introduce contrib)
* Add ChibiOS and ChibiOS-Contrib submodules
Also fix the makefile path for them.
* Moves chibios keyboards to keyboards folder
* First version of ChibiOS compilation
Only the stm32_f072_onkey keyboard is ported at the moment. It
compiles, but still doesn't link.
* More chibios fixes
It now compiles without warnings and links
* Move the teensy_lc_onekey to the keyboards folder
* Clean up the make file rule structure
* Remove keymap_fn_to_action
* Update more ChibiOS keyboards to QMK
Most of them does not compile at the moment though.
* Use older version of Chibios libraries
The newest ones have problems with compilation
* Remove USB_UNCONFIGURED event
It isn't present in the older version of ChibiOS
* Fix the infinity_chibios compilation
* Fix potentially uninitialized variable
* Add missing include
* Fix the ChibiOS makefile
* Fix some Chibios keyboard compilation
* Revert the rules.mk file back to master version
* Combine the chibios and AVR makefiles
With just the required overrides in the respective platform
specific one.
* Slight makefile restrucuring
Platform specific compiler options
* Move avr specific targets out of the main rules
* Fix ChibiOS objcopy
The ChibiOS objcopy needs different parameters, so the parameters
are moved to the corresponding platform rule file
* Fix the objcopy for real this time
The comands were moved around, so chibios used avr and the ohter
way around.
Also change the objsize output format
* Fix the thumb flags
* Fix the infinity hasu keymap
* Per platform cpp flags
* Add gcc-arm-none-eabi package to travis
* Add arm-none-eabi-newlib to travis
* Fix the name of the libnewlib-arm-none-eabi lib
* Fix the ChibiOS paths
So that they are properly relative, and builds don't generate
extra folders
* Fix the board path of stm32_f103_onekey
* Only consider folders with Makefiles as subproject
2016-07-01 14:04:53 +00:00
print_val_hex32 ( timer_read32 ( ) ) ;
2019-08-30 18:19:03 +00:00
return ;
2016-03-28 05:03:21 +00:00
}
2019-08-30 18:19:03 +00:00
static void print_eeconfig ( void ) {
2016-09-13 01:20:31 +00:00
// Print these variables if NO_PRINT or USER_PRINT are not defined.
# if !defined(NO_PRINT) && !defined(USER_PRINT)
2019-08-30 18:19:03 +00:00
print ( " default_layer: " ) ;
print_dec ( eeconfig_read_default_layer ( ) ) ;
print ( " \n " ) ;
2015-04-09 16:32:04 +00:00
debug_config_t dc ;
dc . raw = eeconfig_read_debug ( ) ;
2019-08-30 18:19:03 +00:00
print ( " debug_config.raw: " ) ;
print_hex8 ( dc . raw ) ;
print ( " \n " ) ;
print ( " .enable: " ) ;
print_dec ( dc . enable ) ;
print ( " \n " ) ;
print ( " .matrix: " ) ;
print_dec ( dc . matrix ) ;
print ( " \n " ) ;
print ( " .keyboard: " ) ;
print_dec ( dc . keyboard ) ;
print ( " \n " ) ;
print ( " .mouse: " ) ;
print_dec ( dc . mouse ) ;
print ( " \n " ) ;
2015-04-09 16:32:04 +00:00
keymap_config_t kc ;
kc . raw = eeconfig_read_keymap ( ) ;
2019-08-30 18:19:03 +00:00
print ( " keymap_config.raw: " ) ;
print_hex8 ( kc . raw ) ;
print ( " \n " ) ;
print ( " .swap_control_capslock: " ) ;
print_dec ( kc . swap_control_capslock ) ;
print ( " \n " ) ;
print ( " .capslock_to_control: " ) ;
print_dec ( kc . capslock_to_control ) ;
print ( " \n " ) ;
print ( " .swap_lctl_lgui: " ) ;
print_dec ( kc . swap_lctl_lgui ) ;
print ( " \n " ) ;
print ( " .swap_rctl_rgui: " ) ;
print_dec ( kc . swap_rctl_rgui ) ;
print ( " \n " ) ;
print ( " .swap_lalt_lgui: " ) ;
print_dec ( kc . swap_lalt_lgui ) ;
print ( " \n " ) ;
print ( " .swap_ralt_rgui: " ) ;
print_dec ( kc . swap_ralt_rgui ) ;
print ( " \n " ) ;
print ( " .no_gui: " ) ;
print_dec ( kc . no_gui ) ;
print ( " \n " ) ;
print ( " .swap_grave_esc: " ) ;
print_dec ( kc . swap_grave_esc ) ;
print ( " \n " ) ;
print ( " .swap_backslash_backspace: " ) ;
print_dec ( kc . swap_backslash_backspace ) ;
print ( " \n " ) ;
print ( " .nkro: " ) ;
print_dec ( kc . nkro ) ;
print ( " \n " ) ;
# ifdef BACKLIGHT_ENABLE
2015-04-09 16:32:04 +00:00
backlight_config_t bc ;
bc . raw = eeconfig_read_backlight ( ) ;
2019-08-30 18:19:03 +00:00
print ( " backlight_config.raw: " ) ;
print_hex8 ( bc . raw ) ;
print ( " \n " ) ;
print ( " .enable: " ) ;
print_dec ( bc . enable ) ;
print ( " \n " ) ;
print ( " .level: " ) ;
print_dec ( bc . level ) ;
print ( " \n " ) ;
# endif /* BACKLIGHT_ENABLE */
2016-04-17 17:54:32 +00:00
# endif /* !NO_PRINT */
2015-04-09 16:32:04 +00:00
}
2019-08-30 18:19:03 +00:00
static bool command_common ( uint8_t code ) {
2016-03-28 05:03:21 +00:00
# ifdef KEYBOARD_LOCK_ENABLE
2015-04-09 16:32:04 +00:00
static host_driver_t * host_driver = 0 ;
2016-03-28 05:03:21 +00:00
# endif
2015-04-09 16:32:04 +00:00
switch ( code ) {
# ifdef SLEEP_LED_ENABLE
2016-03-28 05:03:21 +00:00
2019-08-30 18:19:03 +00:00
// test breathing sleep LED
2016-03-28 05:03:21 +00:00
case MAGIC_KC ( MAGIC_KEY_SLEEP_LED ) :
print ( " Sleep LED Test \n " ) ;
2015-04-09 16:32:04 +00:00
sleep_led_toggle ( ) ;
led_set ( host_keyboard_leds ( ) ) ;
break ;
# endif
2016-03-28 05:03:21 +00:00
2019-08-30 18:19:03 +00:00
// print stored eeprom config
2016-04-17 17:54:32 +00:00
case MAGIC_KC ( MAGIC_KEY_EEPROM ) :
2015-04-09 16:32:04 +00:00
print ( " eeconfig: \n " ) ;
print_eeconfig ( ) ;
break ;
2019-02-18 06:23:32 +00:00
2019-08-30 18:19:03 +00:00
// clear eeprom
2019-02-18 06:23:32 +00:00
case MAGIC_KC ( MAGIC_KEY_EEPROM_CLEAR ) :
print ( " Clearing EEPROM \n " ) ;
2019-08-30 18:19:03 +00:00
eeconfig_init ( ) ;
2019-02-18 06:23:32 +00:00
break ;
2016-03-28 05:03:21 +00:00
2015-05-13 06:29:30 +00:00
# ifdef KEYBOARD_LOCK_ENABLE
2016-03-28 05:03:21 +00:00
2019-08-30 18:19:03 +00:00
// lock/unlock keyboard
2016-03-28 05:03:21 +00:00
case MAGIC_KC ( MAGIC_KEY_LOCK ) :
2015-04-09 16:32:04 +00:00
if ( host_get_driver ( ) ) {
host_driver = host_get_driver ( ) ;
clear_keyboard ( ) ;
host_set_driver ( 0 ) ;
print ( " Locked. \n " ) ;
} else {
host_set_driver ( host_driver ) ;
print ( " Unlocked. \n " ) ;
}
break ;
2015-05-13 06:29:30 +00:00
# endif
2016-03-28 05:03:21 +00:00
2019-08-30 18:19:03 +00:00
// print help
2019-02-18 06:23:32 +00:00
case MAGIC_KC ( MAGIC_KEY_HELP ) :
case MAGIC_KC ( MAGIC_KEY_HELP_ALT ) :
2015-04-09 16:32:04 +00:00
command_common_help ( ) ;
break ;
2016-03-28 05:03:21 +00:00
2019-08-30 18:19:03 +00:00
// activate console
2016-03-28 05:03:21 +00:00
case MAGIC_KC ( MAGIC_KEY_CONSOLE ) :
2015-04-09 16:32:04 +00:00
debug_matrix = false ;
debug_keyboard = false ;
debug_mouse = false ;
debug_enable = false ;
command_console_help ( ) ;
print ( " C> " ) ;
command_state = CONSOLE ;
break ;
2016-03-28 05:03:21 +00:00
// jump to bootloader
case MAGIC_KC ( MAGIC_KEY_BOOTLOADER ) :
2019-02-18 06:23:32 +00:00
case MAGIC_KC ( MAGIC_KEY_BOOTLOADER_ALT ) :
2016-03-28 05:03:21 +00:00
print ( " \n \n Jumping to bootloader... " ) ;
2020-05-25 12:16:33 +00:00
reset_keyboard ( ) ;
2015-04-09 16:32:04 +00:00
break ;
2016-03-28 05:03:21 +00:00
// debug toggle
case MAGIC_KC ( MAGIC_KEY_DEBUG ) :
debug_enable = ! debug_enable ;
2015-04-09 16:32:04 +00:00
if ( debug_enable ) {
2016-03-28 05:03:21 +00:00
print ( " \n debug: on \n " ) ;
} else {
2015-09-20 01:51:30 +00:00
print ( " \n debug: off \n " ) ;
2016-10-24 04:00:43 +00:00
debug_matrix = false ;
debug_keyboard = false ;
debug_mouse = false ;
2015-04-09 16:32:04 +00:00
}
break ;
2016-03-28 05:03:21 +00:00
// debug matrix toggle
2016-04-17 17:54:32 +00:00
case MAGIC_KC ( MAGIC_KEY_DEBUG_MATRIX ) :
2015-04-09 16:32:04 +00:00
debug_matrix = ! debug_matrix ;
if ( debug_matrix ) {
2015-05-13 06:29:30 +00:00
print ( " \n matrix: on \n " ) ;
2015-04-09 16:32:04 +00:00
debug_enable = true ;
} else {
2015-05-13 06:29:30 +00:00
print ( " \n matrix: off \n " ) ;
2015-04-09 16:32:04 +00:00
}
break ;
2016-03-28 05:03:21 +00:00
// debug keyboard toggle
2016-04-17 17:54:32 +00:00
case MAGIC_KC ( MAGIC_KEY_DEBUG_KBD ) :
2015-04-09 16:32:04 +00:00
debug_keyboard = ! debug_keyboard ;
if ( debug_keyboard ) {
2015-05-13 06:29:30 +00:00
print ( " \n keyboard: on \n " ) ;
2015-04-09 16:32:04 +00:00
debug_enable = true ;
} else {
2015-05-13 06:29:30 +00:00
print ( " \n keyboard: off \n " ) ;
2015-04-09 16:32:04 +00:00
}
break ;
2016-03-28 05:03:21 +00:00
// debug mouse toggle
case MAGIC_KC ( MAGIC_KEY_DEBUG_MOUSE ) :
2015-04-09 16:32:04 +00:00
debug_mouse = ! debug_mouse ;
if ( debug_mouse ) {
2015-05-13 06:29:30 +00:00
print ( " \n mouse: on \n " ) ;
2015-04-09 16:32:04 +00:00
debug_enable = true ;
} else {
2019-08-30 18:19:03 +00:00
print ( " \n mouse: off \n " ) ;
2015-04-09 16:32:04 +00:00
}
break ;
2015-05-13 06:29:30 +00:00
2019-08-30 18:19:03 +00:00
// print version
2016-03-28 05:03:21 +00:00
case MAGIC_KC ( MAGIC_KEY_VERSION ) :
2019-08-30 18:19:03 +00:00
print_version ( ) ;
break ;
2015-04-09 16:32:04 +00:00
2019-08-30 18:19:03 +00:00
// print status
case MAGIC_KC ( MAGIC_KEY_STATUS ) :
print_status ( ) ;
2015-04-09 16:32:04 +00:00
break ;
2016-03-28 05:03:21 +00:00
2015-04-09 16:32:04 +00:00
# ifdef NKRO_ENABLE
2016-03-28 05:03:21 +00:00
2019-08-30 18:19:03 +00:00
// NKRO toggle
2016-03-28 05:03:21 +00:00
case MAGIC_KC ( MAGIC_KEY_NKRO ) :
2019-08-30 18:19:03 +00:00
clear_keyboard ( ) ; // clear to prevent stuck keys
2016-09-07 04:19:01 +00:00
keymap_config . nkro = ! keymap_config . nkro ;
if ( keymap_config . nkro ) {
2015-05-13 06:29:30 +00:00
print ( " NKRO: on \n " ) ;
Add ChibiOS support for QMK (#465)
* Modularity and gcc warnings fixes.
* Add ChibiOS support (USB stack + support files).
* Make usb_main more USB_DRIVER #define independent.
* Move chibios to tool.
* Implement jump-to-bootloader.
* Small updates.
* Fix bootloader-jump compiling.
* Move AVR specific sleep_led.c into avr.
* Add basic sleep_led for chibios.
* Update chibios README.
* NKRO fixes.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Add ARM Teensies bootloader code.
* Fix chibios/usb_main GET_REPORT handing.
* Add missing #include to keymap.c.
* Make bootmagic.c code portable (_delay_ms -> wait_ms).
* Move declaration of keymap_config.
Should really not declare variables in .h files - since it's included
in different .c files, a proper linker then complains that the same
variable is declared more than once (once for each .c file that the
offending .h is included in).
* Add eeprom support for chibios/kinetis.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Chibios: use WFI in idle. WIP suspend stuff.
* ChibiOS/kinetis: sending remote wakeup.
* ChibiOS/STM32: send remote wakeup.
* Fix report size of boot protocol.
* Fix drop key stroke
Keyboard report should be checked if its transfer finishs successfully.
Otherwise key stroke can be missing when other key event occurs
before the last report transfer is done.
Boot protocol 10ms interval probably causes this problem in case
it receives key events in a row within the period. NKRO protocol
suffers less or nothing due to its interval 1ms.
* Chibios/usb_main: rename a variable for clarity.
* Add correct chibios/bootloader_jump for infinity KB.
* ChibiOS: make reset request more CMSISy.
* Chibios: Add breathing sleep LED on Kinetis MCUs.
* ChibiOS: Update infinity bootloader code to match updated ChibiOS.
* ChibiOS: prettify/document sleep_led code.
* Chibios: Remove the wait in the main loop.
* Add maple mini code.
* Do timeout when writing to CONSOLE EP queue.
Fixes TMK bug #266.
* Chibios: add 'core/protocol' to the makefiles' search path.
* Chibios: Update to new USB API.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Add update for chibios in README
* Chibios: Fix a HardFault bug (wait after start).
* Chibios: cleanup usb_main code.
* Chibios: Revert common.mk change (fix AVR linking problem).
* core: Fix chibios user compile options
Compile options can be defined in project Makefile such as UDEFS, UADEFS, UINCDIR, ULIBDIR and ULIBS.
* Sysv format for ChibiOS arm-none-eabi-size
Some new patches to ChibiOS puts heap as it's own section. So the
berkeley format is now useless, as the heap will be included in the
BSS report. The sysv format displays the bss size correctly.
* Fix hard-coded path of CHIBIOS
* Add support for new version of ChibiOS and Contrib
The Kinetis support has moved to a separate Contrib repository in
the newest version of Chibios. There has also been some structure
changes. So this adds support for those, while maintaining back-
wards compability.
* Update ChibiOS instructions
* Chibios: implement sleep LED for STM32.
* Chibios: Update the main chibios README.
* Chibios: fix STM32_BOOTLOADER_ADDRESS name.
* Chibios: make the default bootloader_jump redefinable (weak).
* Chibios: disable LTO (link-time optimisation).
With LTO enabled, sometimes things fail for mysterious reasons
(e.g. bootloader jump on WF with LEDs enabled), just because the
linker optimisation is too aggressive.
* Chibios: add default location for chibios-contrib.
* ChibiOS: update mk to match chibios/master.
* ChibiOS: update instructions.md.
* Add chibi_onekey example.
* Add comments to chibi_onekey Makefile.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Add Teensy LC onekey example.
* Chibios: use WFI in idle. WIP suspend stuff.
* Update chibi/teensy instructions.
* Update chibios/Teensy instructions.
* Add infinity_chibios
* Add keymap_hasu.c
* Infinity_chibios: select correct bootloader_jump.
* Infinity_chibios: improve comments.
* Add generic STM32F103C8T6 example.
* Add maple mini code.
* STM32F103x fixes.
* Add maple mini pinout pic.
* Chibios: updates for 3.0.4 git.
* Chibios: rename example stm32_onekey -> stm32_f072_onekey.
* Chibios: add makefiles for Teensy 3.x examples.
* Chibios: update Teensy 3.x instructions.
* Chibios: Tsy LC is cortex-m0plus.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Change README for chibios
* Chibios: update examples to current chibios git.
Match the changes in mainline chibios:
- update chconf.h
- update supplied ld scripts structure
- update Teensy instructions (switch to official
chibios and introduce contrib)
* Add ChibiOS and ChibiOS-Contrib submodules
Also fix the makefile path for them.
* Moves chibios keyboards to keyboards folder
* First version of ChibiOS compilation
Only the stm32_f072_onkey keyboard is ported at the moment. It
compiles, but still doesn't link.
* More chibios fixes
It now compiles without warnings and links
* Move the teensy_lc_onekey to the keyboards folder
* Clean up the make file rule structure
* Remove keymap_fn_to_action
* Update more ChibiOS keyboards to QMK
Most of them does not compile at the moment though.
* Use older version of Chibios libraries
The newest ones have problems with compilation
* Remove USB_UNCONFIGURED event
It isn't present in the older version of ChibiOS
* Fix the infinity_chibios compilation
* Fix potentially uninitialized variable
* Add missing include
* Fix the ChibiOS makefile
* Fix some Chibios keyboard compilation
* Revert the rules.mk file back to master version
* Combine the chibios and AVR makefiles
With just the required overrides in the respective platform
specific one.
* Slight makefile restrucuring
Platform specific compiler options
* Move avr specific targets out of the main rules
* Fix ChibiOS objcopy
The ChibiOS objcopy needs different parameters, so the parameters
are moved to the corresponding platform rule file
* Fix the objcopy for real this time
The comands were moved around, so chibios used avr and the ohter
way around.
Also change the objsize output format
* Fix the thumb flags
* Fix the infinity hasu keymap
* Per platform cpp flags
* Add gcc-arm-none-eabi package to travis
* Add arm-none-eabi-newlib to travis
* Fix the name of the libnewlib-arm-none-eabi lib
* Fix the ChibiOS paths
So that they are properly relative, and builds don't generate
extra folders
* Fix the board path of stm32_f103_onekey
* Only consider folders with Makefiles as subproject
2016-07-01 14:04:53 +00:00
} else {
2015-05-13 06:29:30 +00:00
print ( " NKRO: off \n " ) ;
Add ChibiOS support for QMK (#465)
* Modularity and gcc warnings fixes.
* Add ChibiOS support (USB stack + support files).
* Make usb_main more USB_DRIVER #define independent.
* Move chibios to tool.
* Implement jump-to-bootloader.
* Small updates.
* Fix bootloader-jump compiling.
* Move AVR specific sleep_led.c into avr.
* Add basic sleep_led for chibios.
* Update chibios README.
* NKRO fixes.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Add ARM Teensies bootloader code.
* Fix chibios/usb_main GET_REPORT handing.
* Add missing #include to keymap.c.
* Make bootmagic.c code portable (_delay_ms -> wait_ms).
* Move declaration of keymap_config.
Should really not declare variables in .h files - since it's included
in different .c files, a proper linker then complains that the same
variable is declared more than once (once for each .c file that the
offending .h is included in).
* Add eeprom support for chibios/kinetis.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Chibios: use WFI in idle. WIP suspend stuff.
* ChibiOS/kinetis: sending remote wakeup.
* ChibiOS/STM32: send remote wakeup.
* Fix report size of boot protocol.
* Fix drop key stroke
Keyboard report should be checked if its transfer finishs successfully.
Otherwise key stroke can be missing when other key event occurs
before the last report transfer is done.
Boot protocol 10ms interval probably causes this problem in case
it receives key events in a row within the period. NKRO protocol
suffers less or nothing due to its interval 1ms.
* Chibios/usb_main: rename a variable for clarity.
* Add correct chibios/bootloader_jump for infinity KB.
* ChibiOS: make reset request more CMSISy.
* Chibios: Add breathing sleep LED on Kinetis MCUs.
* ChibiOS: Update infinity bootloader code to match updated ChibiOS.
* ChibiOS: prettify/document sleep_led code.
* Chibios: Remove the wait in the main loop.
* Add maple mini code.
* Do timeout when writing to CONSOLE EP queue.
Fixes TMK bug #266.
* Chibios: add 'core/protocol' to the makefiles' search path.
* Chibios: Update to new USB API.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Add update for chibios in README
* Chibios: Fix a HardFault bug (wait after start).
* Chibios: cleanup usb_main code.
* Chibios: Revert common.mk change (fix AVR linking problem).
* core: Fix chibios user compile options
Compile options can be defined in project Makefile such as UDEFS, UADEFS, UINCDIR, ULIBDIR and ULIBS.
* Sysv format for ChibiOS arm-none-eabi-size
Some new patches to ChibiOS puts heap as it's own section. So the
berkeley format is now useless, as the heap will be included in the
BSS report. The sysv format displays the bss size correctly.
* Fix hard-coded path of CHIBIOS
* Add support for new version of ChibiOS and Contrib
The Kinetis support has moved to a separate Contrib repository in
the newest version of Chibios. There has also been some structure
changes. So this adds support for those, while maintaining back-
wards compability.
* Update ChibiOS instructions
* Chibios: implement sleep LED for STM32.
* Chibios: Update the main chibios README.
* Chibios: fix STM32_BOOTLOADER_ADDRESS name.
* Chibios: make the default bootloader_jump redefinable (weak).
* Chibios: disable LTO (link-time optimisation).
With LTO enabled, sometimes things fail for mysterious reasons
(e.g. bootloader jump on WF with LEDs enabled), just because the
linker optimisation is too aggressive.
* Chibios: add default location for chibios-contrib.
* ChibiOS: update mk to match chibios/master.
* ChibiOS: update instructions.md.
* Add chibi_onekey example.
* Add comments to chibi_onekey Makefile.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Add Teensy LC onekey example.
* Chibios: use WFI in idle. WIP suspend stuff.
* Update chibi/teensy instructions.
* Update chibios/Teensy instructions.
* Add infinity_chibios
* Add keymap_hasu.c
* Infinity_chibios: select correct bootloader_jump.
* Infinity_chibios: improve comments.
* Add generic STM32F103C8T6 example.
* Add maple mini code.
* STM32F103x fixes.
* Add maple mini pinout pic.
* Chibios: updates for 3.0.4 git.
* Chibios: rename example stm32_onekey -> stm32_f072_onekey.
* Chibios: add makefiles for Teensy 3.x examples.
* Chibios: update Teensy 3.x instructions.
* Chibios: Tsy LC is cortex-m0plus.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Change README for chibios
* Chibios: update examples to current chibios git.
Match the changes in mainline chibios:
- update chconf.h
- update supplied ld scripts structure
- update Teensy instructions (switch to official
chibios and introduce contrib)
* Add ChibiOS and ChibiOS-Contrib submodules
Also fix the makefile path for them.
* Moves chibios keyboards to keyboards folder
* First version of ChibiOS compilation
Only the stm32_f072_onkey keyboard is ported at the moment. It
compiles, but still doesn't link.
* More chibios fixes
It now compiles without warnings and links
* Move the teensy_lc_onekey to the keyboards folder
* Clean up the make file rule structure
* Remove keymap_fn_to_action
* Update more ChibiOS keyboards to QMK
Most of them does not compile at the moment though.
* Use older version of Chibios libraries
The newest ones have problems with compilation
* Remove USB_UNCONFIGURED event
It isn't present in the older version of ChibiOS
* Fix the infinity_chibios compilation
* Fix potentially uninitialized variable
* Add missing include
* Fix the ChibiOS makefile
* Fix some Chibios keyboard compilation
* Revert the rules.mk file back to master version
* Combine the chibios and AVR makefiles
With just the required overrides in the respective platform
specific one.
* Slight makefile restrucuring
Platform specific compiler options
* Move avr specific targets out of the main rules
* Fix ChibiOS objcopy
The ChibiOS objcopy needs different parameters, so the parameters
are moved to the corresponding platform rule file
* Fix the objcopy for real this time
The comands were moved around, so chibios used avr and the ohter
way around.
Also change the objsize output format
* Fix the thumb flags
* Fix the infinity hasu keymap
* Per platform cpp flags
* Add gcc-arm-none-eabi package to travis
* Add arm-none-eabi-newlib to travis
* Fix the name of the libnewlib-arm-none-eabi lib
* Fix the ChibiOS paths
So that they are properly relative, and builds don't generate
extra folders
* Fix the board path of stm32_f103_onekey
* Only consider folders with Makefiles as subproject
2016-07-01 14:04:53 +00:00
}
2015-04-09 16:32:04 +00:00
break ;
# endif
2016-03-28 05:03:21 +00:00
2019-08-30 18:19:03 +00:00
// switch layers
2016-03-28 05:03:21 +00:00
2019-08-30 18:19:03 +00:00
case MAGIC_KC ( MAGIC_KEY_LAYER0_ALT ) :
2016-03-28 05:03:21 +00:00
switch_default_layer ( 0 ) ;
break ;
# if MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
2019-08-30 18:19:03 +00:00
case MAGIC_KC ( MAGIC_KEY_LAYER0 ) :
2016-03-28 05:03:21 +00:00
switch_default_layer ( 0 ) ;
break ;
2019-08-30 18:19:03 +00:00
case MAGIC_KC ( MAGIC_KEY_LAYER1 ) :
2016-03-28 05:03:21 +00:00
switch_default_layer ( 1 ) ;
break ;
2019-08-30 18:19:03 +00:00
case MAGIC_KC ( MAGIC_KEY_LAYER2 ) :
2016-03-28 05:03:21 +00:00
switch_default_layer ( 2 ) ;
break ;
2019-08-30 18:19:03 +00:00
case MAGIC_KC ( MAGIC_KEY_LAYER3 ) :
2016-03-28 05:03:21 +00:00
switch_default_layer ( 3 ) ;
break ;
2019-08-30 18:19:03 +00:00
case MAGIC_KC ( MAGIC_KEY_LAYER4 ) :
2016-03-28 05:03:21 +00:00
switch_default_layer ( 4 ) ;
break ;
2019-08-30 18:19:03 +00:00
case MAGIC_KC ( MAGIC_KEY_LAYER5 ) :
2016-03-28 05:03:21 +00:00
switch_default_layer ( 5 ) ;
break ;
2019-08-30 18:19:03 +00:00
case MAGIC_KC ( MAGIC_KEY_LAYER6 ) :
2016-03-28 05:03:21 +00:00
switch_default_layer ( 6 ) ;
break ;
2019-08-30 18:19:03 +00:00
case MAGIC_KC ( MAGIC_KEY_LAYER7 ) :
2016-03-28 05:03:21 +00:00
switch_default_layer ( 7 ) ;
break ;
2019-08-30 18:19:03 +00:00
case MAGIC_KC ( MAGIC_KEY_LAYER8 ) :
2016-03-28 05:03:21 +00:00
switch_default_layer ( 8 ) ;
break ;
2019-08-30 18:19:03 +00:00
case MAGIC_KC ( MAGIC_KEY_LAYER9 ) :
2016-03-28 05:03:21 +00:00
switch_default_layer ( 9 ) ;
break ;
# endif
# if MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
case KC_F1 . . . KC_F9 :
switch_default_layer ( ( code - KC_F1 ) + 1 ) ;
break ;
2015-05-13 06:29:30 +00:00
case KC_F10 :
2015-04-09 16:32:04 +00:00
switch_default_layer ( 0 ) ;
break ;
2016-03-28 05:03:21 +00:00
# endif
# if MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
2015-04-09 16:32:04 +00:00
case KC_1 . . . KC_9 :
switch_default_layer ( ( code - KC_1 ) + 1 ) ;
break ;
2016-03-28 05:03:21 +00:00
case KC_0 :
switch_default_layer ( 0 ) ;
2015-04-09 16:32:04 +00:00
break ;
2016-03-28 05:03:21 +00:00
# endif
2015-04-09 16:32:04 +00:00
default :
print ( " ? " ) ;
return false ;
}
return true ;
}
/***********************************************************
* Command console
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2019-08-30 18:19:03 +00:00
static void command_console_help ( void ) {
2015-05-13 06:29:30 +00:00
print ( " \n \t - Console - \n "
" ESC/q: quit \n "
2015-04-09 16:32:04 +00:00
# ifdef MOUSEKEY_ENABLE
2015-05-13 06:29:30 +00:00
" m: mousekey \n "
2015-04-09 16:32:04 +00:00
# endif
2015-05-13 06:29:30 +00:00
) ;
2015-04-09 16:32:04 +00:00
}
2019-08-30 18:19:03 +00:00
static bool command_console ( uint8_t code ) {
2015-04-09 16:32:04 +00:00
switch ( code ) {
case KC_H :
case KC_SLASH : /* ? */
command_console_help ( ) ;
break ;
case KC_Q :
case KC_ESC :
command_state = ONESHOT ;
return false ;
2020-05-19 11:29:20 +00:00
# if defined(MOUSEKEY_ENABLE) && !defined(MK_3_SPEED)
2015-04-09 16:32:04 +00:00
case KC_M :
mousekey_console_help ( ) ;
2015-05-13 06:29:30 +00:00
print ( " M> " ) ;
2015-04-09 16:32:04 +00:00
command_state = MOUSEKEY ;
return true ;
# endif
default :
print ( " ? " ) ;
return false ;
}
print ( " C> " ) ;
return true ;
}
2020-05-19 11:29:20 +00:00
# if defined(MOUSEKEY_ENABLE) && !defined(MK_3_SPEED)
2015-04-09 16:32:04 +00:00
/***********************************************************
* Mousekey console
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
static uint8_t mousekey_param = 0 ;
2019-08-30 18:19:03 +00:00
static void mousekey_param_print ( void ) {
2016-09-13 01:20:31 +00:00
// Print these variables if NO_PRINT or USER_PRINT are not defined.
2019-08-30 18:19:03 +00:00
# if !defined(NO_PRINT) && !defined(USER_PRINT)
2015-05-13 06:29:30 +00:00
print ( " \n \t - Values - \n " ) ;
2019-08-30 18:19:03 +00:00
print ( " 1: delay(*10ms): " ) ;
2021-02-06 16:56:13 +00:00
print_dec ( mk_delay ) ;
2019-08-30 18:19:03 +00:00
print ( " \n " ) ;
print ( " 2: interval(ms): " ) ;
2021-02-06 16:56:13 +00:00
print_dec ( mk_interval ) ;
2019-08-30 18:19:03 +00:00
print ( " \n " ) ;
print ( " 3: max_speed: " ) ;
2021-02-06 16:56:13 +00:00
print_dec ( mk_max_speed ) ;
2019-08-30 18:19:03 +00:00
print ( " \n " ) ;
print ( " 4: time_to_max: " ) ;
2021-02-06 16:56:13 +00:00
print_dec ( mk_time_to_max ) ;
2019-08-30 18:19:03 +00:00
print ( " \n " ) ;
print ( " 5: wheel_max_speed: " ) ;
2021-02-06 16:56:13 +00:00
print_dec ( mk_wheel_max_speed ) ;
2019-08-30 18:19:03 +00:00
print ( " \n " ) ;
print ( " 6: wheel_time_to_max: " ) ;
2021-02-06 16:56:13 +00:00
print_dec ( mk_wheel_time_to_max ) ;
2019-08-30 18:19:03 +00:00
print ( " \n " ) ;
# endif /* !NO_PRINT */
2015-04-09 16:32:04 +00:00
}
2015-05-13 06:29:30 +00:00
//#define PRINT_SET_VAL(v) print(#v " = "); print_dec(v); print("\n");
2019-08-30 18:19:03 +00:00
# define PRINT_SET_VAL(v) xprintf(# v " = %d\n", (v))
static void mousekey_param_inc ( uint8_t param , uint8_t inc ) {
2015-04-09 16:32:04 +00:00
switch ( param ) {
case 1 :
if ( mk_delay + inc < UINT8_MAX )
mk_delay + = inc ;
else
mk_delay = UINT8_MAX ;
PRINT_SET_VAL ( mk_delay ) ;
break ;
case 2 :
if ( mk_interval + inc < UINT8_MAX )
mk_interval + = inc ;
else
mk_interval = UINT8_MAX ;
PRINT_SET_VAL ( mk_interval ) ;
break ;
case 3 :
if ( mk_max_speed + inc < UINT8_MAX )
mk_max_speed + = inc ;
else
mk_max_speed = UINT8_MAX ;
PRINT_SET_VAL ( mk_max_speed ) ;
break ;
case 4 :
if ( mk_time_to_max + inc < UINT8_MAX )
mk_time_to_max + = inc ;
else
mk_time_to_max = UINT8_MAX ;
PRINT_SET_VAL ( mk_time_to_max ) ;
break ;
case 5 :
if ( mk_wheel_max_speed + inc < UINT8_MAX )
mk_wheel_max_speed + = inc ;
else
mk_wheel_max_speed = UINT8_MAX ;
PRINT_SET_VAL ( mk_wheel_max_speed ) ;
break ;
case 6 :
if ( mk_wheel_time_to_max + inc < UINT8_MAX )
mk_wheel_time_to_max + = inc ;
else
mk_wheel_time_to_max = UINT8_MAX ;
PRINT_SET_VAL ( mk_wheel_time_to_max ) ;
break ;
}
}
2019-08-30 18:19:03 +00:00
static void mousekey_param_dec ( uint8_t param , uint8_t dec ) {
2015-04-09 16:32:04 +00:00
switch ( param ) {
case 1 :
if ( mk_delay > dec )
mk_delay - = dec ;
else
mk_delay = 0 ;
PRINT_SET_VAL ( mk_delay ) ;
break ;
case 2 :
if ( mk_interval > dec )
mk_interval - = dec ;
else
mk_interval = 0 ;
PRINT_SET_VAL ( mk_interval ) ;
break ;
case 3 :
if ( mk_max_speed > dec )
mk_max_speed - = dec ;
else
mk_max_speed = 0 ;
PRINT_SET_VAL ( mk_max_speed ) ;
break ;
case 4 :
if ( mk_time_to_max > dec )
mk_time_to_max - = dec ;
else
mk_time_to_max = 0 ;
PRINT_SET_VAL ( mk_time_to_max ) ;
break ;
case 5 :
if ( mk_wheel_max_speed > dec )
mk_wheel_max_speed - = dec ;
else
mk_wheel_max_speed = 0 ;
PRINT_SET_VAL ( mk_wheel_max_speed ) ;
break ;
case 6 :
if ( mk_wheel_time_to_max > dec )
mk_wheel_time_to_max - = dec ;
else
mk_wheel_time_to_max = 0 ;
PRINT_SET_VAL ( mk_wheel_time_to_max ) ;
break ;
}
}
2019-08-30 18:19:03 +00:00
static void mousekey_console_help ( void ) {
2015-05-13 06:29:30 +00:00
print ( " \n \t - Mousekey - \n "
" ESC/q: quit \n "
" 1: delay(*10ms) \n "
" 2: interval(ms) \n "
" 3: max_speed \n "
" 4: time_to_max \n "
" 5: wheel_max_speed \n "
" 6: wheel_time_to_max \n "
" \n "
" p: print values \n "
" d: set defaults \n "
" up: +1 \n "
" down: -1 \n "
" pgup: +10 \n "
" pgdown: -10 \n "
" \n "
" speed = delta * max_speed * (repeat / time_to_max) \n " ) ;
2016-04-17 17:54:32 +00:00
xprintf ( " where delta: cursor=%d, wheel=%d \n "
2019-08-30 18:19:03 +00:00
" See http://en.wikipedia.org/wiki/Mouse_keys \n " ,
MOUSEKEY_MOVE_DELTA , MOUSEKEY_WHEEL_DELTA ) ;
2015-04-09 16:32:04 +00:00
}
2019-08-30 18:19:03 +00:00
static bool mousekey_console ( uint8_t code ) {
2015-04-09 16:32:04 +00:00
switch ( code ) {
case KC_H :
case KC_SLASH : /* ? */
mousekey_console_help ( ) ;
break ;
case KC_Q :
case KC_ESC :
2015-05-13 06:29:30 +00:00
if ( mousekey_param ) {
mousekey_param = 0 ;
} else {
print ( " C> " ) ;
command_state = CONSOLE ;
return false ;
}
break ;
2015-04-09 16:32:04 +00:00
case KC_P :
mousekey_param_print ( ) ;
break ;
case KC_1 :
case KC_2 :
case KC_3 :
case KC_4 :
case KC_5 :
case KC_6 :
mousekey_param = numkey2num ( code ) ;
break ;
case KC_UP :
mousekey_param_inc ( mousekey_param , 1 ) ;
break ;
case KC_DOWN :
mousekey_param_dec ( mousekey_param , 1 ) ;
break ;
case KC_PGUP :
mousekey_param_inc ( mousekey_param , 10 ) ;
break ;
case KC_PGDN :
mousekey_param_dec ( mousekey_param , 10 ) ;
break ;
case KC_D :
2019-08-30 18:19:03 +00:00
mk_delay = MOUSEKEY_DELAY / 10 ;
mk_interval = MOUSEKEY_INTERVAL ;
mk_max_speed = MOUSEKEY_MAX_SPEED ;
mk_time_to_max = MOUSEKEY_TIME_TO_MAX ;
mk_wheel_max_speed = MOUSEKEY_WHEEL_MAX_SPEED ;
2015-04-09 16:32:04 +00:00
mk_wheel_time_to_max = MOUSEKEY_WHEEL_TIME_TO_MAX ;
2015-05-13 06:29:30 +00:00
print ( " set default \n " ) ;
2015-04-09 16:32:04 +00:00
break ;
default :
print ( " ? " ) ;
return false ;
}
Add ChibiOS support for QMK (#465)
* Modularity and gcc warnings fixes.
* Add ChibiOS support (USB stack + support files).
* Make usb_main more USB_DRIVER #define independent.
* Move chibios to tool.
* Implement jump-to-bootloader.
* Small updates.
* Fix bootloader-jump compiling.
* Move AVR specific sleep_led.c into avr.
* Add basic sleep_led for chibios.
* Update chibios README.
* NKRO fixes.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Add ARM Teensies bootloader code.
* Fix chibios/usb_main GET_REPORT handing.
* Add missing #include to keymap.c.
* Make bootmagic.c code portable (_delay_ms -> wait_ms).
* Move declaration of keymap_config.
Should really not declare variables in .h files - since it's included
in different .c files, a proper linker then complains that the same
variable is declared more than once (once for each .c file that the
offending .h is included in).
* Add eeprom support for chibios/kinetis.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Chibios: use WFI in idle. WIP suspend stuff.
* ChibiOS/kinetis: sending remote wakeup.
* ChibiOS/STM32: send remote wakeup.
* Fix report size of boot protocol.
* Fix drop key stroke
Keyboard report should be checked if its transfer finishs successfully.
Otherwise key stroke can be missing when other key event occurs
before the last report transfer is done.
Boot protocol 10ms interval probably causes this problem in case
it receives key events in a row within the period. NKRO protocol
suffers less or nothing due to its interval 1ms.
* Chibios/usb_main: rename a variable for clarity.
* Add correct chibios/bootloader_jump for infinity KB.
* ChibiOS: make reset request more CMSISy.
* Chibios: Add breathing sleep LED on Kinetis MCUs.
* ChibiOS: Update infinity bootloader code to match updated ChibiOS.
* ChibiOS: prettify/document sleep_led code.
* Chibios: Remove the wait in the main loop.
* Add maple mini code.
* Do timeout when writing to CONSOLE EP queue.
Fixes TMK bug #266.
* Chibios: add 'core/protocol' to the makefiles' search path.
* Chibios: Update to new USB API.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Add update for chibios in README
* Chibios: Fix a HardFault bug (wait after start).
* Chibios: cleanup usb_main code.
* Chibios: Revert common.mk change (fix AVR linking problem).
* core: Fix chibios user compile options
Compile options can be defined in project Makefile such as UDEFS, UADEFS, UINCDIR, ULIBDIR and ULIBS.
* Sysv format for ChibiOS arm-none-eabi-size
Some new patches to ChibiOS puts heap as it's own section. So the
berkeley format is now useless, as the heap will be included in the
BSS report. The sysv format displays the bss size correctly.
* Fix hard-coded path of CHIBIOS
* Add support for new version of ChibiOS and Contrib
The Kinetis support has moved to a separate Contrib repository in
the newest version of Chibios. There has also been some structure
changes. So this adds support for those, while maintaining back-
wards compability.
* Update ChibiOS instructions
* Chibios: implement sleep LED for STM32.
* Chibios: Update the main chibios README.
* Chibios: fix STM32_BOOTLOADER_ADDRESS name.
* Chibios: make the default bootloader_jump redefinable (weak).
* Chibios: disable LTO (link-time optimisation).
With LTO enabled, sometimes things fail for mysterious reasons
(e.g. bootloader jump on WF with LEDs enabled), just because the
linker optimisation is too aggressive.
* Chibios: add default location for chibios-contrib.
* ChibiOS: update mk to match chibios/master.
* ChibiOS: update instructions.md.
* Add chibi_onekey example.
* Add comments to chibi_onekey Makefile.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Add Teensy LC onekey example.
* Chibios: use WFI in idle. WIP suspend stuff.
* Update chibi/teensy instructions.
* Update chibios/Teensy instructions.
* Add infinity_chibios
* Add keymap_hasu.c
* Infinity_chibios: select correct bootloader_jump.
* Infinity_chibios: improve comments.
* Add generic STM32F103C8T6 example.
* Add maple mini code.
* STM32F103x fixes.
* Add maple mini pinout pic.
* Chibios: updates for 3.0.4 git.
* Chibios: rename example stm32_onekey -> stm32_f072_onekey.
* Chibios: add makefiles for Teensy 3.x examples.
* Chibios: update Teensy 3.x instructions.
* Chibios: Tsy LC is cortex-m0plus.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Change README for chibios
* Chibios: update examples to current chibios git.
Match the changes in mainline chibios:
- update chconf.h
- update supplied ld scripts structure
- update Teensy instructions (switch to official
chibios and introduce contrib)
* Add ChibiOS and ChibiOS-Contrib submodules
Also fix the makefile path for them.
* Moves chibios keyboards to keyboards folder
* First version of ChibiOS compilation
Only the stm32_f072_onkey keyboard is ported at the moment. It
compiles, but still doesn't link.
* More chibios fixes
It now compiles without warnings and links
* Move the teensy_lc_onekey to the keyboards folder
* Clean up the make file rule structure
* Remove keymap_fn_to_action
* Update more ChibiOS keyboards to QMK
Most of them does not compile at the moment though.
* Use older version of Chibios libraries
The newest ones have problems with compilation
* Remove USB_UNCONFIGURED event
It isn't present in the older version of ChibiOS
* Fix the infinity_chibios compilation
* Fix potentially uninitialized variable
* Add missing include
* Fix the ChibiOS makefile
* Fix some Chibios keyboard compilation
* Revert the rules.mk file back to master version
* Combine the chibios and AVR makefiles
With just the required overrides in the respective platform
specific one.
* Slight makefile restrucuring
Platform specific compiler options
* Move avr specific targets out of the main rules
* Fix ChibiOS objcopy
The ChibiOS objcopy needs different parameters, so the parameters
are moved to the corresponding platform rule file
* Fix the objcopy for real this time
The comands were moved around, so chibios used avr and the ohter
way around.
Also change the objsize output format
* Fix the thumb flags
* Fix the infinity hasu keymap
* Per platform cpp flags
* Add gcc-arm-none-eabi package to travis
* Add arm-none-eabi-newlib to travis
* Fix the name of the libnewlib-arm-none-eabi lib
* Fix the ChibiOS paths
So that they are properly relative, and builds don't generate
extra folders
* Fix the board path of stm32_f103_onekey
* Only consider folders with Makefiles as subproject
2016-07-01 14:04:53 +00:00
if ( mousekey_param ) {
2015-05-13 06:29:30 +00:00
xprintf ( " M%d> " , mousekey_param ) ;
Add ChibiOS support for QMK (#465)
* Modularity and gcc warnings fixes.
* Add ChibiOS support (USB stack + support files).
* Make usb_main more USB_DRIVER #define independent.
* Move chibios to tool.
* Implement jump-to-bootloader.
* Small updates.
* Fix bootloader-jump compiling.
* Move AVR specific sleep_led.c into avr.
* Add basic sleep_led for chibios.
* Update chibios README.
* NKRO fixes.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Add ARM Teensies bootloader code.
* Fix chibios/usb_main GET_REPORT handing.
* Add missing #include to keymap.c.
* Make bootmagic.c code portable (_delay_ms -> wait_ms).
* Move declaration of keymap_config.
Should really not declare variables in .h files - since it's included
in different .c files, a proper linker then complains that the same
variable is declared more than once (once for each .c file that the
offending .h is included in).
* Add eeprom support for chibios/kinetis.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Chibios: use WFI in idle. WIP suspend stuff.
* ChibiOS/kinetis: sending remote wakeup.
* ChibiOS/STM32: send remote wakeup.
* Fix report size of boot protocol.
* Fix drop key stroke
Keyboard report should be checked if its transfer finishs successfully.
Otherwise key stroke can be missing when other key event occurs
before the last report transfer is done.
Boot protocol 10ms interval probably causes this problem in case
it receives key events in a row within the period. NKRO protocol
suffers less or nothing due to its interval 1ms.
* Chibios/usb_main: rename a variable for clarity.
* Add correct chibios/bootloader_jump for infinity KB.
* ChibiOS: make reset request more CMSISy.
* Chibios: Add breathing sleep LED on Kinetis MCUs.
* ChibiOS: Update infinity bootloader code to match updated ChibiOS.
* ChibiOS: prettify/document sleep_led code.
* Chibios: Remove the wait in the main loop.
* Add maple mini code.
* Do timeout when writing to CONSOLE EP queue.
Fixes TMK bug #266.
* Chibios: add 'core/protocol' to the makefiles' search path.
* Chibios: Update to new USB API.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Add update for chibios in README
* Chibios: Fix a HardFault bug (wait after start).
* Chibios: cleanup usb_main code.
* Chibios: Revert common.mk change (fix AVR linking problem).
* core: Fix chibios user compile options
Compile options can be defined in project Makefile such as UDEFS, UADEFS, UINCDIR, ULIBDIR and ULIBS.
* Sysv format for ChibiOS arm-none-eabi-size
Some new patches to ChibiOS puts heap as it's own section. So the
berkeley format is now useless, as the heap will be included in the
BSS report. The sysv format displays the bss size correctly.
* Fix hard-coded path of CHIBIOS
* Add support for new version of ChibiOS and Contrib
The Kinetis support has moved to a separate Contrib repository in
the newest version of Chibios. There has also been some structure
changes. So this adds support for those, while maintaining back-
wards compability.
* Update ChibiOS instructions
* Chibios: implement sleep LED for STM32.
* Chibios: Update the main chibios README.
* Chibios: fix STM32_BOOTLOADER_ADDRESS name.
* Chibios: make the default bootloader_jump redefinable (weak).
* Chibios: disable LTO (link-time optimisation).
With LTO enabled, sometimes things fail for mysterious reasons
(e.g. bootloader jump on WF with LEDs enabled), just because the
linker optimisation is too aggressive.
* Chibios: add default location for chibios-contrib.
* ChibiOS: update mk to match chibios/master.
* ChibiOS: update instructions.md.
* Add chibi_onekey example.
* Add comments to chibi_onekey Makefile.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Add Teensy LC onekey example.
* Chibios: use WFI in idle. WIP suspend stuff.
* Update chibi/teensy instructions.
* Update chibios/Teensy instructions.
* Add infinity_chibios
* Add keymap_hasu.c
* Infinity_chibios: select correct bootloader_jump.
* Infinity_chibios: improve comments.
* Add generic STM32F103C8T6 example.
* Add maple mini code.
* STM32F103x fixes.
* Add maple mini pinout pic.
* Chibios: updates for 3.0.4 git.
* Chibios: rename example stm32_onekey -> stm32_f072_onekey.
* Chibios: add makefiles for Teensy 3.x examples.
* Chibios: update Teensy 3.x instructions.
* Chibios: Tsy LC is cortex-m0plus.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Change README for chibios
* Chibios: update examples to current chibios git.
Match the changes in mainline chibios:
- update chconf.h
- update supplied ld scripts structure
- update Teensy instructions (switch to official
chibios and introduce contrib)
* Add ChibiOS and ChibiOS-Contrib submodules
Also fix the makefile path for them.
* Moves chibios keyboards to keyboards folder
* First version of ChibiOS compilation
Only the stm32_f072_onkey keyboard is ported at the moment. It
compiles, but still doesn't link.
* More chibios fixes
It now compiles without warnings and links
* Move the teensy_lc_onekey to the keyboards folder
* Clean up the make file rule structure
* Remove keymap_fn_to_action
* Update more ChibiOS keyboards to QMK
Most of them does not compile at the moment though.
* Use older version of Chibios libraries
The newest ones have problems with compilation
* Remove USB_UNCONFIGURED event
It isn't present in the older version of ChibiOS
* Fix the infinity_chibios compilation
* Fix potentially uninitialized variable
* Add missing include
* Fix the ChibiOS makefile
* Fix some Chibios keyboard compilation
* Revert the rules.mk file back to master version
* Combine the chibios and AVR makefiles
With just the required overrides in the respective platform
specific one.
* Slight makefile restrucuring
Platform specific compiler options
* Move avr specific targets out of the main rules
* Fix ChibiOS objcopy
The ChibiOS objcopy needs different parameters, so the parameters
are moved to the corresponding platform rule file
* Fix the objcopy for real this time
The comands were moved around, so chibios used avr and the ohter
way around.
Also change the objsize output format
* Fix the thumb flags
* Fix the infinity hasu keymap
* Per platform cpp flags
* Add gcc-arm-none-eabi package to travis
* Add arm-none-eabi-newlib to travis
* Fix the name of the libnewlib-arm-none-eabi lib
* Fix the ChibiOS paths
So that they are properly relative, and builds don't generate
extra folders
* Fix the board path of stm32_f103_onekey
* Only consider folders with Makefiles as subproject
2016-07-01 14:04:53 +00:00
} else {
2019-08-30 18:19:03 +00:00
print ( " M> " ) ;
Add ChibiOS support for QMK (#465)
* Modularity and gcc warnings fixes.
* Add ChibiOS support (USB stack + support files).
* Make usb_main more USB_DRIVER #define independent.
* Move chibios to tool.
* Implement jump-to-bootloader.
* Small updates.
* Fix bootloader-jump compiling.
* Move AVR specific sleep_led.c into avr.
* Add basic sleep_led for chibios.
* Update chibios README.
* NKRO fixes.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Add ARM Teensies bootloader code.
* Fix chibios/usb_main GET_REPORT handing.
* Add missing #include to keymap.c.
* Make bootmagic.c code portable (_delay_ms -> wait_ms).
* Move declaration of keymap_config.
Should really not declare variables in .h files - since it's included
in different .c files, a proper linker then complains that the same
variable is declared more than once (once for each .c file that the
offending .h is included in).
* Add eeprom support for chibios/kinetis.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Chibios: use WFI in idle. WIP suspend stuff.
* ChibiOS/kinetis: sending remote wakeup.
* ChibiOS/STM32: send remote wakeup.
* Fix report size of boot protocol.
* Fix drop key stroke
Keyboard report should be checked if its transfer finishs successfully.
Otherwise key stroke can be missing when other key event occurs
before the last report transfer is done.
Boot protocol 10ms interval probably causes this problem in case
it receives key events in a row within the period. NKRO protocol
suffers less or nothing due to its interval 1ms.
* Chibios/usb_main: rename a variable for clarity.
* Add correct chibios/bootloader_jump for infinity KB.
* ChibiOS: make reset request more CMSISy.
* Chibios: Add breathing sleep LED on Kinetis MCUs.
* ChibiOS: Update infinity bootloader code to match updated ChibiOS.
* ChibiOS: prettify/document sleep_led code.
* Chibios: Remove the wait in the main loop.
* Add maple mini code.
* Do timeout when writing to CONSOLE EP queue.
Fixes TMK bug #266.
* Chibios: add 'core/protocol' to the makefiles' search path.
* Chibios: Update to new USB API.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Add update for chibios in README
* Chibios: Fix a HardFault bug (wait after start).
* Chibios: cleanup usb_main code.
* Chibios: Revert common.mk change (fix AVR linking problem).
* core: Fix chibios user compile options
Compile options can be defined in project Makefile such as UDEFS, UADEFS, UINCDIR, ULIBDIR and ULIBS.
* Sysv format for ChibiOS arm-none-eabi-size
Some new patches to ChibiOS puts heap as it's own section. So the
berkeley format is now useless, as the heap will be included in the
BSS report. The sysv format displays the bss size correctly.
* Fix hard-coded path of CHIBIOS
* Add support for new version of ChibiOS and Contrib
The Kinetis support has moved to a separate Contrib repository in
the newest version of Chibios. There has also been some structure
changes. So this adds support for those, while maintaining back-
wards compability.
* Update ChibiOS instructions
* Chibios: implement sleep LED for STM32.
* Chibios: Update the main chibios README.
* Chibios: fix STM32_BOOTLOADER_ADDRESS name.
* Chibios: make the default bootloader_jump redefinable (weak).
* Chibios: disable LTO (link-time optimisation).
With LTO enabled, sometimes things fail for mysterious reasons
(e.g. bootloader jump on WF with LEDs enabled), just because the
linker optimisation is too aggressive.
* Chibios: add default location for chibios-contrib.
* ChibiOS: update mk to match chibios/master.
* ChibiOS: update instructions.md.
* Add chibi_onekey example.
* Add comments to chibi_onekey Makefile.
* Rename some Makefile defines.
* Move STM32 bootloader address config to separate .h file.
* Rename chibios example keyboard.
* Move chibios/cortex selection to local Makefiles.
* Add Teensy LC onekey example.
* Chibios: use WFI in idle. WIP suspend stuff.
* Update chibi/teensy instructions.
* Update chibios/Teensy instructions.
* Add infinity_chibios
* Add keymap_hasu.c
* Infinity_chibios: select correct bootloader_jump.
* Infinity_chibios: improve comments.
* Add generic STM32F103C8T6 example.
* Add maple mini code.
* STM32F103x fixes.
* Add maple mini pinout pic.
* Chibios: updates for 3.0.4 git.
* Chibios: rename example stm32_onekey -> stm32_f072_onekey.
* Chibios: add makefiles for Teensy 3.x examples.
* Chibios: update Teensy 3.x instructions.
* Chibios: Tsy LC is cortex-m0plus.
* Chibios: add more guards for transmitting (fix a deadlock bug).
* Change README for chibios
* Chibios: update examples to current chibios git.
Match the changes in mainline chibios:
- update chconf.h
- update supplied ld scripts structure
- update Teensy instructions (switch to official
chibios and introduce contrib)
* Add ChibiOS and ChibiOS-Contrib submodules
Also fix the makefile path for them.
* Moves chibios keyboards to keyboards folder
* First version of ChibiOS compilation
Only the stm32_f072_onkey keyboard is ported at the moment. It
compiles, but still doesn't link.
* More chibios fixes
It now compiles without warnings and links
* Move the teensy_lc_onekey to the keyboards folder
* Clean up the make file rule structure
* Remove keymap_fn_to_action
* Update more ChibiOS keyboards to QMK
Most of them does not compile at the moment though.
* Use older version of Chibios libraries
The newest ones have problems with compilation
* Remove USB_UNCONFIGURED event
It isn't present in the older version of ChibiOS
* Fix the infinity_chibios compilation
* Fix potentially uninitialized variable
* Add missing include
* Fix the ChibiOS makefile
* Fix some Chibios keyboard compilation
* Revert the rules.mk file back to master version
* Combine the chibios and AVR makefiles
With just the required overrides in the respective platform
specific one.
* Slight makefile restrucuring
Platform specific compiler options
* Move avr specific targets out of the main rules
* Fix ChibiOS objcopy
The ChibiOS objcopy needs different parameters, so the parameters
are moved to the corresponding platform rule file
* Fix the objcopy for real this time
The comands were moved around, so chibios used avr and the ohter
way around.
Also change the objsize output format
* Fix the thumb flags
* Fix the infinity hasu keymap
* Per platform cpp flags
* Add gcc-arm-none-eabi package to travis
* Add arm-none-eabi-newlib to travis
* Fix the name of the libnewlib-arm-none-eabi lib
* Fix the ChibiOS paths
So that they are properly relative, and builds don't generate
extra folders
* Fix the board path of stm32_f103_onekey
* Only consider folders with Makefiles as subproject
2016-07-01 14:04:53 +00:00
}
2015-04-09 16:32:04 +00:00
return true ;
}
# endif
/***********************************************************
* Utilities
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2019-08-30 18:19:03 +00:00
uint8_t numkey2num ( uint8_t code ) {
2015-04-09 16:32:04 +00:00
switch ( code ) {
2019-08-30 18:19:03 +00:00
case KC_1 :
return 1 ;
case KC_2 :
return 2 ;
case KC_3 :
return 3 ;
case KC_4 :
return 4 ;
case KC_5 :
return 5 ;
case KC_6 :
return 6 ;
case KC_7 :
return 7 ;
case KC_8 :
return 8 ;
case KC_9 :
return 9 ;
case KC_0 :
return 0 ;
2015-04-09 16:32:04 +00:00
}
return 0 ;
}
2019-08-30 18:19:03 +00:00
static void switch_default_layer ( uint8_t layer ) {
2015-05-13 06:29:30 +00:00
xprintf ( " L%d \n " , layer ) ;
2019-08-30 18:19:03 +00:00
default_layer_set ( 1UL < < layer ) ;
2015-04-09 16:32:04 +00:00
clear_keyboard ( ) ;
}