aboutsummaryrefslogtreecommitdiff
path: root/keyboard/hid_liber
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-03-12 16:05:50 +0900
committertmk <nobody@nowhere>2013-03-12 16:05:50 +0900
commit30f9baf8985f3caa626bcd0eef8519b93f23669b (patch)
treeea5b5e0aba4c1229c57d184205d4fc11abfa0a86 /keyboard/hid_liber
parentc4ab832be0f110a127b20e8df2b5223bceb8dcd1 (diff)
downloadqmk_firmware-30f9baf8985f3caa626bcd0eef8519b93f23669b.tar.gz
qmk_firmware-30f9baf8985f3caa626bcd0eef8519b93f23669b.zip
Fix debouncing and add legacy keymap support
Diffstat (limited to 'keyboard/hid_liber')
-rw-r--r--keyboard/hid_liber/config.h11
-rw-r--r--keyboard/hid_liber/matrix.c2
2 files changed, 12 insertions, 1 deletions
diff --git a/keyboard/hid_liber/config.h b/keyboard/hid_liber/config.h
index a9b77c7dc..61a75dd0c 100644
--- a/keyboard/hid_liber/config.h
+++ b/keyboard/hid_liber/config.h
@@ -41,12 +41,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
41/* Set 0 if need no debouncing */ 41/* Set 0 if need no debouncing */
42#define DEBOUNCE 8 42#define DEBOUNCE 8
43 43
44/* legacy keymap support */
45#define USE_LEGACY_KEYMAP
44 46
45/* key combination for command */ 47/* key combination for command */
46#define IS_COMMAND() ( \ 48#define IS_COMMAND() ( \
47 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ 49 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
48) 50)
49 51
52/* Boot Section Size in *BYTEs*
53 * Teensy halfKay 512
54 * Teensy++ halfKay 1024
55 * Atmel DFU loader 4096
56 * LUFA bootloader 4096
57 * USBaspLoader 2048
58 */
59#define BOOTLOADER_SIZE 4096
60
50// TODO: configurable 61// TODO: configurable
51#define DEBUG_LED 0 62#define DEBUG_LED 0
52#define DEBUG_LED_CONFIG 63#define DEBUG_LED_CONFIG
diff --git a/keyboard/hid_liber/matrix.c b/keyboard/hid_liber/matrix.c
index 2d939ef63..12ade3302 100644
--- a/keyboard/hid_liber/matrix.c
+++ b/keyboard/hid_liber/matrix.c
@@ -173,7 +173,6 @@ uint8_t matrix_scan(void)
173 if (debouncing) { 173 if (debouncing) {
174 debug("bounce!: "); debug_hex(debouncing); print("\n"); 174 debug("bounce!: "); debug_hex(debouncing); print("\n");
175 } 175 }
176 _delay_ms(1); // improved affect on bouncing
177 debouncing = DEBOUNCE; 176 debouncing = DEBOUNCE;
178 } 177 }
179 } 178 }
@@ -181,6 +180,7 @@ uint8_t matrix_scan(void)
181 } 180 }
182 181
183 if (debouncing) { 182 if (debouncing) {
183 _delay_ms(1);
184 debouncing--; 184 debouncing--;
185 } 185 }
186 186