rules.mk 2.9 KB

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