summaryrefslogtreecommitdiff
path: root/ps2_vusb
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2011-02-15 21:14:55 +0900
committertmk <nobody@nowhere>2011-02-22 03:09:09 +0900
commit239bdbf41936566c0ae5b0cbd8c6bf7dd824f7fb (patch)
tree2a906df667e523d8b24b01e23ffae0c9bc815250 /ps2_vusb
parent3015f191a5d9268cb5ca7a0256597d3d76f4d200 (diff)
PS/2: request to resend when error is occured.
Diffstat (limited to 'ps2_vusb')
-rw-r--r--ps2_vusb/main.c51
1 files changed, 2 insertions, 49 deletions
diff --git a/ps2_vusb/main.c b/ps2_vusb/main.c
index 74c7a17e0d..5afbde01b4 100644
--- a/ps2_vusb/main.c
+++ b/ps2_vusb/main.c
@@ -49,7 +49,7 @@ int main(void)
usbInit();
print_enable = true;
- //debug_enable = true;
+ debug_enable = true;
keyboard_init();
/* enforce re-enumeration, do this while interrupts are disabled! */
@@ -64,56 +64,9 @@ int main(void)
//uint8_t fn_bits = 0;
while (1) { /* main event loop */
- DEBUGP(0x01);
wdt_reset();
usbPoll();
- host_vusb_keyboard_send();
-
- DEBUGP(0x02);
keyboard_proc();
- DEBUGP(0x03);
-/*
- matrix_scan();
- fn_bits = 0;
- host_swap_keyboard_report();
- host_clear_keyboard_report();
- mousekey_clear_report();
- for (int row = 0; row < matrix_rows(); row++) {
- for (int col = 0; col < matrix_cols(); col++) {
- if (!matrix_is_on(row, col)) continue;
-
- uint8_t code = layer_get_keycode(row, col);
- if (code == KB_NO) {
- // do nothing
- }
- else if (IS_MOD(code)) {
- host_add_mod_bit(MOD_BIT(code));
- }
- else if (IS_KEY(code)) {
- host_add_key(code);
- }
- else if (IS_FN(code)) {
- fn_bits |= FN_BIT(code);
- }
- else if (IS_MOUSEKEY(code)) {
- mousekey_decode(code);
- }
- else {
- debug("ignore keycode: "); debug_hex(code); debug("\n");
- }
- }
- }
- DEBUGP(0x03);
- layer_switching(fn_bits);
- if (matrix_is_modified()) {
- host_send_keyboard_report();
- }
- mousekey_send();
-
- if (last_led != host_keyboard_led()) {
- led_set(host_keyboard_led());
- last_led = host_keyboard_led();
- }
-*/
+ host_vusb_keyboard_send();
}
}