aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--converter/next_usb/Makefile26
-rw-r--r--converter/next_usb/Makefile.pjrc63
-rw-r--r--converter/next_usb/config.h38
3 files changed, 126 insertions, 1 deletions
diff --git a/converter/next_usb/Makefile b/converter/next_usb/Makefile
index 51d9de6b1..fef539a14 100644
--- a/converter/next_usb/Makefile
+++ b/converter/next_usb/Makefile
@@ -20,6 +20,7 @@ CONFIG_H = config.h
20MCU = atmega32u4 # Teensy 2.0 20MCU = atmega32u4 # Teensy 2.0
21#MCU = at90usb646 # Teensy++ 1.0 21#MCU = at90usb646 # Teensy++ 1.0
22#MCU = at90usb1286 # Teensy++ 2.0 22#MCU = at90usb1286 # Teensy++ 2.0
23#MCU = atmega32u2 # TMK converter
23 24
24 25
25# Processor frequency. 26# Processor frequency.
@@ -30,6 +31,29 @@ MCU = atmega32u4 # Teensy 2.0
30F_CPU = 16000000 31F_CPU = 16000000
31 32
32 33
34#
35# LUFA specific
36#
37# Target architecture (see library "Board Types" documentation).
38ARCH = AVR8
39
40# Input clock frequency.
41# This will define a symbol, F_USB, in all source code files equal to the
42# input clock frequency (before any prescaling is performed) in Hz. This value may
43# differ from F_CPU if prescaling is used on the latter, and is required as the
44# raw input clock is fed directly to the PLL sections of the AVR for high speed
45# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
46# at the end, this will be done automatically to create a 32-bit value in your
47# source code.
48#
49# If no clock division is performed on the input clock inside the AVR (via the
50# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
51F_USB = $(F_CPU)
52
53# Interrupt driven control endpoint task(+60)
54#OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
55
56
33# Boot Section Size in *bytes* 57# Boot Section Size in *bytes*
34# Teensy halfKay 512 58# Teensy halfKay 512
35# Teensy++ halfKay 1024 59# Teensy++ halfKay 1024
@@ -58,6 +82,6 @@ VPATH += $(TOP_DIR)
58 82
59 83
60include $(TOP_DIR)/protocol.mk 84include $(TOP_DIR)/protocol.mk
61include $(TOP_DIR)/protocol/pjrc.mk 85include $(TOP_DIR)/protocol/lufa.mk
62include $(TOP_DIR)/common.mk 86include $(TOP_DIR)/common.mk
63include $(TOP_DIR)/rules.mk 87include $(TOP_DIR)/rules.mk
diff --git a/converter/next_usb/Makefile.pjrc b/converter/next_usb/Makefile.pjrc
new file mode 100644
index 000000000..51d9de6b1
--- /dev/null
+++ b/converter/next_usb/Makefile.pjrc
@@ -0,0 +1,63 @@
1# Target file name (without extension).
2TARGET = next_usb
3
4# Directory common source filess exist
5TOP_DIR = ../..
6
7# Directory keyboard dependent files exist
8TARGET_DIR = .
9
10# keyboard dependent files
11SRC = keymap.c \
12 matrix.c \
13 led.c
14
15CONFIG_H = config.h
16
17# MCU name, you MUST set this to match the board you are using
18# type "make clean" after changing this, so all files will be rebuilt
19#MCU = at90usb162 # Teensy 1.0
20MCU = atmega32u4 # Teensy 2.0
21#MCU = at90usb646 # Teensy++ 1.0
22#MCU = at90usb1286 # Teensy++ 2.0
23
24
25# Processor frequency.
26# Normally the first thing your program should do is set the clock prescaler,
27# so your program will run at the correct speed. You should also set this
28# variable to same clock speed. The _delay_ms() macro uses this, and many
29# examples use this variable to calculate timings. Do not add a "UL" here.
30F_CPU = 16000000
31
32
33# Boot Section Size in *bytes*
34# Teensy halfKay 512
35# Teensy++ halfKay 1024
36# Atmel DFU loader 4096
37# LUFA bootloader 4096
38# USBaspLoader 2048
39OPT_DEFS += -DBOOTLOADER_SIZE=4096
40
41
42# Build Options
43# *Comment out* to disable the options.
44#
45#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
46MOUSEKEY_ENABLE = yes # Mouse keys
47EXTRAKEY_ENABLE = yes # Audio control and System control
48CONSOLE_ENABLE = yes # Console for debug(+400)
49COMMAND_ENABLE = yes # Commands for debug and configuration
50#NKRO_ENABLE = yes # USB Nkey Rollover
51
52SRC += next_kbd.c
53
54
55# Search Path
56VPATH += $(TARGET_DIR)
57VPATH += $(TOP_DIR)
58
59
60include $(TOP_DIR)/protocol.mk
61include $(TOP_DIR)/protocol/pjrc.mk
62include $(TOP_DIR)/common.mk
63include $(TOP_DIR)/rules.mk
diff --git a/converter/next_usb/config.h b/converter/next_usb/config.h
index b3d188b0c..cd80b5af1 100644
--- a/converter/next_usb/config.h
+++ b/converter/next_usb/config.h
@@ -60,6 +60,7 @@ POSSIBILITY OF SUCH DAMAGE.
60 60
61//#define TEENSY_CONFIG 1 61//#define TEENSY_CONFIG 1
62#define PRO_MICRO_CONFIG 1 62#define PRO_MICRO_CONFIG 1
63//#define TMK_CONFIG 1
63 64
64// comment out if you don't want the keyboard's LEDs to flash upon initialization 65// comment out if you don't want the keyboard's LEDs to flash upon initialization
65#define NEXT_KBD_INIT_FLASH_LEDS 66#define NEXT_KBD_INIT_FLASH_LEDS
@@ -143,6 +144,43 @@ POSSIBILITY OF SUCH DAMAGE.
143#endif 144#endif
144//================= End of Teensy 2.0 Configuration ================== 145//================= End of Teensy 2.0 Configuration ==================
145 146
147
148//================ Start of TMK converter Configuration =================
149#ifdef TMK_CONFIG
150
151// this is the debugging LED that flashes when a key is being pressed
152// comment out in order to disable debugging LED
153#define NEXT_KBD_LED1_PORT PORTD
154#define NEXT_KBD_LED1_PIN PIND
155#define NEXT_KBD_LED1_DDR DDRD
156#define NEXT_KBD_LED1_BIT 6
157
158#define NEXT_KBD_LED1_ON NEXT_KBD_LED1_PORT |= (1<<NEXT_KBD_LED1_BIT);
159#define NEXT_KBD_LED1_OFF NEXT_KBD_LED1_PORT &= ~(1<<NEXT_KBD_LED1_BIT);
160
161// corresponds to the Keyboard In wire on the NeXT connector
162#define NEXT_KBD_OUT_PORT PORTD
163#define NEXT_KBD_OUT_PIN PIND
164#define NEXT_KBD_OUT_DDR DDRD
165#define NEXT_KBD_OUT_BIT 1
166
167// corresponds to the Keyboard Out wire on the NeXT connector
168#define NEXT_KBD_IN_PORT PORTD
169#define NEXT_KBD_IN_PIN PIND
170#define NEXT_KBD_IN_DDR DDRD
171#define NEXT_KBD_IN_BIT 0
172
173// this pin is an input for the power key on the NeXT keyboard
174// as the keyboard is powered on this should be normally high;
175// if it is pulled low it means the power button is being preseed
176#define NEXT_KBD_PWR_PORT PORTD
177#define NEXT_KBD_PWR_PIN PIND
178#define NEXT_KBD_PWR_DDR DDRD
179#define NEXT_KBD_PWR_BIT 4
180
181#endif
182//================= End of TMK converter Configuration ==================
183
146/* key combination for command */ 184/* key combination for command */
147#define IS_COMMAND() ( \ 185#define IS_COMMAND() ( \
148 (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))|| \ 186 (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))|| \