From 60acd8996d559f5ab0458c2e1ea46ac9790d14b3 Mon Sep 17 00:00:00 2001 From: Brooks Swinnerton Date: Sun, 30 Nov 2014 13:27:59 -0500 Subject: Fixing typo in console mode --- common/command.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'common') diff --git a/common/command.c b/common/command.c index 971ef7f0af..380f2d8c08 100644 --- a/common/command.c +++ b/common/command.c @@ -302,7 +302,7 @@ static bool command_common(uint8_t code) #endif " " STR(BOOTLOADER_SIZE) "\n"); - print("GCC: " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__) + print("GCC: " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__) " AVR-LIBC: " __AVR_LIBC_VERSION_STRING__ " AVR_ARCH: avr" STR(__AVR_ARCH__) "\n"); break; @@ -541,12 +541,12 @@ static void mousekey_console_help(void) print("4: select mk_time_to_max\n"); print("5: select mk_wheel_max_speed\n"); print("6: select mk_wheel_time_to_max\n"); - print("p: print prameters\n"); + print("p: print parameters\n"); print("d: set default values\n"); - print("up: increase prameters(+1)\n"); - print("down: decrease prameters(-1)\n"); - print("pgup: increase prameters(+10)\n"); - print("pgdown: decrease prameters(-10)\n"); + print("up: increase parameters(+1)\n"); + print("down: decrease parameters(-1)\n"); + print("pgup: increase parameters(+10)\n"); + print("pgdown: decrease parameters(-10)\n"); print("\nspeed = delta * max_speed * (repeat / time_to_max)\n"); print("where delta: cursor="); pdec(MOUSEKEY_MOVE_DELTA); print(", wheel="); pdec(MOUSEKEY_WHEEL_DELTA); print("\n"); -- cgit v1.2.3 From 05795cb0034e885bec37f782cfc6bddcae262637 Mon Sep 17 00:00:00 2001 From: tmk Date: Wed, 26 Nov 2014 11:25:45 +0900 Subject: Compensate timer during prower down --- common/avr/suspend.c | 27 ++++++++++++++++----------- common/suspend.h | 2 +- 2 files changed, 17 insertions(+), 12 deletions(-) (limited to 'common') diff --git a/common/avr/suspend.c b/common/avr/suspend.c index 66a579fd78..80243f02bc 100644 --- a/common/avr/suspend.c +++ b/common/avr/suspend.c @@ -7,6 +7,7 @@ #include "backlight.h" #include "suspend_avr.h" #include "suspend.h" +#include "timer.h" #ifdef PROTOCOL_LUFA #include "lufa.h" #endif @@ -52,11 +53,13 @@ void suspend_idle(uint8_t time) * WDTO_4S * WDTO_8S */ -void suspend_power_down(uint8_t wdto) +static uint8_t wdt_timeout = 0; +static void power_down(uint8_t wdto) { #ifdef PROTOCOL_LUFA if (USB_DeviceState == DEVICE_STATE_Configured) return; #endif + wdt_timeout = wdto; // Watchdog Interrupt Mode wdt_intr_enable(wdto); @@ -67,7 +70,6 @@ void suspend_power_down(uint8_t wdto) // - prescale clock // - BOD disable // - Power Reduction Register PRR - set_sleep_mode(SLEEP_MODE_PWR_DOWN); sleep_enable(); sei(); @@ -78,6 +80,11 @@ void suspend_power_down(uint8_t wdto) wdt_disable(); } +void suspend_power_down(void) +{ + power_down(WDTO_15MS); +} + bool suspend_wakeup_condition(void) { matrix_power_up(); @@ -103,15 +110,13 @@ void suspend_wakeup_init(void) /* watchdog timeout */ ISR(WDT_vect) { - /* wakeup from MCU sleep mode */ -/* - // blink LED - static uint8_t led_state = 0; - static uint8_t led_count = 0; - led_count++; - if ((led_count & 0x07) == 0) { - led_set((led_state ^= (1<