aboutsummaryrefslogtreecommitdiff
path: root/keyboards/hhkb
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/hhkb')
-rw-r--r--keyboards/hhkb/Makefile91
-rw-r--r--keyboards/hhkb/readme.md8
-rw-r--r--keyboards/hhkb/rules.mk84
3 files changed, 91 insertions, 92 deletions
diff --git a/keyboards/hhkb/Makefile b/keyboards/hhkb/Makefile
index 6fe973e1e..4e2a6f00f 100644
--- a/keyboards/hhkb/Makefile
+++ b/keyboards/hhkb/Makefile
@@ -1,90 +1,3 @@
1 1ifndef MAKEFILE_INCLUDED
2
3# project specific files
4SRC = matrix.c
5
6# MCU name
7#MCU = at90usb1287
8MCU = atmega32u4
9
10# Processor frequency.
11# This will define a symbol, F_CPU, in all source code files equal to the
12# processor frequency in Hz. You can then use this symbol in your source code to
13# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
14# automatically to create a 32-bit value in your source code.
15#
16# This will be an integer division of F_USB below, as it is sourced by
17# F_USB after it has run through any CPU prescalers. Note that this value
18# does not *change* the processor frequency - it should merely be updated to
19# reflect the processor speed set externally so that the code can use accurate
20# software delays.
21F_CPU = 16000000
22
23
24#
25# LUFA specific
26#
27# Target architecture (see library "Board Types" documentation).
28ARCH = AVR8
29
30# Input clock frequency.
31# This will define a symbol, F_USB, in all source code files equal to the
32# input clock frequency (before any prescaling is performed) in Hz. This value may
33# differ from F_CPU if prescaling is used on the latter, and is required as the
34# raw input clock is fed directly to the PLL sections of the AVR for high speed
35# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
36# at the end, this will be done automatically to create a 32-bit value in your
37# source code.
38#
39# If no clock division is performed on the input clock inside the AVR (via the
40# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
41F_USB = $(F_CPU)
42
43# Interrupt driven control endpoint task(+60)
44OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
45
46
47# Boot Section Size in *bytes*
48# Teensy halfKay 512
49# Teensy++ halfKay 1024
50# Atmel DFU loader 4096
51# LUFA bootloader 4096
52# USBaspLoader 2048
53#OPT_DEFS += -DBOOTLOADER_SIZE=4096
54
55# as per original hasu settings
56OPT_DEFS += -DBOOTLOADER_SIZE=512
57
58# Build Options
59# comment out to disable the options.
60#
61BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
62MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
63EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
64CONSOLE_ENABLE ?= yes # Console for debug(+400)
65COMMAND_ENABLE ?= yes # Commands for debug and configuration
66CUSTOM_MATRIX ?= yes # Custom matrix file for the HHKB
67# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
68# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
69# NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
70# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
71# MIDI_ENABLE ?= YES # MIDI controls
72# UNICODE_ENABLE ?= YES # Unicode
73# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
74
75
76
77ifndef QUANTUM_DIR
78 include ../../Makefile 2 include ../../Makefile
79endif 3endif \ No newline at end of file
80
81ifneq (, $(findstring yes, $(HHKB_JP)))
82 OPT_DEFS += -DHHKB_JP
83endif
84
85debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION
86debug-on: all
87
88debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT
89debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS))
90debug-off: all
diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/readme.md
index 39d49b32a..367c0a08f 100644
--- a/keyboards/hhkb/readme.md
+++ b/keyboards/hhkb/readme.md
@@ -168,13 +168,15 @@ Download or clone the whole firmware and navigate to the keyboards/planck folder
168Depending on which keymap you would like to use, you will have to compile slightly differently. 168Depending on which keymap you would like to use, you will have to compile slightly differently.
169 169
170### Default 170### Default
171To build with the default keymap, simply run `make`. 171To build with the default keymap, simply run `make default`.
172 172
173### Other Keymaps 173### Other Keymaps
174Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a file in the keymaps folder named `<name>.c` and see keymap document (you can find in top readme.md) and existent keymap files. 174Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a file in the keymaps folder named `<name>.c` and see keymap document (you can find in top readme.md) and existent keymap files.
175 175
176To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: 176To build the firmware binary hex file with a keymap just do `make` with a keymap like this:
177
177``` 178```
178$ make KEYMAP=[default|jack|<name>] 179$ make [default|jack|<name>]
179``` 180```
181
180Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder. 182Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/rules.mk
new file mode 100644
index 000000000..b43b5e23f
--- /dev/null
+++ b/keyboards/hhkb/rules.mk
@@ -0,0 +1,84 @@
1
2
3# project specific files
4SRC = matrix.c
5
6# MCU name
7#MCU = at90usb1287
8MCU = atmega32u4
9
10# Processor frequency.
11# This will define a symbol, F_CPU, in all source code files equal to the
12# processor frequency in Hz. You can then use this symbol in your source code to
13# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
14# automatically to create a 32-bit value in your source code.
15#
16# This will be an integer division of F_USB below, as it is sourced by
17# F_USB after it has run through any CPU prescalers. Note that this value
18# does not *change* the processor frequency - it should merely be updated to
19# reflect the processor speed set externally so that the code can use accurate
20# software delays.
21F_CPU = 16000000
22
23
24#
25# LUFA specific
26#
27# Target architecture (see library "Board Types" documentation).
28ARCH = AVR8
29
30# Input clock frequency.
31# This will define a symbol, F_USB, in all source code files equal to the
32# input clock frequency (before any prescaling is performed) in Hz. This value may
33# differ from F_CPU if prescaling is used on the latter, and is required as the
34# raw input clock is fed directly to the PLL sections of the AVR for high speed
35# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
36# at the end, this will be done automatically to create a 32-bit value in your
37# source code.
38#
39# If no clock division is performed on the input clock inside the AVR (via the
40# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
41F_USB = $(F_CPU)
42
43# Interrupt driven control endpoint task(+60)
44OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
45
46
47# Boot Section Size in *bytes*
48# Teensy halfKay 512
49# Teensy++ halfKay 1024
50# Atmel DFU loader 4096
51# LUFA bootloader 4096
52# USBaspLoader 2048
53#OPT_DEFS += -DBOOTLOADER_SIZE=4096
54
55# as per original hasu settings
56OPT_DEFS += -DBOOTLOADER_SIZE=512
57
58# Build Options
59# comment out to disable the options.
60#
61BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
62MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
63EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
64CONSOLE_ENABLE ?= yes # Console for debug(+400)
65COMMAND_ENABLE ?= yes # Commands for debug and configuration
66CUSTOM_MATRIX ?= yes # Custom matrix file for the HHKB
67# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
68# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
69# NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
70# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
71# MIDI_ENABLE ?= YES # MIDI controls
72# UNICODE_ENABLE ?= YES # Unicode
73# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
74
75ifneq (, $(findstring yes, $(HHKB_JP)))
76 OPT_DEFS += -DHHKB_JP
77endif
78
79debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION
80debug-on: all
81
82debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT
83debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS))
84debug-off: all