summaryrefslogtreecommitdiffstats
path: root/keyboards/ergodox_ez
diff options
context:
space:
mode:
authorJosh Colbeck <skrymir@gmail.com>2016-07-04 22:41:58 +0200
committerJosh Colbeck <skrymir@gmail.com>2016-07-04 22:41:58 +0200
commita5fb2b58a5fc328da7eea42cb73c668f3b5d0f7e (patch)
tree31762ea16ad4e7aceb86d3939ebe25839becc77a /keyboards/ergodox_ez
parent497b92c3bd3ee480e59d08f2a6fb1b780172681c (diff)
parent9e01b219f32b0086728c10658928b8bffcc26ef7 (diff)
downloadqmk_firmware-a5fb2b58a5fc328da7eea42cb73c668f3b5d0f7e.tar.gz
qmk_firmware-a5fb2b58a5fc328da7eea42cb73c668f3b5d0f7e.tar.xz
Merge remote-tracking branch 'jackhumbert/master' into patch-1
Diffstat (limited to 'keyboards/ergodox_ez')
-rw-r--r--keyboards/ergodox_ez/config.h10
-rw-r--r--keyboards/ergodox_ez/matrix.c6
2 files changed, 5 insertions, 11 deletions
diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h
index 6a391ffb5..2bb56731b 100644
--- a/keyboards/ergodox_ez/config.h
+++ b/keyboards/ergodox_ez/config.h
@@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DEVICE_VER 0x0001
#define MANUFACTURER ErgoDox EZ
#define PRODUCT ErgoDox EZ
-#define DESCRIPTION t.m.k. keyboard firmware for Ergodox
+#define DESCRIPTION QMK keyboard firmware for Ergodox EZ
/* key matrix size */
#define MATRIX_ROWS 14
@@ -40,12 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define TAPPING_TOGGLE 1
-#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
-#define ROWS (int []){ D0, D5, B5, B6 }
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION COL2ROW
-
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
@@ -53,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
-#define DEBOUNCE 2
+#define DEBOUNCE 5
#define TAPPING_TERM 200
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c
index b87fddbad..9c1efa1d0 100644
--- a/keyboards/ergodox_ez/matrix.c
+++ b/keyboards/ergodox_ez/matrix.c
@@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
-#include <util/delay.h>
+#include "wait.h"
#include "action_layer.h"
#include "print.h"
#include "debug.h"
@@ -166,6 +166,7 @@ uint8_t matrix_scan(void)
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
select_row(i);
+ wait_us(30); // without this wait read unstable value.
matrix_row_t cols = read_cols(i);
if (matrix_debouncing[i] != cols) {
matrix_debouncing[i] = cols;
@@ -179,7 +180,7 @@ uint8_t matrix_scan(void)
if (debouncing) {
if (--debouncing) {
- _delay_ms(1);
+ wait_us(1);
} else {
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
matrix[i] = matrix_debouncing[i];
@@ -267,7 +268,6 @@ static matrix_row_t read_cols(uint8_t row)
return data;
}
} else {
- _delay_us(30); // without this wait read unstable value.
// read from teensy
return
(PINF&(1<<0) ? 0 : (1<<0)) |