Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 1.9KB

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