From 30f9baf8985f3caa626bcd0eef8519b93f23669b Mon Sep 17 00:00:00 2001 From: tmk Date: Tue, 12 Mar 2013 16:05:50 +0900 Subject: Fix debouncing and add legacy keymap support --- keyboard/hid_liber/config.h | 11 +++++++++++ keyboard/hid_liber/matrix.c | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'keyboard/hid_liber') 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 . /* Set 0 if need no debouncing */ #define DEBOUNCE 8 +/* legacy keymap support */ +#define USE_LEGACY_KEYMAP /* key combination for command */ #define IS_COMMAND() ( \ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) +/* Boot Section Size in *BYTEs* + * Teensy halfKay 512 + * Teensy++ halfKay 1024 + * Atmel DFU loader 4096 + * LUFA bootloader 4096 + * USBaspLoader 2048 + */ +#define BOOTLOADER_SIZE 4096 + // TODO: configurable #define DEBUG_LED 0 #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) if (debouncing) { debug("bounce!: "); debug_hex(debouncing); print("\n"); } - _delay_ms(1); // improved affect on bouncing debouncing = DEBOUNCE; } } @@ -181,6 +180,7 @@ uint8_t matrix_scan(void) } if (debouncing) { + _delay_ms(1); debouncing--; } -- cgit v1.2.3