You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
6.9 KiB

[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 <fauxpark@gmail.com> * Update keyboards/handwired/symmetric70_proto/proton_c/rules.mk Co-authored-by: Ryan <fauxpark@gmail.com> * Update keyboards/handwired/symmetric70_proto/local_features.mk Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/handwired/symmetric70_proto/local_features.mk Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/handwired/symmetric70_proto/local_features.mk Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/handwired/symmetric70_proto/matrix_debug/readme.md Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/handwired/symmetric70_proto/matrix_debug/readme.md Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/handwired/symmetric70_proto/matrix_debug/readme.md Co-authored-by: Nick Brassel <nick@tzarc.org> * Update keyboards/handwired/symmetric70_proto/matrix_fast/matrix_config_expand.c Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Nick Brassel <nick@tzarc.org>
2 years ago
  1. /* Copyright 2021 mtei
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. // clang-format off
  18. #define _MAP1(E, _1) E(_1)
  19. #define _MAP2(E, _1,_2) E(_1) E(_2)
  20. #define _MAP3(E, _1,_2,_3) E(_1) E(_2) E(_3)
  21. #define _MAP4(E, _1,_2,_3,_4) E(_1) E(_2) E(_3) E(_4)
  22. #define _MAP5(E, _1,_2,_3,_4,_5) E(_1) E(_2) E(_3) E(_4) E(_5)
  23. #define _MAP6(E, _1,_2,_3,_4,_5,_6) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6)
  24. #define _MAP7(E, _1,_2,_3,_4,_5,_6,_7) E(_1) E(_2) E(_3) E(_4) E(_5) E(_6) E(_7)
  25. #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)
  26. #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)
  27. #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)
  28. #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)
  29. #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)
  30. #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)
  31. #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)
  32. #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)
  33. #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)
  34. #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)
  35. #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)
  36. #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)
  37. #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)
  38. #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)
  39. #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)
  40. #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)
  41. #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)
  42. #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)
  43. #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)
  44. #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)
  45. #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)
  46. #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)
  47. #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)
  48. #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)
  49. #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)
  50. #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
  51. #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__)