]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/lfkeyboards/lfk78/rules.mk
Fix the LFKeyboards so they work with the QMK Configurator (#4591)
[qmk_firmware.git] / keyboards / lfkeyboards / lfk78 / rules.mk
1 # Set the LFK78 hardware version.
2 #
3 # B   - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight
4 # C-H - at90usb1286, no audio, ISSI device 0 is backlight, 4 is RGB
5 # J   - at90usb646, C6 audio, ISSI device 0 is backlight, 4 is RGB
6 LFK_REV = J
7
8 ifeq ($(LFK_REV), B)
9     MCU = atmega32u4
10     OPT_DEFS += -DBOOTLOADER_SIZE=4096
11 else ifeq ($(LFK_REV), J)
12     MCU = at90usb646
13     OPT_DEFS += -DBOOTLOADER_SIZE=4096
14 else
15     MCU = at90usb1286
16     OPT_DEFS += -DBOOTLOADER_SIZE=8192
17 endif
18 OPT_DEFS += -DLFK_REV_$(LFK_REV)
19 OPT_DEFS += -DLFK_REV_STRING=\"Rev$(LFK_REV)\"
20
21 # Extra source files for IS3731 lighting
22 SRC = TWIlib.c issi.c lighting.c
23
24 # Processor frequency.
25 F_CPU = 16000000
26
27 # Target architecture (see library "Board Types" documentation).
28 ARCH = AVR8
29
30 # Input clock frequency.
31 F_USB = $(F_CPU)
32
33 # Interrupt driven control endpoint task(+60)
34 OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
35
36 BOOTMAGIC_ENABLE = no           # Virtual DIP switch configuration(+1000)
37 MOUSEKEY_ENABLE = no            # Mouse keys(+4700)
38 EXTRAKEY_ENABLE = yes           # Audio control and System control(+450)
39 CONSOLE_ENABLE = no             # Console for debug(+400)
40 COMMAND_ENABLE = no             # Commands for debug and configuration
41 NKRO_ENABLE = yes               # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
42 BACKLIGHT_ENABLE = yes          # Enable keyboard backlight functionality
43 MIDI_ENABLE = no                # MIDI controls
44 AUDIO_ENABLE = yes               # Audio output on port C6
45 UNICODE_ENABLE = no             # Unicode
46 BLUETOOTH_ENABLE = no           # Enable Bluetooth with the Adafruit EZ-Key HID
47 RGBLIGHT_ENABLE = yes           # Enable WS2812 RGB underlight.
48 RGBLIGHT_CUSTOM_DRIVER = yes    # RGB code is implemented in lefkeyboards, not qmk base
49 SLEEP_LED_ENABLE = yes          # Breathing sleep LED during USB suspend
50 TAP_DANCE_ENABLE = no
51
52 ISSI_ENABLE = yes               # If the I2C pullup resistors aren't install this must be disabled
53 WATCHDOG_ENABLE = no            # Resets keyboard if matrix_scan isn't run every 250ms
54 CAPSLOCK_LED = no              # Toggle back light LED of Caps Lock
55
56
57 ifeq ($(strip $(ISSI_ENABLE)), yes)
58     TMK_COMMON_DEFS += -DISSI_ENABLE
59 endif
60
61 ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
62     TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
63 endif
64
65 ifeq ($(strip $(CAPSLOCK_LED)), yes)
66     TMK_COMMON_DEFS += -DCAPSLOCK_LED
67 endif
68
69 # # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
70 # #
71 # # RevB - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight
72 # # RevC/D - at90usb1286, no audio, ISSI device 0 is backlight, 4 is RGB
73 # #
74 # # Set to B, C or D
75 # LFK_REV = D
76
77 # ifeq ($(LFK_REV), B)
78 #   MCU = atmega32u4
79 # else
80 #   MCU = at90usb1286
81 # endif
82 # OPT_DEFS += -DLFK_REV_$(LFK_REV)
83 # OPT_DEFS += -DUSB_PRODUCT=\"LFK_Rev$(LFK_REV)\"