From 6527e1d98a3323aaa9ada032395b69128f11842b Mon Sep 17 00:00:00 2001 From: tmk Date: Sat, 19 Mar 2016 08:08:49 +0900 Subject: [PATCH] ps2_usb: Fix for VUSB configuration --- converter/ps2_usb/Makefile.vusb | 5 +++-- converter/ps2_usb/config.h | 23 +++++++++++++++++++++++ tmk_core/protocol/vusb.mk | 1 + tmk_core/protocol/vusb/main.c | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/converter/ps2_usb/Makefile.vusb b/converter/ps2_usb/Makefile.vusb index d9fa12bc..1f2c209a 100644 --- a/converter/ps2_usb/Makefile.vusb +++ b/converter/ps2_usb/Makefile.vusb @@ -36,7 +36,8 @@ OPT_DEFS += -DDEBUG_LEVEL=0 #MCU = atmega32u4 # Teensy 2.0 #MCU = at90usb646 # Teensy++ 1.0 #MCU = at90usb1286 # Teensy++ 2.0 -MCU = atmega168 +#MCU = atmega168 +MCU = atmega328p # Processor frequency. @@ -44,7 +45,7 @@ MCU = atmega168 # so your program will run at the correct speed. You should also set this # variable to same clock speed. The _delay_ms() macro uses this, and many # examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 20000000 +F_CPU = 12000000 # Build Options diff --git a/converter/ps2_usb/config.h b/converter/ps2_usb/config.h index c0a4fab1..35eb414f 100644 --- a/converter/ps2_usb/config.h +++ b/converter/ps2_usb/config.h @@ -61,6 +61,7 @@ along with this program. If not, see . * PS/2 Pin interrupt */ #ifdef PS2_USE_INT +#if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) /* uses INT1 for clock line(ATMega32U4) */ #define PS2_CLOCK_PORT PORTD #define PS2_CLOCK_PIN PIND @@ -81,6 +82,28 @@ along with this program. If not, see . EIMSK &= ~(1<