diff options
author | tmk <nobody@nowhere> | 2011-02-21 15:43:17 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2011-02-22 03:09:14 +0900 |
commit | fb8d23c60c757d5d9c2270cb0123a53be2049a28 (patch) | |
tree | 2f5d695f9d501468dc83f4861e7367cdf905ed3f /ps2_vusb/main.c | |
parent | 47f5d8b545eec12ca74d8e7048bb5daa290d937e (diff) |
integrate V-USB support into ps2_usb
Diffstat (limited to 'ps2_vusb/main.c')
-rw-r--r-- | ps2_vusb/main.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/ps2_vusb/main.c b/ps2_vusb/main.c deleted file mode 100644 index 1ffe5e6ec0..0000000000 --- a/ps2_vusb/main.c +++ /dev/null @@ -1,62 +0,0 @@ -/* PS/2 to USB keyboard converter - * 2011/02/20 - * Copyright (c) 2011 tmk - */ -/* Name: main.c - * Project: hid-mouse, a very simple HID example - * Author: Christian Starkjohann - * Creation Date: 2008-04-07 - * Tabsize: 4 - * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id: main.c 790 2010-05-30 21:00:26Z cs $ - */ -#include <stdint.h> -#include <avr/wdt.h> -#include <avr/interrupt.h> -#include <util/delay.h> -#include "usbdrv.h" -#include "oddebug.h" -#include "host_vusb.h" -#include "keyboard.h" - - -#if 0 -#define DEBUGP_INIT() do { DDRC = 0xFF; } while (0) -#define DEBUGP(x) do { PORTC = x; } while (0) -#else -#define DEBUGP_INIT() -#define DEBUGP(x) -#endif - - -int main(void) -{ - DEBUGP_INIT(); - wdt_enable(WDTO_1S); - odDebugInit(); - usbInit(); - - /* enforce re-enumeration, do this while interrupts are disabled! */ - usbDeviceDisconnect(); - uint8_t i = 0; - /* fake USB disconnect for > 250 ms */ - while(--i){ - wdt_reset(); - _delay_ms(1); - } - usbDeviceConnect(); - sei(); - - keyboard_init(); - - while (1) { - DEBUGP(0x1); - wdt_reset(); - usbPoll(); - DEBUGP(0x2); - keyboard_proc(); - DEBUGP(0x3); - host_vusb_keyboard_send(); - } -} |