aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-06-29 20:21:05 -0400
committerJack Humbert <jack.humb@gmail.com>2016-06-29 20:21:05 -0400
commitba6fb23f079a03f978c81deda58d1d18e08c54dc (patch)
tree61c168bc0d4f7f784c3c4227a8ee1fe14a3dbd5f
parent7db2ec1509f6e90f8feea7c9fa73350544235a25 (diff)
downloadqmk_firmware-ba6fb23f079a03f978c81deda58d1d18e08c54dc.tar.gz
qmk_firmware-ba6fb23f079a03f978c81deda58d1d18e08c54dc.zip
adds handwire and onekey example
-rw-r--r--Makefile24
-rw-r--r--keyboards/handwired/handwired.c1
-rw-r--r--keyboards/handwired/handwired.h1
-rw-r--r--keyboards/handwired/onekey/Makefile65
-rw-r--r--keyboards/handwired/onekey/config.h75
-rw-r--r--keyboards/handwired/onekey/keymaps/default/keymap.c5
-rw-r--r--keyboards/handwired/onekey/onekey.c1
-rw-r--r--keyboards/handwired/onekey/onekey.h1
8 files changed, 165 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 5642aa283..f9b865b9f 100644
--- a/Makefile
+++ b/Makefile
@@ -65,22 +65,24 @@ endif
65 65
66KEYBOARD_PATH = $(TOP_DIR)/keyboards/$(KEYBOARD) 66KEYBOARD_PATH = $(TOP_DIR)/keyboards/$(KEYBOARD)
67 67
68ifdef sub
69 SUBPROJECT=$(sub)
70endif
71ifdef subproject
72 SUBPROJECT=$(subproject)
73endif
74
68ifneq ("$(wildcard $(KEYBOARD_PATH)/$(KEYBOARD).c)","") 75ifneq ("$(wildcard $(KEYBOARD_PATH)/$(KEYBOARD).c)","")
69 KEYBOARD_FILE = keyboards/$(KEYBOARD)/$(KEYBOARD).c 76 KEYBOARD_FILE = keyboards/$(KEYBOARD)/$(KEYBOARD).c
70 ifndef ARCH 77 ifndef ARCH
71 include $(KEYBOARD_PATH)/Makefile 78 ifneq ("$(wildcard $(KEYBOARD_PATH)/Makefile)","")
79 include $(KEYBOARD_PATH)/Makefile
80 endif
72 endif 81 endif
73else 82else
74$(error "$(KEYBOARD_PATH)/$(KEYBOARD).c" does not exist) 83$(error "$(KEYBOARD_PATH)/$(KEYBOARD).c" does not exist)
75endif 84endif
76 85
77ifdef sub
78 SUBPROJECT=$(sub)
79endif
80ifdef subproject
81 SUBPROJECT=$(subproject)
82endif
83
84ifdef SUBPROJECT_DEFAULT 86ifdef SUBPROJECT_DEFAULT
85 SUBPROJECT?=$(SUBPROJECT_DEFAULT) 87 SUBPROJECT?=$(SUBPROJECT_DEFAULT)
86endif 88endif
@@ -110,7 +112,13 @@ ifneq ("$(wildcard $(KEYMAP_PATH)/keymap.c)","")
110 KEYMAP_FILE = keyboards/$(KEYBOARD)/keymaps/$(KEYMAP)/keymap.c 112 KEYMAP_FILE = keyboards/$(KEYBOARD)/keymaps/$(KEYMAP)/keymap.c
111 -include $(KEYMAP_PATH)/Makefile 113 -include $(KEYMAP_PATH)/Makefile
112else 114else
115 ifeq ("$(wildcard $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)/keymap.c)","")
113$(error "$(KEYMAP_PATH)/keymap.c" does not exist) 116$(error "$(KEYMAP_PATH)/keymap.c" does not exist)
117 else
118 KEYMAP_PATH = $(SUBPROJECT_PATH)/keymaps/$(KEYMAP)
119 KEYMAP_FILE = keyboards/$(KEYBOARD)/$(SUBPROJECT)/keymaps/$(KEYMAP)/keymap.c
120 -include $(KEYMAP_PATH)/Makefile
121 endif
114endif 122endif
115 123
116ifdef SUBPROJECT 124ifdef SUBPROJECT
diff --git a/keyboards/handwired/handwired.c b/keyboards/handwired/handwired.c
new file mode 100644
index 000000000..feef8a919
--- /dev/null
+++ b/keyboards/handwired/handwired.c
@@ -0,0 +1 @@
#include "handwired.h" \ No newline at end of file
diff --git a/keyboards/handwired/handwired.h b/keyboards/handwired/handwired.h
new file mode 100644
index 000000000..7a4a4835e
--- /dev/null
+++ b/keyboards/handwired/handwired.h
@@ -0,0 +1 @@
#include "quantum.h" \ No newline at end of file
diff --git a/keyboards/handwired/onekey/Makefile b/keyboards/handwired/onekey/Makefile
new file mode 100644
index 000000000..c6d10856a
--- /dev/null
+++ b/keyboards/handwired/onekey/Makefile
@@ -0,0 +1,65 @@
1
2
3# MCU name
4MCU = atmega32u4
5
6# Processor frequency.
7# This will define a symbol, F_CPU, in all source code files equal to the
8# processor frequency in Hz. You can then use this symbol in your source code to
9# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
10# automatically to create a 32-bit value in your source code.
11#
12# This will be an integer division of F_USB below, as it is sourced by
13# F_USB after it has run through any CPU prescalers. Note that this value
14# does not *change* the processor frequency - it should merely be updated to
15# reflect the processor speed set externally so that the code can use accurate
16# software delays.
17F_CPU = 16000000
18
19
20#
21# LUFA specific
22#
23# Target architecture (see library "Board Types" documentation).
24ARCH = AVR8
25
26# Input clock frequency.
27# This will define a symbol, F_USB, in all source code files equal to the
28# input clock frequency (before any prescaling is performed) in Hz. This value may
29# differ from F_CPU if prescaling is used on the latter, and is required as the
30# raw input clock is fed directly to the PLL sections of the AVR for high speed
31# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
32# at the end, this will be done automatically to create a 32-bit value in your
33# source code.
34#
35# If no clock division is performed on the input clock inside the AVR (via the
36# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
37F_USB = $(F_CPU)
38
39# Interrupt driven control endpoint task(+60)
40OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
41
42
43# Boot Section Size in *bytes*
44# Teensy halfKay 512
45# Teensy++ halfKay 1024
46# Atmel DFU loader 4096
47# LUFA bootloader 4096
48# USBaspLoader 2048
49OPT_DEFS += -DBOOTLOADER_SIZE=4096
50
51
52# Build Options
53# comment out to disable the options.
54#
55BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
56MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
57EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
58CONSOLE_ENABLE ?= yes # Console for debug(+400)
59COMMAND_ENABLE ?= yes # Commands for debug and configuration
60#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
61#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
62
63ifndef QUANTUM_DIR
64 include ../../../Makefile
65endif \ No newline at end of file
diff --git a/keyboards/handwired/onekey/config.h b/keyboards/handwired/onekey/config.h
new file mode 100644
index 000000000..c0a6b5839
--- /dev/null
+++ b/keyboards/handwired/onekey/config.h
@@ -0,0 +1,75 @@
1/*
2Copyright 2015 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6464
26#define DEVICE_VER 0x0001
27#define MANUFACTURER none
28#define PRODUCT onekey
29#define DESCRIPTION test board for qmk
30
31/* key matrix size */
32#define MATRIX_ROWS 1
33#define MATRIX_COLS 1
34
35#define MATRIX_COL_PINS { B0 }
36#define MATRIX_ROW_PINS { D0 }
37#define UNUSED_PINS
38
39/* define if matrix has ghost */
40//#define MATRIX_HAS_GHOST
41
42/* Set 0 if debouncing isn't needed */
43#define DEBOUNCE 5
44
45/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
46#define LOCKING_SUPPORT_ENABLE
47/* Locking resynchronize hack */
48#define LOCKING_RESYNC_ENABLE
49
50/* key combination for command */
51#define IS_COMMAND() ( \
52 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
53)
54
55
56
57/*
58 * Feature disable options
59 * These options are also useful to firmware size reduction.
60 */
61
62/* disable debug print */
63//#define NO_DEBUG
64
65/* disable print */
66//#define NO_PRINT
67
68/* disable action features */
69//#define NO_ACTION_LAYER
70//#define NO_ACTION_TAPPING
71//#define NO_ACTION_ONESHOT
72//#define NO_ACTION_MACRO
73//#define NO_ACTION_FUNCTION
74
75#endif
diff --git a/keyboards/handwired/onekey/keymaps/default/keymap.c b/keyboards/handwired/onekey/keymaps/default/keymap.c
new file mode 100644
index 000000000..756c4f51e
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/default/keymap.c
@@ -0,0 +1,5 @@
1#include "onekey.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4 { KC_A }
5};
diff --git a/keyboards/handwired/onekey/onekey.c b/keyboards/handwired/onekey/onekey.c
new file mode 100644
index 000000000..c79e0120e
--- /dev/null
+++ b/keyboards/handwired/onekey/onekey.c
@@ -0,0 +1 @@
#include "onekey.h" \ No newline at end of file
diff --git a/keyboards/handwired/onekey/onekey.h b/keyboards/handwired/onekey/onekey.h
new file mode 100644
index 000000000..7a4a4835e
--- /dev/null
+++ b/keyboards/handwired/onekey/onekey.h
@@ -0,0 +1 @@
#include "quantum.h" \ No newline at end of file