X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=converter%2Fps2_usb%2FMakefile.vusb;h=79c11639ea1a74e3a7bd115d409d51900b6710b5;hb=f664a993d2ab876435eccf25d1ec126d1f5e3191;hp=4d5240c30948f44b20484d3b126945b1b85b0994;hpb=62d1ebb91c7b381ce3d88aad9ee0b03bea9fce26;p=max%2Ftmk_keyboard.git diff --git a/converter/ps2_usb/Makefile.vusb b/converter/ps2_usb/Makefile.vusb index 4d5240c3..79c11639 100644 --- a/converter/ps2_usb/Makefile.vusb +++ b/converter/ps2_usb/Makefile.vusb @@ -1,30 +1,32 @@ -# -# Makefile for V-USB -# - - # Target file name (without extension). TARGET = ps2_usb_vusb # Directory common source filess exist -TOP_DIR = ../.. +TMK_DIR = ../../tmk_core # Directory keyboard dependent files exist TARGET_DIR = . # keyboard dependent files -SRC = main.c \ - keymap.c \ - matrix.c \ - led.c \ - ps2_usart.c +SRC = matrix.c \ + led.c + +ifdef KEYMAP + SRC := keymap_$(KEYMAP).c $(SRC) +else + SRC := keymap_plain.c $(SRC) +endif -CONFIG_H = config_vusb.h +CONFIG_H = config.h + + +# Use USART for PS/2. With V-USB INT and BUSYWAIT code is not useful. +PS2_USE_USART = yes # V-USB debug level: To use ps2_usart.c level must be 0 # ps2_usart.c requires USART to receive PS/2 signal. -OPT_DEFS = -DDEBUG_LEVEL=0 +OPT_DEFS += -DDEBUG_LEVEL=0 # MCU name, you MUST set this to match the board you are using @@ -33,7 +35,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. @@ -41,7 +44,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 @@ -85,8 +88,20 @@ AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER) PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) +# Boot Section Size in bytes +# Teensy halfKay 512 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBasp 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=2048 + + +# Search Path +VPATH += $(TARGET_DIR) +VPATH += $(TMK_DIR) + -include $(TOP_DIR)/protocol/vusb.mk -include $(TOP_DIR)/protocol.mk -include $(TOP_DIR)/common.mk -include $(TOP_DIR)/rules.mk +include $(TMK_DIR)/protocol.mk +include $(TMK_DIR)/common.mk +include $(TMK_DIR)/protocol/vusb.mk +include $(TMK_DIR)/rules.mk