Update mtei's keymap (helix/rev2:five_rows, helix/pico:mtei, helix/rev3_5rows:five_rows) (#16966)
* add users/mtei/key_blocks.h
This change does not alter the binary of the build result.
Moved common macro definitions in the following files to users/mtei/key_blocks.h.
 * keyboards/helix/rev2/keymaps/five_rows/keymap.c
 * keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c
* remove INIT_HELIX_OLED() in helix:five_rows
This change does not alter the binary of the build result.
* update helix/pico/keymaps/mtei/keymap.c
Changed helix/pico/keymaps/mtei/keymap.c to use users/mtei/key_blocks.h.
This change does not alter the binary of the build result.
* Remove old SSD1306OLED code from users/mtei/oled_display.c
This change does not alter the binary of the build result.
* add options ENABLE_COLEMAK, ENABLE_DVORAK and ENABLE_EUCALYN into five_rows/keymap.c
* add users/mtei/{config.h,rules.mk,user_featues.mk,user_options.mk}
* move layer_names[] from users/mtei/oled_display.c to keymaps/five_rows/keymap.c
* Update keyboards/helix/pico/keymaps/mtei/config.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/helix/pico/keymaps/mtei/config.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/helix/pico/keymaps/mtei/keymap.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/helix/rev2/keymaps/five_rows/config.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/helix/rev2/keymaps/five_rows/config.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/helix/rev2/keymaps/five_rows/keymap.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/helix/rev3_5rows/keymaps/five_rows/config.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update users/mtei/config.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update users/mtei/config.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update users/mtei/cpp_map.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update users/mtei/cpp_map.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update users/mtei/debug_config.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update users/mtei/debug_config.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update users/mtei/layer_number_util.h
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
			
			
This commit is contained in:
		
							parent
							
								
									d241e80533
								
							
						
					
					
						commit
						33d568e29b
					
				
					 23 changed files with 609 additions and 679 deletions
				
			
		
							
								
								
									
										46
									
								
								users/mtei/config.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								users/mtei/config.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,46 @@
 | 
			
		|||
// Copyright (c) 2022 Takeshi Ishii (mtei@github)
 | 
			
		||||
// SPDX-License-Identifier: GPL-2.0-or-later
 | 
			
		||||
 | 
			
		||||
// clang-format off
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
// Selection of RGBLIGHT MODE to use.
 | 
			
		||||
#undef RGBLIGHT_ANIMATIONS
 | 
			
		||||
#undef RGBLIGHT_EFFECT_BREATHING
 | 
			
		||||
#undef RGBLIGHT_EFFECT_RAINBOW_MOOD
 | 
			
		||||
#undef RGBLIGHT_EFFECT_RAINBOW_SWIRL
 | 
			
		||||
#undef RGBLIGHT_EFFECT_SNAKE
 | 
			
		||||
#undef RGBLIGHT_EFFECT_KNIGHT
 | 
			
		||||
#undef RGBLIGHT_EFFECT_CHRISTMAS
 | 
			
		||||
#undef RGBLIGHT_EFFECT_STATIC_GRADIENT
 | 
			
		||||
#undef RGBLIGHT_EFFECT_RGB_TEST
 | 
			
		||||
#undef RGBLIGHT_EFFECT_ALTERNATING
 | 
			
		||||
 | 
			
		||||
#if defined(LED_ANIMATIONS)
 | 
			
		||||
#    if LED_ANIMATIONS_LEVEL > 1
 | 
			
		||||
#        define RGBLIGHT_EFFECT_BREATHING
 | 
			
		||||
#        define RGBLIGHT_EFFECT_RAINBOW_MOOD
 | 
			
		||||
#        define RGBLIGHT_EFFECT_RAINBOW_SWIRL
 | 
			
		||||
//#        define RGBLIGHT_EFFECT_SNAKE
 | 
			
		||||
//#        define RGBLIGHT_EFFECT_KNIGHT
 | 
			
		||||
#        define RGBLIGHT_EFFECT_CHRISTMAS
 | 
			
		||||
#        define RGBLIGHT_EFFECT_STATIC_GRADIENT
 | 
			
		||||
//#        define RGBLIGHT_EFFECT_RGB_TEST
 | 
			
		||||
//#        define RGBLIGHT_EFFECT_ALTERNATING
 | 
			
		||||
#    else
 | 
			
		||||
#        define RGBLIGHT_EFFECT_BREATHING
 | 
			
		||||
#        define RGBLIGHT_EFFECT_RAINBOW_MOOD
 | 
			
		||||
//#        define RGBLIGHT_EFFECT_RAINBOW_SWIRL
 | 
			
		||||
//#        define RGBLIGHT_EFFECT_SNAKE
 | 
			
		||||
//#        define RGBLIGHT_EFFECT_KNIGHT
 | 
			
		||||
//#        define RGBLIGHT_EFFECT_CHRISTMAS
 | 
			
		||||
#        define RGBLIGHT_EFFECT_STATIC_GRADIENT
 | 
			
		||||
//#        define RGBLIGHT_EFFECT_RGB_TEST
 | 
			
		||||
//#        define RGBLIGHT_EFFECT_ALTERNATING
 | 
			
		||||
#        endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef DEBUG_CONFIG
 | 
			
		||||
#  include "debug_config.h"
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										84
									
								
								users/mtei/cpp_map.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								users/mtei/cpp_map.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,84 @@
 | 
			
		|||
// Copyright (c) 2021 Takeshi Ishii (mtei@github)
 | 
			
		||||
// SPDX-License-Identifier: MIT
 | 
			
		||||
 | 
			
		||||
// See here for how to use this. (https://github.com/mtei/bare_metal_parts/tree/master/cpp/map)
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
// clang-format off
 | 
			
		||||
 | 
			
		||||
#define _MAP1(E,ET, _1) ET(_1)
 | 
			
		||||
#define _MAP2(E,ET, _1,_2) E(_1) ET(_2)
 | 
			
		||||
#define _MAP3(E,ET, _1,_2,_3) E(_1) E(_2) ET(_3)
 | 
			
		||||
#define _MAP4(E,ET, _1,_2,_3,_4) E(_1) E(_2) E(_3) ET(_4)
 | 
			
		||||
#define _MAP5(E,ET, _1,_2,_3,_4,_5) E(_1) E(_2) E(_3) E(_4) ET(_5)
 | 
			
		||||
#define _MAP6(E,ET, _1,_2,_3,_4,_5,_6) E(_1) E(_2) E(_3) E(_4) E(_5) ET(_6)
 | 
			
		||||
#define _MAP7(E,ET, _1,_2,_3,_4,_5,_6,_7) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) ET(_7)
 | 
			
		||||
#define _MAP8(E,ET, _1,_2,_3,_4,_5,_6,_7,_8) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) ET(_8)
 | 
			
		||||
#define _MAP9(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) ET(_9)
 | 
			
		||||
#define _MAP10(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) ET(_10)
 | 
			
		||||
#define _MAP11(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) ET(_11)
 | 
			
		||||
#define _MAP12(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) ET(_12)
 | 
			
		||||
#define _MAP13(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) ET(_13)
 | 
			
		||||
#define _MAP14(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) ET(_14)
 | 
			
		||||
#define _MAP15(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) ET(_15)
 | 
			
		||||
#define _MAP16(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) ET(_16)
 | 
			
		||||
#define _MAP17(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) ET(_17)
 | 
			
		||||
#define _MAP18(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) ET(_18)
 | 
			
		||||
#define _MAP19(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) ET(_19)
 | 
			
		||||
#define _MAP20(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) E(_19) ET(_20)
 | 
			
		||||
#define _MAP21(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) E(_19) E(_20) ET(_21)
 | 
			
		||||
#define _MAP22(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) E(_19) E(_20) E(_21) ET(_22)
 | 
			
		||||
#define _MAP23(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) E(_19) E(_20) E(_21) E(_22) ET(_23)
 | 
			
		||||
#define _MAP24(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) E(_19) E(_20) E(_21) E(_22) E(_23) ET(_24)
 | 
			
		||||
#define _MAP25(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) E(_19) E(_20) E(_21) E(_22) E(_23) E(_24) ET(_25)
 | 
			
		||||
#define _MAP26(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) E(_19) E(_20) E(_21) E(_22) E(_23) E(_24) E(_25) ET(_26)
 | 
			
		||||
#define _MAP27(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) E(_19) E(_20) E(_21) E(_22) E(_23) E(_24) E(_25) E(_26) ET(_27)
 | 
			
		||||
#define _MAP28(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) E(_19) E(_20) E(_21) E(_22) E(_23) E(_24) E(_25) E(_26) E(_27) ET(_28)
 | 
			
		||||
#define _MAP29(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) E(_19) E(_20) E(_21) E(_22) E(_23) E(_24) E(_25) E(_26) E(_27) E(_28) ET(_29)
 | 
			
		||||
#define _MAP30(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) E(_19) E(_20) E(_21) E(_22) E(_23) E(_24) E(_25) E(_26) E(_27) E(_28) E(_29) ET(_30)
 | 
			
		||||
#define _MAP31(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) E(_19) E(_20) E(_21) E(_22) E(_23) E(_24) E(_25) E(_26) E(_27) E(_28) E(_29) E(_30) ET(_31)
 | 
			
		||||
#define _MAP32(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) E(_9) E(_10) E(_11) E(_12) E(_13) E(_14) E(_15) E(_16) E(_17) E(_18) E(_19) E(_20) E(_21) E(_22) E(_23) E(_24) E(_25) E(_26) E(_27) E(_28) E(_29) E(_30) E(_31) ET(_32)
 | 
			
		||||
 | 
			
		||||
#define SELECT_MAP(e,et,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,NAME,...) NAME
 | 
			
		||||
#define MAPT(E,ET,...) SELECT_MAP(E,ET,__VA_ARGS__,_MAP32,_MAP31,_MAP30,_MAP29,_MAP28,_MAP27,_MAP26,_MAP25,_MAP24,_MAP23,_MAP22,_MAP21,_MAP20,_MAP19,_MAP18,_MAP17,_MAP16,_MAP15,_MAP14,_MAP13,_MAP12,_MAP11,_MAP10,_MAP9,_MAP8,_MAP7,_MAP6,_MAP5,_MAP4,_MAP3,_MAP2,_MAP1)(E,ET,__VA_ARGS__)
 | 
			
		||||
#define MAP(E,...) MAPT(E,E,__VA_ARGS__)
 | 
			
		||||
 | 
			
		||||
#define _MAP_INDEX1(E,ET, _1) ET(0,_1)
 | 
			
		||||
#define _MAP_INDEX2(E,ET, _1,_2) E(0,_1) ET(1,_2)
 | 
			
		||||
#define _MAP_INDEX3(E,ET, _1,_2,_3) E(0,_1) E(1,_2) ET(2,_3)
 | 
			
		||||
#define _MAP_INDEX4(E,ET, _1,_2,_3,_4) E(0,_1) E(1,_2) E(2,_3) ET(3,_4)
 | 
			
		||||
#define _MAP_INDEX5(E,ET, _1,_2,_3,_4,_5) E(0,_1) E(1,_2) E(2,_3) E(3,_4) ET(4,_5)
 | 
			
		||||
#define _MAP_INDEX6(E,ET, _1,_2,_3,_4,_5,_6) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) ET(5,_6)
 | 
			
		||||
#define _MAP_INDEX7(E,ET, _1,_2,_3,_4,_5,_6,_7) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) ET(6,_7)
 | 
			
		||||
#define _MAP_INDEX8(E,ET, _1,_2,_3,_4,_5,_6,_7,_8) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) ET(7,_8)
 | 
			
		||||
#define _MAP_INDEX9(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) ET(8,_9)
 | 
			
		||||
#define _MAP_INDEX10(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) ET(9,_10)
 | 
			
		||||
#define _MAP_INDEX11(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) ET(10,_11)
 | 
			
		||||
#define _MAP_INDEX12(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) ET(11,_12)
 | 
			
		||||
#define _MAP_INDEX13(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) ET(12,_13)
 | 
			
		||||
#define _MAP_INDEX14(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) ET(13,_14)
 | 
			
		||||
#define _MAP_INDEX15(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) ET(14,_15)
 | 
			
		||||
#define _MAP_INDEX16(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) ET(15,_16)
 | 
			
		||||
#define _MAP_INDEX17(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) ET(16,_17)
 | 
			
		||||
#define _MAP_INDEX18(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) ET(17,_18)
 | 
			
		||||
#define _MAP_INDEX19(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) ET(18,_19)
 | 
			
		||||
#define _MAP_INDEX20(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) E(18,_19) ET(19,_20)
 | 
			
		||||
#define _MAP_INDEX21(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) E(18,_19) E(19,_20) ET(20,_21)
 | 
			
		||||
#define _MAP_INDEX22(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) E(18,_19) E(19,_20) E(20,_21) ET(21,_22)
 | 
			
		||||
#define _MAP_INDEX23(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) E(18,_19) E(19,_20) E(20,_21) E(21,_22) ET(22,_23)
 | 
			
		||||
#define _MAP_INDEX24(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) E(18,_19) E(19,_20) E(20,_21) E(21,_22) E(22,_23) ET(23,_24)
 | 
			
		||||
#define _MAP_INDEX25(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) E(18,_19) E(19,_20) E(20,_21) E(21,_22) E(22,_23) E(23,_24) ET(24,_25)
 | 
			
		||||
#define _MAP_INDEX26(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) E(18,_19) E(19,_20) E(20,_21) E(21,_22) E(22,_23) E(23,_24) E(24,_25) ET(25,_26)
 | 
			
		||||
#define _MAP_INDEX27(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) E(18,_19) E(19,_20) E(20,_21) E(21,_22) E(22,_23) E(23,_24) E(24,_25) E(25,_26) ET(26,_27)
 | 
			
		||||
#define _MAP_INDEX28(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) E(18,_19) E(19,_20) E(20,_21) E(21,_22) E(22,_23) E(23,_24) E(24,_25) E(25,_26) E(26,_27) ET(27,_28)
 | 
			
		||||
#define _MAP_INDEX29(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) E(18,_19) E(19,_20) E(20,_21) E(21,_22) E(22,_23) E(23,_24) E(24,_25) E(25,_26) E(26,_27) E(27,_28) ET(28,_29)
 | 
			
		||||
#define _MAP_INDEX30(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) E(18,_19) E(19,_20) E(20,_21) E(21,_22) E(22,_23) E(23,_24) E(24,_25) E(25,_26) E(26,_27) E(27,_28) E(28,_29) ET(29,_30)
 | 
			
		||||
#define _MAP_INDEX31(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) E(18,_19) E(19,_20) E(20,_21) E(21,_22) E(22,_23) E(23,_24) E(24,_25) E(25,_26) E(26,_27) E(27,_28) E(28,_29) E(29,_30) ET(30,_31)
 | 
			
		||||
#define _MAP_INDEX32(E,ET, _1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32) E(0,_1) E(1,_2) E(2,_3) E(3,_4) E(4,_5) E(5,_6) E(6,_7) E(7,_8) E(8,_9) E(9,_10) E(10,_11) E(11,_12) E(12,_13) E(13,_14) E(14,_15) E(15,_16) E(16,_17) E(17,_18) E(18,_19) E(19,_20) E(20,_21) E(21,_22) E(22,_23) E(23,_24) E(24,_25) E(25,_26) E(26,_27) E(27,_28) E(28,_29) E(29,_30) E(30,_31) ET(31,_32)
 | 
			
		||||
 | 
			
		||||
#define SELECT_MAP_INDEX(e,et,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,NAME,...) NAME
 | 
			
		||||
#define MAPT_INDEX(E,ET,...) SELECT_MAP_INDEX(E,ET,__VA_ARGS__,_MAP_INDEX32,_MAP_INDEX31,_MAP_INDEX30,_MAP_INDEX29,_MAP_INDEX28,_MAP_INDEX27,_MAP_INDEX26,_MAP_INDEX25,_MAP_INDEX24,_MAP_INDEX23,_MAP_INDEX22,_MAP_INDEX21,_MAP_INDEX20,_MAP_INDEX19,_MAP_INDEX18,_MAP_INDEX17,_MAP_INDEX16,_MAP_INDEX15,_MAP_INDEX14,_MAP_INDEX13,_MAP_INDEX12,_MAP_INDEX11,_MAP_INDEX10,_MAP_INDEX9,_MAP_INDEX8,_MAP_INDEX7,_MAP_INDEX6,_MAP_INDEX5,_MAP_INDEX4,_MAP_INDEX3,_MAP_INDEX2,_MAP_INDEX1)(E,ET,__VA_ARGS__)
 | 
			
		||||
#define MAP_INDEX(E,...) MAPT_INDEX(E,E,__VA_ARGS__)
 | 
			
		||||
 | 
			
		||||
#define SELECT_ITEM_COUNT(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_30,_31,_32,NAME,...) NAME
 | 
			
		||||
#define GET_ITEM_COUNT(...) SELECT_ITEM_COUNT(__VA_ARGS__,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1)
 | 
			
		||||
							
								
								
									
										6
									
								
								users/mtei/debug_config.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								users/mtei/debug_config.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
// Copyright (c) 2022 Takeshi Ishii (mtei@github)
 | 
			
		||||
// SPDX-License-Identifier: GPL-2.0-or-later
 | 
			
		||||
 | 
			
		||||
// clang-format off
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
							
								
								
									
										33
									
								
								users/mtei/encoder_update_user.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								users/mtei/encoder_update_user.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,33 @@
 | 
			
		|||
// Copyright (c) 2022 Takeshi Ishii (mtei@github)
 | 
			
		||||
// SPDX-License-Identifier: GPL-2.0-or-later
 | 
			
		||||
 | 
			
		||||
#include QMK_KEYBOARD_H
 | 
			
		||||
 | 
			
		||||
/* weak reference */ __attribute__((weak))
 | 
			
		||||
int get_encoder_over_count(void);
 | 
			
		||||
 | 
			
		||||
bool encoder_update_user(uint8_t index, bool clockwise) {
 | 
			
		||||
#ifndef ENCODER_DETECT_OVER_SPEED
 | 
			
		||||
    switch (index) {
 | 
			
		||||
    /* Left side encoder */
 | 
			
		||||
    case 0: tap_code(clockwise ? KC_LEFT : KC_RGHT); break;
 | 
			
		||||
    /* Right side encoder */
 | 
			
		||||
    case 1: tap_code(clockwise ? KC_DOWN : KC_UP); break;
 | 
			
		||||
    }
 | 
			
		||||
#else
 | 
			
		||||
    // Is there a get_encoder_over_count() in quantum/encoder.c
 | 
			
		||||
    if (get_encoder_over_count != NULL) {
 | 
			
		||||
        int enc_over = get_encoder_over_count();
 | 
			
		||||
        for (; enc_over > 0; enc_over--) {
 | 
			
		||||
            tap_code(KC_MINUS);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    switch (index) {
 | 
			
		||||
    case 0: tap_code(clockwise ? KC_A : KC_B); break;
 | 
			
		||||
    case 1: tap_code(clockwise ? KC_C : KC_D); break;
 | 
			
		||||
    case 2: tap_code(clockwise ? KC_E : KC_F); break;
 | 
			
		||||
    case 3: tap_code(clockwise ? KC_G : KC_H); break;
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										40
									
								
								users/mtei/key_blocks.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								users/mtei/key_blocks.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,40 @@
 | 
			
		|||
// Copyright (c) 2022 Takeshi Ishii (mtei@github)
 | 
			
		||||
// SPDX-License-Identifier: GPL-2.0-or-later
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#define _1_____2_____3_____4_____5    KC_1, KC_2, KC_3, KC_4, KC_5
 | 
			
		||||
#define _6_____7_____8_____9_____0    KC_6, KC_7, KC_8, KC_9, KC_0
 | 
			
		||||
#define F1____F2____F3____F4____F5    KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
 | 
			
		||||
#define F6____F7____F8____F9____F10   KC_F6, KC_F7, KC_F8, KC_F9, KC_F10
 | 
			
		||||
 | 
			
		||||
/* Qwerty */
 | 
			
		||||
#define Q_____W_____E_____R_____T     KC_Q, KC_W, KC_E, KC_R, KC_T
 | 
			
		||||
#define Y_____U_____I_____O_____P     KC_Y, KC_U, KC_I, KC_O, KC_P
 | 
			
		||||
#define A_____S_____D_____F_____G     KC_A, KC_S, KC_D, KC_F, KC_G
 | 
			
		||||
#define H_____J_____K_____L____SCLN   KC_H, KC_J, KC_K, KC_L, KC_SCLN
 | 
			
		||||
#define Z_____X_____C_____V_____B     KC_Z, KC_X, KC_C, KC_V, KC_B
 | 
			
		||||
#define N_____M____COMM__DOT___SLSH   KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH
 | 
			
		||||
 | 
			
		||||
/* Colemak */
 | 
			
		||||
#define Q_____W_____F_____P_____G     KC_Q, KC_W, KC_F, KC_P, KC_G
 | 
			
		||||
#define J_____L_____U_____Y____SCLN   KC_J, KC_L, KC_U, KC_Y, KC_SCLN
 | 
			
		||||
#define A_____R_____S_____T_____D     KC_A, KC_R, KC_S, KC_T, KC_D
 | 
			
		||||
#define H_____N_____E_____I_____O     KC_H, KC_N, KC_E, KC_I, KC_O
 | 
			
		||||
//      Z_____X_____C_____V_____B     KC_Z, KC_X, KC_C, KC_V, KC_B
 | 
			
		||||
#define K_____M____COMM__DOT___SLSH   KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH
 | 
			
		||||
 | 
			
		||||
/* Dvorak */
 | 
			
		||||
#define QUOT_COMM___DOT____P_____Y   KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
 | 
			
		||||
#define  F_____G_____C_____R_____L   KC_F, KC_G, KC_C, KC_R, KC_L
 | 
			
		||||
#define  A_____O_____E_____U_____I   KC_A, KC_O, KC_E, KC_U, KC_I
 | 
			
		||||
#define  D_____H_____T_____N_____S   KC_D, KC_H, KC_T, KC_N, KC_S
 | 
			
		||||
#define SCLN___Q_____J_____K_____X   KC_SCLN, KC_Q, KC_J, KC_K, KC_X
 | 
			
		||||
#define  B_____M_____W_____V_____Z   KC_B, KC_M, KC_W, KC_V, KC_Z
 | 
			
		||||
 | 
			
		||||
/* Eucalyn rev3 (http://eucalyn.hatenadiary.jp/entry/about-eucalyn-layout) */
 | 
			
		||||
#define Q_____W___COMM___DOT__SCLN   KC_Q, KC_W, KC_COMM, KC_DOT, KC_SCLN
 | 
			
		||||
#define M_____R_____D_____Y_____P    KC_M, KC_R, KC_D, KC_Y, KC_P
 | 
			
		||||
#define A_____O_____E_____I_____U    KC_A, KC_O, KC_E, KC_I, KC_U
 | 
			
		||||
#define G_____T_____K_____S_____N    KC_G, KC_T, KC_K, KC_S, KC_N
 | 
			
		||||
#define Z_____X_____C_____V_____F    KC_Z, KC_X, KC_C, KC_V, KC_F
 | 
			
		||||
#define B_____H_____J_____L____SLSH  KC_B, KC_H, KC_J, KC_L, KC_SLSH
 | 
			
		||||
							
								
								
									
										17
									
								
								users/mtei/layer_number_util.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								users/mtei/layer_number_util.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
// Copyright (c) 2022 Takeshi Ishii (mtei@github)
 | 
			
		||||
// SPDX-License-Identifier: GPL-2.0-or-later
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include "cpp_map.h"
 | 
			
		||||
 | 
			
		||||
//build -> _<sym>,
 | 
			
		||||
#define _BUILD_LAYER_ENUM_NUMBER(sym, str) _ ## sym,
 | 
			
		||||
#define BUILD_LAYER_ENUM_NUMBER(ent) _BUILD_LAYER_ENUM_NUMBER ent
 | 
			
		||||
 | 
			
		||||
//build -> static const char <sym>_name[]  PROGMEM = str;
 | 
			
		||||
#define _BUILD_LAYER_NAME_STR(sym, str) static const char sym ## _name[]  PROGMEM = str;
 | 
			
		||||
#define BUILD_LAYER_NAME_STR(ent) _BUILD_LAYER_NAME_STR ent
 | 
			
		||||
 | 
			
		||||
//build -> [_<sym>] = <sym>_name,
 | 
			
		||||
#define _BUILD_LAYER_NAME_TABLE(sym, str) [_##sym] = sym ## _name,
 | 
			
		||||
#define BUILD_LAYER_NAME_TABLE(ent) _BUILD_LAYER_NAME_TABLE ent
 | 
			
		||||
							
								
								
									
										18
									
								
								users/mtei/matrix_output_unselect_delay_ondemand.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								users/mtei/matrix_output_unselect_delay_ondemand.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,18 @@
 | 
			
		|||
// Copyright (c) 2021 Takeshi Ishii (mtei@github)
 | 
			
		||||
// SPDX-License-Identifier: GPL-2.0-or-later
 | 
			
		||||
 | 
			
		||||
#include QMK_KEYBOARD_H
 | 
			
		||||
 | 
			
		||||
void matrix_output_unselect_delay(uint8_t line, bool key_pressed) {
 | 
			
		||||
     /* If none of the keys are pressed,
 | 
			
		||||
      *  there is no need to wait for time for the next line. */
 | 
			
		||||
     if (key_pressed) {
 | 
			
		||||
#    ifdef MATRIX_IO_DELAY
 | 
			
		||||
#        if MATRIX_IO_DELAY > 0
 | 
			
		||||
         wait_us(MATRIX_IO_DELAY);
 | 
			
		||||
#        endif
 | 
			
		||||
#    else
 | 
			
		||||
         wait_us(30);
 | 
			
		||||
#    endif
 | 
			
		||||
     }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -14,32 +14,17 @@
 | 
			
		|||
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include QMK_KEYBOARD_H
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#ifdef CONSOLE_ENABLE
 | 
			
		||||
  #include "print.h"
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef SSD1306OLED
 | 
			
		||||
  #include "ssd1306.h"
 | 
			
		||||
#endif
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include "layer_number.h"
 | 
			
		||||
#include QMK_KEYBOARD_H
 | 
			
		||||
 | 
			
		||||
#include "pseudo_sprintf.h"
 | 
			
		||||
 | 
			
		||||
extern int current_default_layer;
 | 
			
		||||
 | 
			
		||||
void init_helix_oled(void) {
 | 
			
		||||
#ifdef SSD1306OLED
 | 
			
		||||
    //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
 | 
			
		||||
    iota_gfx_init(!has_usb());   // turns on the display
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
//OLED update loop
 | 
			
		||||
#if defined(OLED_ENABLE)
 | 
			
		||||
 | 
			
		||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
 | 
			
		||||
#if defined(SSD1306OLED) || defined(OLED_ENABLE)
 | 
			
		||||
 | 
			
		||||
#    if defined(OLED_ENABLE)
 | 
			
		||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
 | 
			
		||||
    if (is_keyboard_master()) {
 | 
			
		||||
        return OLED_ROTATION_0;
 | 
			
		||||
| 
						 | 
				
			
			@ -47,35 +32,12 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
 | 
			
		|||
        return OLED_ROTATION_180;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
#    else
 | 
			
		||||
#    define oled_write(data,flag)    matrix_write(matrix, data)
 | 
			
		||||
#    define oled_write_P(data,flag)  matrix_write_P(matrix, data)
 | 
			
		||||
#    endif
 | 
			
		||||
 | 
			
		||||
#    ifdef SSD1306OLED
 | 
			
		||||
void matrix_scan_user(void) {
 | 
			
		||||
    iota_gfx_task();  // this is what updates the display continuously
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void matrix_update(struct CharacterMatrix *dest,
 | 
			
		||||
                   const struct CharacterMatrix *source) {
 | 
			
		||||
    if (memcmp(dest->display, source->display, sizeof(dest->display))) {
 | 
			
		||||
        memcpy(dest->display, source->display, sizeof(dest->display));
 | 
			
		||||
        dest->dirty = true;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
#    endif
 | 
			
		||||
 | 
			
		||||
#ifndef PSEUDO_SPRINTF_DEFINED
 | 
			
		||||
#include "pseudo_sprintf.c"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#    ifdef SSD1306OLED
 | 
			
		||||
static void render_logo(struct CharacterMatrix *matrix) {
 | 
			
		||||
#    else
 | 
			
		||||
static void render_logo(void) {
 | 
			
		||||
#    endif
 | 
			
		||||
 | 
			
		||||
    static const char helix_logo[] PROGMEM = {
 | 
			
		||||
        0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
 | 
			
		||||
        0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
 | 
			
		||||
| 
						 | 
				
			
			@ -98,57 +60,26 @@ static void render_logo(void) {
 | 
			
		|||
        bufp = sprints(bufp, " ");
 | 
			
		||||
#        endif
 | 
			
		||||
        oled_write(buf, false);
 | 
			
		||||
#        ifndef SSD1306OLED
 | 
			
		||||
    } else {
 | 
			
		||||
#        ifdef DEBUG_MATRIX_SCAN_RATE
 | 
			
		||||
        bufp = sprintd(buf, "  scan:", get_matrix_scan_rate());
 | 
			
		||||
        oled_write(buf, false);
 | 
			
		||||
#        endif
 | 
			
		||||
#        endif // DEBUG_MATRIX_SCAN_RATE
 | 
			
		||||
        oled_write_P( PSTR("\n"), false);
 | 
			
		||||
#        endif
 | 
			
		||||
    }
 | 
			
		||||
#    else
 | 
			
		||||
#    else // ifndef RGBLIGHT_ENABLE
 | 
			
		||||
#        ifdef DEBUG_MATRIX_SCAN_RATE
 | 
			
		||||
    bufp = sprintd(buf, " scan:", get_matrix_scan_rate());
 | 
			
		||||
    bufp = sprints(bufp, " ");
 | 
			
		||||
    oled_write(buf, false);
 | 
			
		||||
#        endif
 | 
			
		||||
#    endif
 | 
			
		||||
#    endif // RGBLIGHT_ENABLE
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static const char Qwerty_name[]  PROGMEM = " Qwerty";
 | 
			
		||||
static const char Colemak_name[] PROGMEM = " Colemak";
 | 
			
		||||
static const char Dvorak_name[]  PROGMEM = " Dvorak";
 | 
			
		||||
static const char Eucalyn_name[] PROGMEM = " Eucalyn";
 | 
			
		||||
static const char Keypad_name[]  PROGMEM = " Keypad";
 | 
			
		||||
/* weak reference */ __attribute__((weak)) extern const char *layer_names[];
 | 
			
		||||
/* weak reference */ __attribute__((weak)) extern const size_t num_of_layer_names;
 | 
			
		||||
 | 
			
		||||
static const char AUX_name[]     PROGMEM = ":AUX";
 | 
			
		||||
static const char KAUX_name[]    PROGMEM = ":00";
 | 
			
		||||
static const char Padfunc_name[] PROGMEM = ":PadFunc";
 | 
			
		||||
static const char Lower_name[]   PROGMEM = ":Func";
 | 
			
		||||
static const char Raise_name[]   PROGMEM = ":Extra";
 | 
			
		||||
static const char Adjust_name[]  PROGMEM = ":Adjust";
 | 
			
		||||
 | 
			
		||||
static const char *layer_names[] = {
 | 
			
		||||
    [_QWERTY] = Qwerty_name,
 | 
			
		||||
    [_COLEMAK] = Colemak_name,
 | 
			
		||||
    [_DVORAK] = Dvorak_name,
 | 
			
		||||
    [_EUCALYN]= Eucalyn_name,
 | 
			
		||||
    [_KEYPAD] = Keypad_name,
 | 
			
		||||
    [_AUX]    = AUX_name,
 | 
			
		||||
    [_KAUX]   = KAUX_name,
 | 
			
		||||
    [_LOWER]  = Lower_name,
 | 
			
		||||
    [_RAISE]  = Raise_name,
 | 
			
		||||
    [_PADFUNC]= Padfunc_name,
 | 
			
		||||
    [_ADJUST] = Adjust_name
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#    ifdef SSD1306OLED
 | 
			
		||||
void render_status(struct CharacterMatrix *matrix) {
 | 
			
		||||
#    else
 | 
			
		||||
void render_status(void) {
 | 
			
		||||
#    endif
 | 
			
		||||
 | 
			
		||||
    // Render to mode icon
 | 
			
		||||
    static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
 | 
			
		||||
    if(keymap_config.swap_lalt_lgui==false){
 | 
			
		||||
| 
						 | 
				
			
			@ -162,21 +93,29 @@ void render_status(void) {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
 | 
			
		||||
    int name_num;
 | 
			
		||||
    int name_num, max_name_num;
 | 
			
		||||
    uint32_t lstate;
 | 
			
		||||
    oled_write_P(layer_names[current_default_layer], false);
 | 
			
		||||
#    ifdef DEBUG_MATRIX_SCAN_RATE
 | 
			
		||||
    char buf[16];
 | 
			
		||||
    max_name_num = 0;
 | 
			
		||||
    if (layer_names != NULL) {
 | 
			
		||||
        max_name_num = num_of_layer_names;
 | 
			
		||||
        oled_write_P(layer_names[current_default_layer], false);
 | 
			
		||||
    } else {
 | 
			
		||||
        sprintd(buf, " layer:", current_default_layer);
 | 
			
		||||
        oled_write(buf, false);
 | 
			
		||||
    }
 | 
			
		||||
#    ifdef DEBUG_MATRIX_SCAN_RATE
 | 
			
		||||
    sprintd(buf, " scan:", get_matrix_scan_rate());
 | 
			
		||||
    oled_write(buf, false);
 | 
			
		||||
#    endif
 | 
			
		||||
    oled_write_P(PSTR("\n"), false);
 | 
			
		||||
    for (lstate = layer_state, name_num = 0;
 | 
			
		||||
         lstate && name_num < sizeof(layer_names)/sizeof(char *);
 | 
			
		||||
         lstate >>=1, name_num++) {
 | 
			
		||||
    for (lstate = layer_state, name_num = 0; lstate; lstate >>=1, name_num++) {
 | 
			
		||||
        if ((lstate & 1) != 0) {
 | 
			
		||||
            if (layer_names[name_num]) {
 | 
			
		||||
            if (name_num < max_name_num && layer_names[name_num]) {
 | 
			
		||||
                oled_write_P(layer_names[name_num], false);
 | 
			
		||||
            } else {
 | 
			
		||||
                sprintd(buf, ":", name_num);
 | 
			
		||||
                oled_write(buf, false);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -189,42 +128,13 @@ void render_status(void) {
 | 
			
		|||
    oled_write_P(led_state.scroll_lock ? PSTR("SCLK  ") : PSTR("      "), false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#    ifdef SSD1306OLED
 | 
			
		||||
#        if OLED_UPDATE_INTERVAL > 0
 | 
			
		||||
uint16_t oled_update_timeout;
 | 
			
		||||
#        endif
 | 
			
		||||
 | 
			
		||||
void iota_gfx_task_user(void) {
 | 
			
		||||
    struct CharacterMatrix matrix;
 | 
			
		||||
 | 
			
		||||
#        if DEBUG_TO_SCREEN
 | 
			
		||||
    if (debug_enable) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
#        endif
 | 
			
		||||
 | 
			
		||||
#if      OLED_UPDATE_INTERVAL > 0
 | 
			
		||||
    if (timer_elapsed(oled_update_timeout) < OLED_UPDATE_INTERVAL) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    oled_update_timeout = timer_read();
 | 
			
		||||
#endif
 | 
			
		||||
    matrix_clear(&matrix);
 | 
			
		||||
    if (is_keyboard_master()) {
 | 
			
		||||
        render_status(&matrix);
 | 
			
		||||
    } else {
 | 
			
		||||
        render_logo(&matrix);
 | 
			
		||||
    }
 | 
			
		||||
    matrix_update(&display, &matrix);
 | 
			
		||||
}
 | 
			
		||||
#    else
 | 
			
		||||
bool oled_task_user(void) {
 | 
			
		||||
 | 
			
		||||
#        if DEBUG_TO_SCREEN
 | 
			
		||||
#    if DEBUG_TO_SCREEN
 | 
			
		||||
    if (debug_enable) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
#        endif
 | 
			
		||||
#    endif
 | 
			
		||||
 | 
			
		||||
    if(is_keyboard_master()){
 | 
			
		||||
        render_status();
 | 
			
		||||
| 
						 | 
				
			
			@ -233,6 +143,5 @@ bool oled_task_user(void) {
 | 
			
		|||
    }
 | 
			
		||||
    return false;
 | 
			
		||||
}
 | 
			
		||||
#    endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										9
									
								
								users/mtei/rules.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								users/mtei/rules.mk
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,9 @@
 | 
			
		|||
VPATH += $(USER_PATH)/$(PLATFORM_PATH)
 | 
			
		||||
VPATH += $(USER_PATH)/$(PLATFORM_PATH)/$(PLATFORM_KEY)
 | 
			
		||||
 | 
			
		||||
CUSTOM_MATRIX_DELAY = on-demand
 | 
			
		||||
 | 
			
		||||
ifneq ($(strip $(USROPT)),)
 | 
			
		||||
  include $(USER_PATH)/user_options.mk
 | 
			
		||||
endif
 | 
			
		||||
include $(USER_PATH)/user_featues.mk
 | 
			
		||||
							
								
								
									
										60
									
								
								users/mtei/user_featues.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								users/mtei/user_featues.mk
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,60 @@
 | 
			
		|||
# Copyright (c) 2022 Takeshi Ishii (mtei@github)
 | 
			
		||||
# SPDX-License-Identifier: GPL-2.0-or-later
 | 
			
		||||
 | 
			
		||||
ifeq ($(strip $(LED_ANIMATIONS)), yes)
 | 
			
		||||
    OPT_DEFS += -DLED_ANIMATIONS
 | 
			
		||||
    OPT_DEFS += -DLED_ANIMATIONS_LEVEL=2
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(strip $(LED_ANIMATIONS)), mini)
 | 
			
		||||
    OPT_DEFS += -DLED_ANIMATIONS
 | 
			
		||||
    OPT_DEFS += -DLED_ANIMATIONS_LEVEL=1
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(strip $(DEBUG_CONFIG)), yes)
 | 
			
		||||
    OPT_DEFS += -DDEBUG_CONFIG
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(strip $(CUSTOM_MATRIX_DELAY)),on-demand)
 | 
			
		||||
    SRC += matrix_output_unselect_delay_ondemand.c
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifneq ($(strip $(MDELAY)),)
 | 
			
		||||
    OPT_DEFS += -DMATRIX_IO_DELAY=$(strip $(MDELAY))
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(strip $(ENABLE_COLEMAK)),yes)
 | 
			
		||||
    OPT_DEFS += -DENABLE_COLEMAK
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(strip $(ENABLE_DVORAK)),yes)
 | 
			
		||||
    OPT_DEFS += -DENABLE_DVORAK
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(strip $(ENABLE_EUCALYN)),yes)
 | 
			
		||||
    OPT_DEFS += -DENABLE_EUCALYN
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(strip $(ENCODER_ENABLE)),yes)
 | 
			
		||||
    SRC += encoder_update_user.c
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifeq ($(strip $(DEBUG_ENCODER)),yes)
 | 
			
		||||
    OPT_DEFS += -DENCODER_DETECT_OVER_SPEED
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifneq ($(strip $(SYNC_TIMER_ENABLE)),yes)
 | 
			
		||||
    OPT_DEFS += -DDISABLE_SYNC_TIMER
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifneq ($(strip $(USROPT)),)
 | 
			
		||||
    $(info -)
 | 
			
		||||
    $(info -  CONSOLE_ENABLE      = $(CONSOLE_ENABLE))
 | 
			
		||||
    $(info -  OLED_ENABLE         = $(OLED_ENABLE))
 | 
			
		||||
    $(info -  RGBLIGHT_ENABLE     = $(RGBLIGHT_ENABLE))
 | 
			
		||||
    $(info -  ENCODER_ENABLE      = $(ENCODER_ENABLE))
 | 
			
		||||
    $(info -  MDELAY              = $(MDELAY))
 | 
			
		||||
    $(info -  CUSTOM_MATRIX_DELAY = $(CUSTOM_MATRIX_DELAY))
 | 
			
		||||
    $(info -  DEBUG_MATRIX_SCAN_RATE_ENABLE = $(DEBUG_MATRIX_SCAN_RATE_ENABLE))
 | 
			
		||||
    $(info -  OPT_DEFS            = $(OPT_DEFS))
 | 
			
		||||
endif
 | 
			
		||||
							
								
								
									
										127
									
								
								users/mtei/user_options.mk
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										127
									
								
								users/mtei/user_options.mk
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,127 @@
 | 
			
		|||
# Copyright (c) 2022 Takeshi Ishii (mtei@github)
 | 
			
		||||
# SPDX-License-Identifier: GPL-2.0-or-later
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
#  make USROPT=<option>,<option>,...  <KEYBOARD>:<KEYMAP>
 | 
			
		||||
#  options:
 | 
			
		||||
#    dispoff:     OLED, RGBLIGHT disable
 | 
			
		||||
#    oled:        OLED enable
 | 
			
		||||
#    no-oled:     OLED disable
 | 
			
		||||
#    rgblight:    RGBLIGHT enable
 | 
			
		||||
#    no-rgblight: RGBLIGHT disable
 | 
			
		||||
#    no_ani:      RGBLIGHT ANIMATIONS disable
 | 
			
		||||
#    mini-ani:    RGBLIGHT ANIMATIONS mini set
 | 
			
		||||
#    ani:         RGBLIGHT ANIMATIONS enable
 | 
			
		||||
#    scan:        DEBUG_MATRIX_SCAN_RATE enable
 | 
			
		||||
#    scan-api:    DEBUG_MATRIX_SCAN_RATE api enable
 | 
			
		||||
#    mdelay=<num> MATRIX_IO_DELAY set <num>
 | 
			
		||||
#    mdelay_type=<type> use custom matrix_output_unselect_delay()
 | 
			
		||||
#                 type=no,ondemand
 | 
			
		||||
#    enc:         ENCODER enable
 | 
			
		||||
#    no-enc:      ENCODER disable
 | 
			
		||||
#
 | 
			
		||||
ifneq ($(strip $(USROPT)),)
 | 
			
		||||
  define USER_OPTION_PARSE
 | 
			
		||||
    # parse 'debug', 'no-debug', 'dispoff', 'consle', 'scan', 'no-scan', 'scan-api',
 | 
			
		||||
    #   'mdelay=?', 'mdelay0', 'colemak', 'dvorak', 'eucalyn', 'lto', 'no-lto'
 | 
			
		||||
    $(if $(SHOW_PARSE),$(info parse .$1.))  #for debug  'make SHOW_PARSE=y ...'
 | 
			
		||||
    ifeq ($(strip $1),debug)
 | 
			
		||||
        DEBUG_CONFIG = yes
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter nodebug no-debug no_debug,$(strip $1)),)
 | 
			
		||||
        DEBUG_CONFIG = no
 | 
			
		||||
    endif
 | 
			
		||||
    ifeq ($(strip $1),dispoff)
 | 
			
		||||
        OLED_ENABLE = no
 | 
			
		||||
        RGBLIGHT_ENABLE = no
 | 
			
		||||
        LED_BACK_ENABLE = no
 | 
			
		||||
        LED_UNDERGLOW_ENABLE = no
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter rgblight,$(strip $1)),)
 | 
			
		||||
        RGBLIGHT_ENABLE = yes
 | 
			
		||||
        LED_BACK_ENABLE = yes
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter norgblight no-rgblight,$(strip $1)),)
 | 
			
		||||
        RGBLIGHT_ENABLE = no
 | 
			
		||||
        LED_BACK_ENABLE = no
 | 
			
		||||
        LED_UNDERGLOW_ENABLE = no
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter na no_ani no-ani,$(strip $1)),)
 | 
			
		||||
        LED_ANIMATIONS = no
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter mini-ani mini_ani,$(strip $1)),)
 | 
			
		||||
        LED_ANIMATIONS = mini
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter ani animation,$(strip $1)),)
 | 
			
		||||
        LED_ANIMATIONS = yes
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter nooled no-oled,$(strip $1)),)
 | 
			
		||||
        OLED_ENABLE = no
 | 
			
		||||
    endif
 | 
			
		||||
    ifeq ($(strip $1),oled)
 | 
			
		||||
        OLED_ENABLE = yes
 | 
			
		||||
    endif
 | 
			
		||||
    ifeq ($(strip $1),console)
 | 
			
		||||
        CONSOLE_ENABLE = yes
 | 
			
		||||
    endif
 | 
			
		||||
    ifeq ($(strip $1),scan)
 | 
			
		||||
        # use DEBUG_MATRIX_SCAN_RATE
 | 
			
		||||
        # see docs/newbs_testing_debugging.md
 | 
			
		||||
        DEBUG_MATRIX_SCAN_RATE_ENABLE = yes
 | 
			
		||||
    endif
 | 
			
		||||
    ifeq ($(strip $1),no-scan)
 | 
			
		||||
        DEBUG_MATRIX_SCAN_RATE_ENABLE = no
 | 
			
		||||
    endif
 | 
			
		||||
    ifeq ($(strip $1),scan-api)
 | 
			
		||||
        # use DEBUG_MATRIX_SCAN_RATE
 | 
			
		||||
        # see docs/newbs_testing_debugging.md
 | 
			
		||||
        DEBUG_MATRIX_SCAN_RATE_ENABLE = api
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter stimer sync-timer,$(strip $1)),)
 | 
			
		||||
        SYNC_TIMER_ENABLE = yes
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter nostimer no-sync-timer,$(strip $1)),)
 | 
			
		||||
        SYNC_TIMER_ENABLE = no
 | 
			
		||||
    endif
 | 
			
		||||
    ifeq ($(filter mdelay_type=%,$1),mdelay_type=no)
 | 
			
		||||
        CUSTOM_MATRIX_DELAY = no
 | 
			
		||||
    endif
 | 
			
		||||
    ifeq ($(filter mdelay_type=%,$1),mdelay_type=demand)
 | 
			
		||||
        CUSTOM_MATRIX_DELAY = on-demand
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter mdelay=%,$1),)
 | 
			
		||||
        MDELAY = $(patsubst mdelay=%,%,$1)
 | 
			
		||||
    endif
 | 
			
		||||
    ifeq ($(strip $1),mdelay0)
 | 
			
		||||
        MDELAY = 0
 | 
			
		||||
    endif
 | 
			
		||||
    ifeq ($(strip $1),colemak)
 | 
			
		||||
         ENABLE_COLEMAK = yes
 | 
			
		||||
    endif
 | 
			
		||||
    ifeq ($(strip $1),dvorak)
 | 
			
		||||
         ENABLE_DVORAK = yes
 | 
			
		||||
    endif
 | 
			
		||||
    ifeq ($(strip $1),eucalyn)
 | 
			
		||||
         ENABLE_EUCALYN = yes
 | 
			
		||||
    endif
 | 
			
		||||
    ifeq ($(strip $1),lto)
 | 
			
		||||
        LTO_ENABLE = yes
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter nolto no-lto no_lto,$(strip $1)),)
 | 
			
		||||
        LTO_ENABLE = no
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter enc,$(strip $1)),)
 | 
			
		||||
        ENCODER_ENABLE = yes
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter noenc no-enc no_enc,$(strip $1)),)
 | 
			
		||||
        ENCODER_ENABLE = no
 | 
			
		||||
    endif
 | 
			
		||||
    ifneq ($(filter debugenc debug-enc debug_enc,$(strip $1)),)
 | 
			
		||||
        DEBUG_ENCODER = yes
 | 
			
		||||
    endif
 | 
			
		||||
  endef # end of USER_OPTION_PARSE
 | 
			
		||||
 | 
			
		||||
  COMMA=,
 | 
			
		||||
  $(eval $(foreach A_OPTION_NAME,$(subst $(COMMA), ,$(USROPT)),  \
 | 
			
		||||
      $(call USER_OPTION_PARSE,$(A_OPTION_NAME))))
 | 
			
		||||
endif
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue