]>
git.gir.st - tmk_keyboard.git/blob - ps2_vusb/main.c
2 * Project: hid-mouse, a very simple HID example
3 * Author: Christian Starkjohann
4 * Creation Date: 2008-04-07
6 * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH
7 * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
8 * This Revision: $Id: main.c 790 2010-05-30 21:00:26Z cs $
13 #include <avr/interrupt.h> /* for sei() */
14 #include <avr/pgmspace.h> /* required by usbdrv.h */
15 #include <util/delay.h> /* for _delay_ms() */
17 #include "usart_print.h" /* This is also an example for using debug macros */
18 #include "usb_keycodes.h"
19 #include "matrix_skel.h"
20 #include "keymap_skel.h"
27 #include "host_vusb.h"
32 #define DEBUGP_INIT() do { DDRC = 0xFF; } while (0)
33 #define DEBUGP(x) do { PORTC = x; } while (0)
35 //static uint8_t last_led = 0;
40 /* Even if you don't use the watchdog, turn it off here. On newer devices,
41 * the status of the watchdog (on/off, period) is PRESERVED OVER RESET!
44 /* RESET status: all port bits are inputs without pull-up.
45 * That's the way we need D+ and D-. Therefore we don't need any
46 * additional hardware initialization.
55 /* enforce re-enumeration, do this while interrupts are disabled! */
56 usbDeviceDisconnect();
58 while(--i
){ /* fake USB disconnect for > 250 ms */
65 //uint8_t fn_bits = 0;
66 while (1) { /* main event loop */
70 host_vusb_keyboard_send();