From 9c297081315210b30c90407a8fd4ad1a0c500705 Mon Sep 17 00:00:00 2001 From: Patrick Tsai Date: Wed, 14 Jun 2017 20:17:38 -0400 Subject: [PATCH] Consolidate readme, set better debounce, remove tests The tests never worked anyway --- Keymaps.md | 21 -------------- Makefile | 2 +- README.md | 24 +++++++++++++++ src/matrix.c | 2 +- test/Makefile | 27 ----------------- test/Unity | 1 - test/main.c | 6 ---- test/mock/include/avr/io.h | 50 -------------------------------- test/mock/include/avr/pgmspace.h | 7 ----- test/mock/include/util/delay.h | 9 ------ 10 files changed, 26 insertions(+), 123 deletions(-) delete mode 100644 Keymaps.md delete mode 100644 test/Makefile delete mode 160000 test/Unity delete mode 100644 test/main.c delete mode 100644 test/mock/include/avr/io.h delete mode 100644 test/mock/include/avr/pgmspace.h delete mode 100644 test/mock/include/util/delay.h diff --git a/Keymaps.md b/Keymaps.md deleted file mode 100644 index 8e776ef..0000000 --- a/Keymaps.md +++ /dev/null @@ -1,21 +0,0 @@ -On Windows and Linux, I like to use the regular keymap. Note I've moved Escape to the bottom right since I really need the tilde at the regular spot (going to home directories, etc.). - -```C -{ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE }, -{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLASH }, -{ KC_CAPSLOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_NONE, KC_ENTER }, -{ KC_LSHIFT, KC_NONE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_NONE, KC_RSHIFT }, -{ KC_LCTRL, KC_LGUI, KC_LALT, KC_NONE, KC_NONE, KC_SPACE, KC_NONE, KC_NONE, KC_NONE, KC_NONE, KC_LAYER_0, KC_LAYER_1, KC_MUTE, KC_ESCAPE } -``` - -On OS X, I swap the Alt (Alt) and Command (Win) keys so I don't need to stretch my fingers as far. - -```C -{ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE }, -{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLASH }, -{ KC_CAPSLOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_NONE, KC_ENTER }, -{ KC_LSHIFT, KC_NONE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_NONE, KC_RSHIFT }, -{ KC_LCTRL, KC_LALT, KC_LGUI, KC_NONE, KC_NONE, KC_SPACE, KC_NONE, KC_NONE, KC_NONE, KC_NONE, KC_LAYER_0, KC_LAYER_1, KC_MUTE, KC_ESCAPE } -``` - -You can find all the possible keys in `include/keycodes.h` diff --git a/Makefile b/Makefile index 8d1661f..6a6a5fe 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ flash: $(DFU) erase; $(DFU) flash $(TARGET).hex launch: - $(DFU) launch + $(DFU) reset # Include LUFA build script makefiles include $(LUFA_PATH)/Build/lufa_core.mk diff --git a/README.md b/README.md index 880ca03..075c0d3 100644 --- a/README.md +++ b/README.md @@ -20,5 +20,29 @@ Again, this firmware uses the LUFA USB stack so make sure you've got the LUFA bo `make flash` flashes the built firmware to the board. `make launch` will run the program on the board. You can also just power cycle your GH60; the bootloader will automatically run the firmware unless you've changed your fuses. +## Keymaps +On Windows and Linux, I like to use the regular keymap. Note I've moved Escape to the bottom right since I really need the tilde at the regular spot (going to home directories, etc.). + +```C +{ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE }, +{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLASH }, +{ KC_CAPSLOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_NONE, KC_ENTER }, +{ KC_LSHIFT, KC_NONE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_NONE, KC_RSHIFT }, +{ KC_LCTRL, KC_LGUI, KC_LALT, KC_NONE, KC_NONE, KC_SPACE, KC_NONE, KC_NONE, KC_NONE, KC_NONE, KC_LAYER_0, KC_LAYER_1, KC_MUTE, KC_ESCAPE } +``` + +On OS X, I swap the Alt (Alt) and Command (Win) keys so I don't need to stretch my fingers as far. + +```C +{ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE }, +{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLASH }, +{ KC_CAPSLOCK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_NONE, KC_ENTER }, +{ KC_LSHIFT, KC_NONE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_NONE, KC_RSHIFT }, +{ KC_LCTRL, KC_LALT, KC_LGUI, KC_NONE, KC_NONE, KC_SPACE, KC_NONE, KC_NONE, KC_NONE, KC_NONE, KC_LAYER_0, KC_LAYER_1, KC_MUTE, KC_ESCAPE } +``` + +You can find all the possible keys in `include/keycodes.h` + ## License MIT + diff --git a/src/matrix.c b/src/matrix.c index 598891d..a42061a 100644 --- a/src/matrix.c +++ b/src/matrix.c @@ -4,7 +4,7 @@ #include "matrix.h" #ifdef DEBOUNCE_ENABLED -#define DEBOUNCE_AMOUNT 5 +#define DEBOUNCE_AMOUNT 15 #endif diff --git a/test/Makefile b/test/Makefile deleted file mode 100644 index 24ff580..0000000 --- a/test/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -GH60_PATH=.. -MOCK_PATH=mock -UNITY_PATH=Unity/src - -SRC=main.c \ - $(wildcard $(GH60_PATH)/src/*.c) \ - $(wildcard $(MOCK_PATH)/src/**/*.c) \ - $(wildcard $(UNITY_PATH)/*.c) \ - $(wildcard *.test.c) - -OUT=test.out - -CXX=gcc -CXX_FLAGS=-Wall \ - -pedantic \ - -I$(GH60_PATH)/include \ - -I$(MOCK_PATH)/include \ - -I$(UNITY_PATH) \ - -o $(OUT) - -all: - $(CXX) $(CXX_FLAGS) $(SRC) - -clean: - rm $(OUT) - -.PHONY: all clean diff --git a/test/Unity b/test/Unity deleted file mode 160000 index b3bc196..0000000 --- a/test/Unity +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b3bc196ab3aef3061b16b636e9144ad400bba3d2 diff --git a/test/main.c b/test/main.c deleted file mode 100644 index 4d77a83..0000000 --- a/test/main.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main() { - UNITY_BEGIN(); - UNITY_END(); -} diff --git a/test/mock/include/avr/io.h b/test/mock/include/avr/io.h deleted file mode 100644 index 86ecadb..0000000 --- a/test/mock/include/avr/io.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _AVR_IO_H_ -#define _AVR_IO_H_ - -#include - -uint32_t DDRB; -uint32_t DDRC; -uint32_t DDRD; -uint32_t DDRE; -uint32_t DDRF; - -uint32_t PINB; -uint32_t PINC; -uint32_t PIND; -uint32_t PINE; -uint32_t PINF; - -uint32_t PORTB; -uint32_t PORTC; -uint32_t PORTD; -uint32_t PORTE; -uint32_t PORTF; - -uint32_t PB0; -uint32_t PB1; -uint32_t PB2; -uint32_t PB3; -uint32_t PB4; -uint32_t PB5; -uint32_t PB6; -uint32_t PB7; -uint32_t PC6; -uint32_t PC7; -uint32_t PD4; -uint32_t PD6; -uint32_t PD7; -uint32_t PE6; -uint32_t PF0; -uint32_t PF1; - -uint8_t TCCR1A; -uint8_t TCCR1B; -uint8_t COM1A1; -uint8_t COM1B1; -uint8_t OCR1B; -uint8_t CS11; -uint8_t WGM10; -uint8_t WGM12; - -#endif diff --git a/test/mock/include/avr/pgmspace.h b/test/mock/include/avr/pgmspace.h deleted file mode 100644 index 9f7b811..0000000 --- a/test/mock/include/avr/pgmspace.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _AVR_PGMSPACE_H_ -#define _AVR_PGMSPACE_H_ - -// replace PROGMEM with nothing for test purposes -#define PROGMEM - -#endif diff --git a/test/mock/include/util/delay.h b/test/mock/include/util/delay.h deleted file mode 100644 index ad6bbf6..0000000 --- a/test/mock/include/util/delay.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _UTIL_DELAY_H_ -#define _UTIL_DELAY_H_ - -#include - -void _delay_us(uint32_t); -void _delay_ms(uint32_t); - -#endif