Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Keyboard] Update Symmetric70 keyboard prototype #12707

Merged
merged 41 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5af732b
update handwired/symmetric70_proto/matrix.c
mtei Mar 14, 2021
33e9ad5
make keyboards/handwired/symmetric70_proto/promicro/
mtei Apr 21, 2021
c344a9f
add symmetric70_proto/debug_config.h, update symmetric70_proto/local_…
mtei Apr 24, 2021
ba71309
add symmetric70_proto/matrix_debug/readme.md
mtei Apr 25, 2021
6094a76
update symmetric70_proto/matrix_debug/readme.md
mtei Apr 25, 2021
64db8a6
update handwired/symmetric70_proto/readme.md
mtei Apr 25, 2021
3491fbb
update handwired/symmetric70_proto/readme.md
mtei Apr 25, 2021
4188fbb
update handwired/symmetric70_proto/*/readme.md
mtei Apr 25, 2021
b8e7eaa
add handwired/symmetric70_proto/matrix_fast/
mtei Apr 25, 2021
77a05c4
update handwired/symmetric70_proto/matrix_fast/readme.md
mtei Apr 25, 2021
6da7303
fix typo in handwired/symmetric70_proto/matrix_fast/readme.md
mtei Apr 25, 2021
71f9514
update config.h under handwired/symmetric70_proto/promicro
mtei Apr 26, 2021
5196d7d
add Proton C support to handwired/symmetric70_proto
mtei Apr 26, 2021
7b5c480
add handwired/symmetric70_proto/proton_c/readme.md
mtei Apr 26, 2021
7cf19d5
add promicro/*/readme.md proton_c/*/readme.md
mtei Apr 27, 2021
a75273f
update handwired/symmetric70_proto/proton_c/proton_c.c
mtei Apr 27, 2021
2c17f7a
Added another implementation of 'adaptive_delay'.
mtei Apr 27, 2021
8d29afa
update symmetric70_proto/local_features.mk
mtei Apr 27, 2021
a2f1e3c
update symmetric70_proto/matrix_fast/gpio_extr.h
mtei May 7, 2021
c71b62a
add matrix_output_unselect_delay_ports()
mtei May 3, 2021
369a2d6
add MTEST=adaptive_delay_fast option
mtei May 3, 2021
1f2d00e
update symmetric70_proto/matrix_debug/readme.md
mtei May 22, 2021
840cfb5
update symmetric70_proto/matrix_fast/readme.md
mtei May 22, 2021
2a0e91f
update symmetric70_proto/matrix_debug/readme.md
mtei May 22, 2021
6a2337d
Erase garbage
mtei May 22, 2021
af4a197
fix symmetric70_proto/proton_c/proton_c.c
mtei May 25, 2021
aea6741
improve adaptive_delay_fast in symmetric70_proto/matrix_debug/matrix.c
mtei May 24, 2021
7a4ee9e
update symmetric70_proto/matrix_debug/readme.md
mtei May 25, 2021
b8dc9bd
fix symmetric70_proto/matrix_debug/readme.md
mtei May 26, 2021
ea2d154
Update keyboards/handwired/symmetric70_proto/proton_c/rules.mk
mtei Jul 13, 2021
4548510
Update keyboards/handwired/symmetric70_proto/proton_c/rules.mk
mtei Jul 13, 2021
49d67c1
Update keyboards/handwired/symmetric70_proto/local_features.mk
mtei Jul 13, 2021
cbb9107
Update keyboards/handwired/symmetric70_proto/local_features.mk
mtei Jul 13, 2021
4ec4398
Update keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
mtei Jul 13, 2021
d2439ff
Update keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
mtei Jul 13, 2021
55a03ae
Update keyboards/handwired/symmetric70_proto/local_features.mk
mtei Jul 13, 2021
8185032
Update keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c
mtei Jul 13, 2021
bf8be27
Update keyboards/handwired/symmetric70_proto/matrix_debug/readme.md
mtei Jul 13, 2021
7452d40
Update keyboards/handwired/symmetric70_proto/matrix_debug/readme.md
mtei Jul 13, 2021
6cfa016
Update keyboards/handwired/symmetric70_proto/matrix_debug/readme.md
mtei Jul 13, 2021
cf1d8c1
Update keyboards/handwired/symmetric70_proto/matrix_fast/matrix_confi…
mtei Jul 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions keyboards/handwired/symmetric70_proto/debug_config.h
Original file line number Diff line number Diff line change
@@ -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__
108 changes: 108 additions & 0 deletions keyboards/handwired/symmetric70_proto/local_features.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# matrix.c testing options
# set MATRIX_IO_DELAY macro
# make MTEST=mdelay0 symmetric70_proto/{promicro|proton_c}/{fast|normal}:default:flash
# make MTEST=mdelay=1 symmetric70_proto/{promicro|proton_c}/{fast|normal}:default:flash
# make MTEST=mdelay=10 symmetric70_proto/{promicro|proton_c}/{fast|normal}:default:flash
# set DEBUG_MATRIX_SCAN_RATE_ENABLE yes
# make MTEST=scan symmetric70_proto/{promicro|proton_c}/{fast|normal}:default:flash
# set MATRIX_DEBUG_DELAY and MATRIX_IO_DELAY macro
# make MTEST=matrix_debug_delay,mdelay0 symmetric70_proto/{promicro|proton_c}/{fast|normal}:default:flash
# set MATRIX_DEBUG_SCAN
# make MTEST=matrix_debug_scan symmetric70_proto/{promicro|proton_c}/{fast|normal}:default:flash

ifneq ($(strip $(MTEST)),)
define KEYBOARD_OPTION_PARSE
# parse 'consle', 'scan', 'no-scan', 'mdelay=?', 'mdelay0',
# 'adaptive_delay', 'always_delay', 'matrix_debug_delay', 'matrix_debug_scan'
$(if $(SHOW_PARSE),$(info parse .$1.)) #for debug 'make SHOW_PARSE=y ...'
ifeq ($(strip $1),console)
CONSOLE_ENABLE = yes
endif
ifeq ($(strip $1),scan)
DEBUG_MATRIX_SCAN_RATE_ENABLE = yes
endif
ifeq ($(strip $1),no-scan)
DEBUG_MATRIX_SCAN_RATE_ENABLE = no
endif
ifneq ($(filter mdelay=%,$1),)
MDELAY = $(patsubst mdelay=%,%,$1)
endif
ifeq ($(strip $1),mdelay0)
MDELAY = 0
endif
ifeq ($(strip $1),common_delay)
MATRIX_COMMON_DELAY = yes
endif
ifeq ($(strip $1),adaptive_delay)
ADAPTIVE_DELAY = yes
endif
ifeq ($(strip $1),adaptive_delay2)
ADAPTIVE_DELAY2 = yes
endif
ifeq ($(strip $1),adaptive_delay_fast)
ADAPTIVE_DELAY_FAST = yes
endif
ifeq ($(strip $1),always_delay)
ALWAYS_DELAY = yes
endif
ifeq ($(strip $1),matrix_debug_delay)
MATRIX_DEBUG_DELAY = yes
MATRIX_DEBUG_SCAN = no
endif
ifeq ($(strip $1),matrix_debug_scan)
MATRIX_DEBUG_DELAY = no
MATRIX_DEBUG_SCAN = yes
endif
endef # end of KEYMAP_OPTION_PARSE

COMMA=,
$(eval $(foreach A_OPTION_NAME,$(subst $(COMMA), ,$(MTEST)), \
$(call KEYBOARD_OPTION_PARSE,$(A_OPTION_NAME))))
endif

ifneq ($(strip $(MDELAY)),)
OPT_DEFS += -DMATRIX_IO_DELAY=$(strip $(MDELAY))
endif

ifeq ($(strip $(ADAPTIVE_DELAY)),yes)
OPT_DEFS += -DMATRIX_IO_DELAY_ADAPTIVE
endif

ifeq ($(strip $(ADAPTIVE_DELAY2)),yes)
OPT_DEFS += -DMATRIX_IO_DELAY_ADAPTIVE2
endif

ifeq ($(strip $(ADAPTIVE_DELAY_FAST)),yes)
OPT_DEFS += -DMATRIX_IO_DELAY_ADAPTIVE_FAST
endif

ifeq ($(strip $(ALWAYS_DELAY)),yes)
OPT_DEFS += -DMATRIX_IO_DELAY_ALWAYS
endif

ifeq ($(strip $(MATRIX_DEBUG_DELAY)),yes)
OPT_DEFS += -DMATRIX_DEBUG_DELAY
DEBUG_CONFIG = yes
endif

ifeq ($(strip $(MATRIX_DEBUG_SCAN)),yes)
OPT_DEFS += -DMATRIX_DEBUG_SCAN
DEBUG_CONFIG = yes
endif

ifeq ($(strip $(DEBUG_CONFIG)),yes)
# include "debug_config.h" from {promicro|proton_c}/config.h
OPT_DEFS += -DDEBUG_CONFIG
endif

ifeq ($(strip $(MATRIX_COMMON_DELAY)),yes)
# use matrix_output_unselect_delay() in matrix_common.c
OPT_DEFS += -DMATRIX_IO_DELAY_DEFAULT
endif

$(info -)
$(info - DEBUG_MATRIX_SCAN_RATE_ENABLE = $(DEBUG_MATRIX_SCAN_RATE_ENABLE))
$(info - CONSOLE_ENABLE = $(CONSOLE_ENABLE))
$(info - MDELAY = $(MDELAY))
$(info - MATRIX_COMMON_DELAY = $(MATRIX_COMMON_DELAY))
$(info - OPT_DEFS = $(OPT_DEFS))
10 changes: 10 additions & 0 deletions keyboards/handwired/symmetric70_proto/matrix_debug/gpio_extr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once
// clang-format off

#if defined(__AVR__)
# define readPort(port) PINx_ADDRESS(port)
typedef uint8_t port_data_t;
#else
# define readPort(qmk_pin) palReadPort(PAL_PORT(qmk_pin))
typedef uint16_t port_data_t;
#endif
Loading