bf1a37ba |
1 | # Target file name (without extension). |
1ac674db |
2 | TARGET = ps2_usb |
bf1a37ba |
3 | |
4 | # Directory common source filess exist |
afb08462 |
5 | TOP_DIR = ../.. |
bf1a37ba |
6 | |
7 | # Directory keyboard dependent files exist |
8 | TARGET_DIR = . |
9 | |
bf1a37ba |
10 | |
11 | # MCU name, you MUST set this to match the board you are using |
12 | # type "make clean" after changing this, so all files will be rebuilt |
13 | #MCU = at90usb162 # Teensy 1.0 |
14 | MCU = atmega32u4 # Teensy 2.0 |
15 | #MCU = at90usb646 # Teensy++ 1.0 |
16 | #MCU = at90usb1286 # Teensy++ 2.0 |
17 | |
18 | |
19 | # Processor frequency. |
20 | # Normally the first thing your program should do is set the clock prescaler, |
21 | # so your program will run at the correct speed. You should also set this |
22 | # variable to same clock speed. The _delay_ms() macro uses this, and many |
23 | # examples use this variable to calculate timings. Do not add a "UL" here. |
24 | F_CPU = 16000000 |
25 | |
26 | |
27 | # Build Options |
e2afc305 |
28 | # *Comment out* to disable the options. |
bf1a37ba |
29 | # |
30 | MOUSEKEY_ENABLE = yes # Mouse keys |
e67c9888 |
31 | EXTRAKEY_ENABLE = yes # Audio control and System control |
32 | NKRO_ENABLE = yes # USB Nkey Rollover |
bf1a37ba |
33 | |
1ac674db |
34 | PS2_USE_USART = yes # uses hardware USART engine for PS/2 signal receive(recomened) |
35 | #PS2_USE_INT = yes # uses external interrupt for falling edge of PS/2 clock pin |
36 | #PS2_USE_BUSYWAIT = yes # uses primitive reference code |
37 | |
38 | |
39 | # keyboard dependent files |
40 | SRC = keymap.c \ |
41 | matrix.c \ |
42 | led.c |
43 | |
44 | |
45 | ifdef PS2_USE_USART |
46 | SRC += protocol/ps2_usart.c |
47 | OPT_DEFS += -DPS2_USE_USART |
48 | endif |
49 | ifdef PS2_USE_INT |
50 | SRC += protocol/ps2.c |
51 | OPT_DEFS += -DPS2_USE_INT |
52 | endif |
53 | ifdef PS2_USE_BUSYWAIT |
54 | SRC += protocol/ps2.c |
55 | OPT_DEFS += -DPS2_USE_BUSYWAIT |
56 | endif |
57 | |
58 | |
59 | #CONFIG_H = config_pjrc_usart.h |
60 | CONFIG_H = config.h |
bf1a37ba |
61 | |
fb8d23c6 |
62 | |
63 | #---------------- Programming Options -------------------------- |
5de62e26 |
64 | PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex |
fb8d23c6 |
65 | |
66 | |
2769f09d |
67 | # Search Path |
68 | VPATH += $(TARGET_DIR) |
69 | VPATH += $(TOP_DIR) |
70 | |
fb8d23c6 |
71 | |
63d82fca |
72 | include $(TOP_DIR)/protocol/pjrc.mk |
73 | include $(TOP_DIR)/protocol.mk |
74 | include $(TOP_DIR)/common.mk |
75 | include $(TOP_DIR)/rules.mk |