aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2014-11-23 13:38:10 +0900
committertmk <nobody@nowhere>2014-11-23 13:38:10 +0900
commit1f96edaed60def1f513ddd8adcdfa3e12b971006 (patch)
tree9643c420357b9faf7b444ec113e6eb72c6f330a4 /common
parent608ebe2686bdb3fdbd0426731cabdf6082c57b53 (diff)
downloadqmk_firmware-1f96edaed60def1f513ddd8adcdfa3e12b971006.tar.gz
qmk_firmware-1f96edaed60def1f513ddd8adcdfa3e12b971006.zip
Remove MCU dependent code from common/keyboard.c
Diffstat (limited to 'common')
-rw-r--r--common/keyboard.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/common/keyboard.c b/common/keyboard.c
index dde91a296..9a809ff4a 100644
--- a/common/keyboard.c
+++ b/common/keyboard.c
@@ -15,8 +15,6 @@ You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17#include <stdint.h> 17#include <stdint.h>
18#include <util/delay.h>
19#include <avr/wdt.h>
20#include "keyboard.h" 18#include "keyboard.h"
21#include "matrix.h" 19#include "matrix.h"
22#include "keymap.h" 20#include "keymap.h"
@@ -32,14 +30,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
32#include "bootmagic.h" 30#include "bootmagic.h"
33#include "eeconfig.h" 31#include "eeconfig.h"
34#include "backlight.h" 32#include "backlight.h"
35#include "suspend.h"
36#ifdef MOUSEKEY_ENABLE 33#ifdef MOUSEKEY_ENABLE
37# include "mousekey.h" 34# include "mousekey.h"
38#endif 35#endif
39#ifdef PS2_MOUSE_ENABLE 36#ifdef PS2_MOUSE_ENABLE
40# include "ps2_mouse.h" 37# include "ps2_mouse.h"
41#endif 38#endif
42#include "lufa.h"
43 39
44 40
45#ifdef MATRIX_HAS_GHOST 41#ifdef MATRIX_HAS_GHOST
@@ -87,25 +83,7 @@ void keyboard_task(void)
87 static uint8_t led_status = 0; 83 static uint8_t led_status = 0;
88 matrix_row_t matrix_row = 0; 84 matrix_row_t matrix_row = 0;
89 matrix_row_t matrix_change = 0; 85 matrix_row_t matrix_change = 0;
90 static uint32_t last_key_time = 0;
91 86
92/*
93#define SLEEP_TIME_MS 10000
94 // (USB_DeviceState == DEVICE_STATE_Suspended) {
95 //if (timer_elapsed32(last_key_time) > SLEEP_TIME_MS) {
96 // TODO: remove LUFA dependent code
97 if (!USB_IsInitialized && timer_elapsed32(last_key_time) > SLEEP_TIME_MS) {
98 matrix_power_down();
99 // TODO: power down only when no USB connection
100 // Or it makes USB connection lost or suspended
101 suspend_power_down(WDTO_15MS);
102 matrix_power_up();
103 }
104 else {
105 matrix_power_down();
106 matrix_power_up();
107 }
108*/
109 matrix_scan(); 87 matrix_scan();
110 for (uint8_t r = 0; r < MATRIX_ROWS; r++) { 88 for (uint8_t r = 0; r < MATRIX_ROWS; r++) {
111 matrix_row = matrix_get_row(r); 89 matrix_row = matrix_get_row(r);
@@ -127,7 +105,6 @@ void keyboard_task(void)
127 }); 105 });
128 // record a processed key 106 // record a processed key
129 matrix_prev[r] ^= ((matrix_row_t)1<<c); 107 matrix_prev[r] ^= ((matrix_row_t)1<<c);
130 last_key_time = timer_read32();
131 // process a key per task call 108 // process a key per task call
132 goto MATRIX_LOOP_END; 109 goto MATRIX_LOOP_END;
133 } 110 }