diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2016-06-29 20:21:05 -0400 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2016-06-29 20:21:05 -0400 |
| commit | ba6fb23f079a03f978c81deda58d1d18e08c54dc (patch) | |
| tree | 61c168bc0d4f7f784c3c4227a8ee1fe14a3dbd5f | |
| parent | 7db2ec1509f6e90f8feea7c9fa73350544235a25 (diff) | |
| download | qmk_firmware-ba6fb23f079a03f978c81deda58d1d18e08c54dc.tar.gz qmk_firmware-ba6fb23f079a03f978c81deda58d1d18e08c54dc.zip | |
adds handwire and onekey example
| -rw-r--r-- | Makefile | 24 | ||||
| -rw-r--r-- | keyboards/handwired/handwired.c | 1 | ||||
| -rw-r--r-- | keyboards/handwired/handwired.h | 1 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/Makefile | 65 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/config.h | 75 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/keymaps/default/keymap.c | 5 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/onekey.c | 1 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/onekey.h | 1 |
8 files changed, 165 insertions, 8 deletions
| @@ -65,22 +65,24 @@ endif | |||
| 65 | 65 | ||
| 66 | KEYBOARD_PATH = $(TOP_DIR)/keyboards/$(KEYBOARD) | 66 | KEYBOARD_PATH = $(TOP_DIR)/keyboards/$(KEYBOARD) |
| 67 | 67 | ||
| 68 | ifdef sub | ||
| 69 | SUBPROJECT=$(sub) | ||
| 70 | endif | ||
| 71 | ifdef subproject | ||
| 72 | SUBPROJECT=$(subproject) | ||
| 73 | endif | ||
| 74 | |||
| 68 | ifneq ("$(wildcard $(KEYBOARD_PATH)/$(KEYBOARD).c)","") | 75 | ifneq ("$(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 |
| 73 | else | 82 | else |
| 74 | $(error "$(KEYBOARD_PATH)/$(KEYBOARD).c" does not exist) | 83 | $(error "$(KEYBOARD_PATH)/$(KEYBOARD).c" does not exist) |
| 75 | endif | 84 | endif |
| 76 | 85 | ||
| 77 | ifdef sub | ||
| 78 | SUBPROJECT=$(sub) | ||
| 79 | endif | ||
| 80 | ifdef subproject | ||
| 81 | SUBPROJECT=$(subproject) | ||
| 82 | endif | ||
| 83 | |||
| 84 | ifdef SUBPROJECT_DEFAULT | 86 | ifdef SUBPROJECT_DEFAULT |
| 85 | SUBPROJECT?=$(SUBPROJECT_DEFAULT) | 87 | SUBPROJECT?=$(SUBPROJECT_DEFAULT) |
| 86 | endif | 88 | endif |
| @@ -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 |
| 112 | else | 114 | else |
| 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 | ||
| 114 | endif | 122 | endif |
| 115 | 123 | ||
| 116 | ifdef SUBPROJECT | 124 | ifdef 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 | ||
| 4 | MCU = 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. | ||
| 17 | F_CPU = 16000000 | ||
| 18 | |||
| 19 | |||
| 20 | # | ||
| 21 | # LUFA specific | ||
| 22 | # | ||
| 23 | # Target architecture (see library "Board Types" documentation). | ||
| 24 | ARCH = 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. | ||
| 37 | F_USB = $(F_CPU) | ||
| 38 | |||
| 39 | # Interrupt driven control endpoint task(+60) | ||
| 40 | OPT_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 | ||
| 49 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 50 | |||
| 51 | |||
| 52 | # Build Options | ||
| 53 | # comment out to disable the options. | ||
| 54 | # | ||
| 55 | BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) | ||
| 56 | MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) | ||
| 57 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | ||
| 58 | CONSOLE_ENABLE ?= yes # Console for debug(+400) | ||
| 59 | COMMAND_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 | |||
| 63 | ifndef QUANTUM_DIR | ||
| 64 | include ../../../Makefile | ||
| 65 | endif \ 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 | /* | ||
| 2 | Copyright 2015 Jun Wako <wakojun@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along 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 | |||
| 3 | const 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 | |||
