summaryrefslogtreecommitdiff
path: root/keyboards/handwired/symmetric70_proto/debug_config.h
diff options
context:
space:
mode:
authorTakeshi ISHII <2170248+mtei@users.noreply.github.com>2021-07-13 18:14:27 +0900
committerGitHub <noreply@github.com>2021-07-13 18:14:27 +0900
commitb89abc402bdc70362dbb6d938eafaa8716b5d4ac (patch)
treef0370521b4492de9ba6fa1b6082f995639597d30 /keyboards/handwired/symmetric70_proto/debug_config.h
parent6b6ee5fa286c067fbea7da2b5274d47aac84d253 (diff)
[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>
Diffstat (limited to 'keyboards/handwired/symmetric70_proto/debug_config.h')
-rw-r--r--keyboards/handwired/symmetric70_proto/debug_config.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/keyboards/handwired/symmetric70_proto/debug_config.h b/keyboards/handwired/symmetric70_proto/debug_config.h
new file mode 100644
index 0000000000..cba99e402f
--- /dev/null
+++ b/keyboards/handwired/symmetric70_proto/debug_config.h
@@ -0,0 +1,33 @@
+/*
+ * matrix.c testing macros
+ * MATRIX_DEBUG_SCAN: Measuring execution time of `matrix_scan()`
+ * MATRIX_DEBUG_DELAY: Observation of delay after `unselect_row()`
+ */
+#pragma once
+#ifndef __ASSEMBLER__
+#include <gpio.h>
+
+static inline void setDebugPinOutput_Low(void) {
+ setPinOutput(MATRIX_DEBUG_PIN);
+ writePinLow(MATRIX_DEBUG_PIN);
+}
+
+#define MATRIX_DEBUG_PIN_INIT() setDebugPinOutput_Low()
+
+#ifdef MATRIX_DEBUG_SCAN
+# define MATRIX_DEBUG_SCAN_START() writePinHigh(MATRIX_DEBUG_PIN)
+# define MATRIX_DEBUG_SCAN_END() writePinLow(MATRIX_DEBUG_PIN)
+#else
+# define MATRIX_DEBUG_SCAN_START()
+# define MATRIX_DEBUG_SCAN_END()
+#endif
+
+#ifdef MATRIX_DEBUG_DELAY
+# define MATRIX_DEBUG_DELAY_START() writePinHigh(MATRIX_DEBUG_PIN)
+# define MATRIX_DEBUG_DELAY_END() writePinLow(MATRIX_DEBUG_PIN)
+#else
+# define MATRIX_DEBUG_DELAY_START()
+# define MATRIX_DEBUG_DELAY_END()
+#endif
+
+#endif // __ASSEMBLER__