diff options
author | tmk <nobody@nowhere> | 2012-08-25 15:49:08 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2012-08-28 21:56:15 +0900 |
commit | c5060ea81942b0e3f8577536ff78402a19abe3d3 (patch) | |
tree | bcdd4cd269be3064982014b0afdc0aea628d7048 /protocol/usb_hid/main.cpp | |
parent | 9382bf2f765cfbb8f7a9a48157391cac2bb71780 (diff) | |
download | qmk_firmware-c5060ea81942b0e3f8577536ff78402a19abe3d3.tar.gz qmk_firmware-c5060ea81942b0e3f8577536ff78402a19abe3d3.zip |
test build of 'Host shield' in minimal env.
Diffstat (limited to 'protocol/usb_hid/main.cpp')
-rw-r--r-- | protocol/usb_hid/main.cpp | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/protocol/usb_hid/main.cpp b/protocol/usb_hid/main.cpp deleted file mode 100644 index c292d458e2..0000000000 --- a/protocol/usb_hid/main.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include <util/delay.h> -#include <Arduino.h> -#include "Usb.h" -#include "hid.h" -#include "hidboot.h" -#include "parser.h" - - -USB Usb; -HIDBoot<HID_PROTOCOL_KEYBOARD> kbd(&Usb); -KBDReportParser Prs; - -void usb_disable() -{ - USBCON &= ~(1<<VBUSTI); - UDIEN = 0; - USBINT = 0; - UDINT = 0; - UDCON |= (1<<DETACH); - USBCON &= ~(1<<USBE); - PLLCSR = 0; - UHWCON &= ~(1<<UVREGE); - USBCON &= ~(1<<OTGPADE); -} - -void setup() -{ - usb_disable(); - - // RX LED for debug - DDRB |= (1<<0); - - Serial.begin( 115200 ); - while (!Serial) ; - - delay( 1000 ); - - Serial.println("Start"); - - if (Usb.Init() == -1) { - Serial.println("OSC did not start."); - } - - delay( 200 ); - - kbd.SetReportParser(0, (HIDReportParser*)&Prs); -} - -void loop() -{ - Usb.Task(); -} - -int main(void) -{ - // arduino/wiring.c(Timer initialize) - init(); - - setup(); - - for (;;) { - loop(); - } - - return 0; -} |