From b89abc402bdc70362dbb6d938eafaa8716b5d4ac Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue, 13 Jul 2021 18:14:27 +0900 Subject: [Keyboard] Update Symmetric70 keyboard prototype (#12707) * update handwired/symmetric70_proto/matrix.c * make keyboards/handwired/symmetric70_proto/promicro/ * add symmetric70_proto/debug_config.h, update symmetric70_proto/local_features.mk etc. set MATRIX_IO_DELAY macro make MTEST=mdelay0 symmetric70_proto/promicro:default:flash make MTEST=mdelay1 symmetric70_proto/promicro:default:flash make MTEST=mdelay10 symmetric70_proto/promicro:default:flash make MTEST=mdelay30 symmetric70_proto/promicro:default:flash set DEBUG_MATRIX_SCAN_RATE_ENABLE yes make MTEST=scan symmetric70_proto/promicro:default:flash set MATRIX_DEBUG_DELAY and MATRIX_IO_DELAY macro make MTEST=matrix_debug_delay,mdelay0 symmetric70_proto/promicro:default:flash set MATRIX_DEBUG_SCAN make MTEST=matrix_debug_scan symmetric70_proto/promicro:default:flash * add symmetric70_proto/matrix_debug/readme.md * update symmetric70_proto/matrix_debug/readme.md * update handwired/symmetric70_proto/readme.md * update handwired/symmetric70_proto/readme.md * update handwired/symmetric70_proto/*/readme.md * add handwired/symmetric70_proto/matrix_fast/ * update handwired/symmetric70_proto/matrix_fast/readme.md * fix typo in handwired/symmetric70_proto/matrix_fast/readme.md * update config.h under handwired/symmetric70_proto/promicro * add Proton C support to handwired/symmetric70_proto * add handwired/symmetric70_proto/proton_c/readme.md * add promicro/*/readme.md proton_c/*/readme.md * update handwired/symmetric70_proto/proton_c/proton_c.c support MATRIX_IO_DELAY_DEFAULT for testing. * Added another implementation of 'adaptive_delay'. * update symmetric70_proto/local_features.mk * update symmetric70_proto/matrix_fast/gpio_extr.h * add matrix_output_unselect_delay_ports() * add MTEST=adaptive_delay_fast option * update symmetric70_proto/matrix_debug/readme.md * update symmetric70_proto/matrix_fast/readme.md * update symmetric70_proto/matrix_debug/readme.md * Erase garbage * fix symmetric70_proto/proton_c/proton_c.c * improve adaptive_delay_fast in symmetric70_proto/matrix_debug/matrix.c * update symmetric70_proto/matrix_debug/readme.md * fix symmetric70_proto/matrix_debug/readme.md * Update keyboards/handwired/symmetric70_proto/proton_c/rules.mk Co-authored-by: Ryan * Update keyboards/handwired/symmetric70_proto/proton_c/rules.mk Co-authored-by: Ryan * Update keyboards/handwired/symmetric70_proto/local_features.mk Co-authored-by: Nick Brassel * Update keyboards/handwired/symmetric70_proto/local_features.mk Co-authored-by: Nick Brassel * Update keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c Co-authored-by: Nick Brassel * Update keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c Co-authored-by: Nick Brassel * Update keyboards/handwired/symmetric70_proto/local_features.mk Co-authored-by: Nick Brassel * Update keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c Co-authored-by: Nick Brassel * Update keyboards/handwired/symmetric70_proto/matrix_debug/readme.md Co-authored-by: Nick Brassel * Update keyboards/handwired/symmetric70_proto/matrix_debug/readme.md Co-authored-by: Nick Brassel * Update keyboards/handwired/symmetric70_proto/matrix_debug/readme.md Co-authored-by: Nick Brassel * Update keyboards/handwired/symmetric70_proto/matrix_fast/matrix_config_expand.c Co-authored-by: Nick Brassel Co-authored-by: Ryan Co-authored-by: Nick Brassel --- .../symmetric70_proto/matrix_fast/cpp_map.h | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 keyboards/handwired/symmetric70_proto/matrix_fast/cpp_map.h (limited to 'keyboards/handwired/symmetric70_proto/matrix_fast/cpp_map.h') diff --git a/keyboards/handwired/symmetric70_proto/matrix_fast/cpp_map.h b/keyboards/handwired/symmetric70_proto/matrix_fast/cpp_map.h new file mode 100644 index 0000000000..d197be6d9f --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/matrix_fast/cpp_map.h @@ -0,0 +1,53 @@ +/* Copyright 2021 mtei + * + * 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 . + */ +#pragma once +// clang-format off + +#define _MAP1(E, _1) E(_1) +#define _MAP2(E, _1,_2) E(_1) E(_2) +#define _MAP3(E, _1,_2,_3) E(_1) E(_2) E(_3) +#define _MAP4(E, _1,_2,_3,_4) E(_1) E(_2) E(_3) E(_4) +#define _MAP5(E, _1,_2,_3,_4,_5) E(_1) E(_2) E(_3) E(_4) E(_5) +#define _MAP6(E, _1,_2,_3,_4,_5,_6) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) +#define _MAP7(E, _1,_2,_3,_4,_5,_6,_7) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) +#define _MAP8(E, _1,_2,_3,_4,_5,_6,_7,_8) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7) E(_8) +#define _MAP9(E, _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) E(_9) +#define _MAP10(E, _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) E(_10) +#define _MAP11(E, _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) E(_11) +#define _MAP12(E, _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) E(_12) +#define _MAP13(E, _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) E(_13) +#define _MAP14(E, _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) E(_14) +#define _MAP15(E, _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) E(_15) +#define _MAP16(E, _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) E(_16) +#define _MAP17(E, _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) E(_17) +#define _MAP18(E, _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) E(_18) +#define _MAP19(E, _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) E(_19) +#define _MAP20(E, _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) E(_20) +#define _MAP21(E, _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) E(_21) +#define _MAP22(E, _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) E(_22) +#define _MAP23(E, _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) E(_23) +#define _MAP24(E, _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) E(_24) +#define _MAP25(E, _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) E(_25) +#define _MAP26(E, _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) E(_26) +#define _MAP27(E, _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) E(_27) +#define _MAP28(E, _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) E(_28) +#define _MAP29(E, _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) E(_29) +#define _MAP30(E, _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) E(_30) +#define _MAP31(E, _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) E(_31) +#define _MAP32(E, _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) E(_32) + +#define SELECT_MAP(e,_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 MAP(E,...) SELECT_MAP(E,__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,__VA_ARGS__) -- cgit v1.2.3