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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # Target file name (without extension).
  2. TARGET = ps2_usb_lufa
  3. # Directory common source filess exist
  4. TOP_DIR = ../..
  5. # Directory keyboard dependent files exist
  6. TARGET_DIR = .
  7. # project specific files
  8. SRC = keymap_common.c \
  9. matrix.c \
  10. led.c
  11. ifdef KEYMAP
  12. SRC := keymap_$(KEYMAP).c $(SRC)
  13. else
  14. SRC := keymap_plain.c $(SRC)
  15. endif
  16. CONFIG_H = config.h
  17. # MCU name
  18. #MCU = at90usb1287
  19. MCU = atmega32u4
  20. # Processor frequency.
  21. # This will define a symbol, F_CPU, in all source code files equal to the
  22. # processor frequency in Hz. You can then use this symbol in your source code to
  23. # calculate timings. Do NOT tack on a 'UL' at the end, this will be done
  24. # automatically to create a 32-bit value in your source code.
  25. #
  26. # This will be an integer division of F_USB below, as it is sourced by
  27. # F_USB after it has run through any CPU prescalers. Note that this value
  28. # does not *change* the processor frequency - it should merely be updated to
  29. # reflect the processor speed set externally so that the code can use accurate
  30. # software delays.
  31. F_CPU = 16000000
  32. #
  33. # LUFA specific
  34. #
  35. # Target architecture (see library "Board Types" documentation).
  36. ARCH = AVR8
  37. # Input clock frequency.
  38. # This will define a symbol, F_USB, in all source code files equal to the
  39. # input clock frequency (before any prescaling is performed) in Hz. This value may
  40. # differ from F_CPU if prescaling is used on the latter, and is required as the
  41. # raw input clock is fed directly to the PLL sections of the AVR for high speed
  42. # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
  43. # at the end, this will be done automatically to create a 32-bit value in your
  44. # source code.
  45. #
  46. # If no clock division is performed on the input clock inside the AVR (via the
  47. # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
  48. F_USB = $(F_CPU)
  49. # Interrupt driven control endpoint task(+60)
  50. OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
  51. # Boot Section Size in *bytes*
  52. # Teensy halfKay 512
  53. # Teensy++ halfKay 1024
  54. # Atmel DFU loader 4096
  55. # LUFA bootloader 4096
  56. # USBaspLoader 2048
  57. OPT_DEFS += -DBOOTLOADER_SIZE=4096
  58. # Build Options
  59. # comment out to disable the options.
  60. #
  61. #BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
  62. MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
  63. EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
  64. CONSOLE_ENABLE = yes # Console for debug(+400)
  65. COMMAND_ENABLE = yes # Commands for debug and configuration
  66. NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
  67. # PS/2 Options
  68. #
  69. PS2_USE_USART = yes # uses hardware USART engine for PS/2 signal receive(recomened)
  70. #PS2_USE_INT = yes # uses external interrupt for falling edge of PS/2 clock pin
  71. #PS2_USE_BUSYWAIT = yes # uses primitive reference code
  72. # Optimize size but this may cause error "relocation truncated to fit"
  73. #EXTRALDFLAGS = -Wl,--relax
  74. # Search Path
  75. VPATH += $(TARGET_DIR)
  76. VPATH += $(TOP_DIR)
  77. include $(TOP_DIR)/protocol.mk
  78. include $(TOP_DIR)/protocol/lufa.mk
  79. include $(TOP_DIR)/common.mk
  80. include $(TOP_DIR)/rules.mk