diff options
author | Jack Humbert <jack.humb@gmail.com> | 2017-08-20 13:51:06 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2017-08-20 13:52:28 -0400 |
commit | 166706a32c6d61f2af59ea29bb7d43e28a846138 (patch) | |
tree | ed28f691ca5619da7f2037b73ee740c28c028e30 | |
parent | 948d6efcfb3da9dc106742a0a1a15c2e133b1b1e (diff) | |
download | qmk_firmware-166706a32c6d61f2af59ea29bb7d43e28a846138.tar.gz qmk_firmware-166706a32c6d61f2af59ea29bb7d43e28a846138.zip |
adds subatomic files (non-working)
-rw-r--r-- | keyboards/subatomic/Makefile | 0 | ||||
-rw-r--r-- | keyboards/subatomic/config.h | 85 | ||||
-rw-r--r-- | keyboards/subatomic/keymaps/default/keymap.c | 70 | ||||
-rw-r--r-- | keyboards/subatomic/rules.mk | 69 | ||||
-rw-r--r-- | keyboards/subatomic/subatomic.c | 1 | ||||
-rw-r--r-- | keyboards/subatomic/subatomic.h | 6 |
6 files changed, 164 insertions, 67 deletions
diff --git a/keyboards/subatomic/Makefile b/keyboards/subatomic/Makefile new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/keyboards/subatomic/Makefile | |||
diff --git a/keyboards/subatomic/config.h b/keyboards/subatomic/config.h new file mode 100644 index 000000000..592434aab --- /dev/null +++ b/keyboards/subatomic/config.h | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | Copyright 2012 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 0x6063 | ||
26 | #define DEVICE_VER 0x0001 | ||
27 | #define MANUFACTURER Ortholinear Keyboards | ||
28 | #define PRODUCT The Subatomic Keyboard | ||
29 | #define DESCRIPTION A compact ortholinear keyboard | ||
30 | |||
31 | /* key matrix size */ | ||
32 | #define MATRIX_ROWS 5 | ||
33 | #define MATRIX_COLS 14 | ||
34 | |||
35 | /* Planck PCB default pin-out */ | ||
36 | #define MATRIX_ROW_PINS { D2, D5, B5, B6, D3 } | ||
37 | #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, C6, C5 } | ||
38 | #define UNUSED_PINS | ||
39 | |||
40 | // #define AUDIO_VOICES | ||
41 | // #define C6_AUDIO | ||
42 | |||
43 | #define BACKLIGHT_PIN B7 | ||
44 | |||
45 | /* COL2ROW or ROW2COL */ | ||
46 | #define DIODE_DIRECTION COL2ROW | ||
47 | |||
48 | /* define if matrix has ghost */ | ||
49 | //#define MATRIX_HAS_GHOST | ||
50 | |||
51 | /* number of backlight levels */ | ||
52 | #define BACKLIGHT_LEVELS 3 | ||
53 | |||
54 | /* Set 0 if debouncing isn't needed */ | ||
55 | #define DEBOUNCING_DELAY 5 | ||
56 | |||
57 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
58 | #define LOCKING_SUPPORT_ENABLE | ||
59 | /* Locking resynchronize hack */ | ||
60 | #define LOCKING_RESYNC_ENABLE | ||
61 | |||
62 | /* key combination for command */ | ||
63 | #define IS_COMMAND() ( \ | ||
64 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
65 | ) | ||
66 | |||
67 | /* | ||
68 | * Feature disable options | ||
69 | * These options are also useful to firmware size reduction. | ||
70 | */ | ||
71 | |||
72 | /* disable debug print */ | ||
73 | // #define NO_DEBUG | ||
74 | |||
75 | /* disable print */ | ||
76 | // #define NO_PRINT | ||
77 | |||
78 | /* disable action features */ | ||
79 | //#define NO_ACTION_LAYER | ||
80 | //#define NO_ACTION_TAPPING | ||
81 | //#define NO_ACTION_ONESHOT | ||
82 | //#define NO_ACTION_MACRO | ||
83 | //#define NO_ACTION_FUNCTION | ||
84 | |||
85 | #endif | ||
diff --git a/keyboards/subatomic/keymaps/default/keymap.c b/keyboards/subatomic/keymaps/default/keymap.c index c6af62548..c5041f6e1 100644 --- a/keyboards/subatomic/keymaps/default/keymap.c +++ b/keyboards/subatomic/keymaps/default/keymap.c | |||
@@ -160,54 +160,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
160 | 160 | ||
161 | }; | 161 | }; |
162 | 162 | ||
163 | #ifdef AUDIO_ENABLE | ||
164 | float tone_startup[][2] = { | ||
165 | {NOTE_B5, 20}, | ||
166 | {NOTE_B6, 8}, | ||
167 | {NOTE_DS6, 20}, | ||
168 | {NOTE_B6, 8} | ||
169 | }; | ||
170 | |||
171 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | ||
172 | float tone_dvorak[][2] = SONG(DVORAK_SOUND); | ||
173 | float tone_colemak[][2] = SONG(COLEMAK_SOUND); | ||
174 | |||
175 | float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | ||
176 | |||
177 | float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); | ||
178 | #endif | ||
179 | |||
180 | void persistent_default_layer_set(uint16_t default_layer) { | ||
181 | eeconfig_update_default_layer(default_layer); | ||
182 | default_layer_set(default_layer); | ||
183 | } | ||
184 | |||
185 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 163 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
186 | switch (keycode) { | 164 | switch (keycode) { |
187 | case QWERTY: | 165 | case QWERTY: |
188 | if (record->event.pressed) { | 166 | if (record->event.pressed) { |
189 | #ifdef AUDIO_ENABLE | 167 | set_single_persistent_default_layer(_QWERTY); |
190 | PLAY_SONG(tone_qwerty); | ||
191 | #endif | ||
192 | persistent_default_layer_set(1UL<<_QWERTY); | ||
193 | } | 168 | } |
194 | return false; | 169 | return false; |
195 | break; | 170 | break; |
196 | case COLEMAK: | 171 | case COLEMAK: |
197 | if (record->event.pressed) { | 172 | if (record->event.pressed) { |
198 | #ifdef AUDIO_ENABLE | 173 | set_single_persistent_default_layer(_COLEMAK); |
199 | PLAY_SONG(tone_colemak); | ||
200 | #endif | ||
201 | persistent_default_layer_set(1UL<<_COLEMAK); | ||
202 | } | 174 | } |
203 | return false; | 175 | return false; |
204 | break; | 176 | break; |
205 | case DVORAK: | 177 | case DVORAK: |
206 | if (record->event.pressed) { | 178 | if (record->event.pressed) { |
207 | #ifdef AUDIO_ENABLE | 179 | set_single_persistent_default_layer(_DVORAK); |
208 | PLAY_SONG(tone_dvorak); | ||
209 | #endif | ||
210 | persistent_default_layer_set(1UL<<_DVORAK); | ||
211 | } | 180 | } |
212 | return false; | 181 | return false; |
213 | break; | 182 | break; |
@@ -245,36 +214,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
245 | } | 214 | } |
246 | return true; | 215 | return true; |
247 | }; | 216 | }; |
248 | |||
249 | void matrix_init_user(void) { | ||
250 | #ifdef AUDIO_ENABLE | ||
251 | startup_user(); | ||
252 | #endif | ||
253 | } | ||
254 | |||
255 | #ifdef AUDIO_ENABLE | ||
256 | |||
257 | void startup_user() | ||
258 | { | ||
259 | _delay_ms(20); // gets rid of tick | ||
260 | PLAY_SONG(tone_startup); | ||
261 | } | ||
262 | |||
263 | void shutdown_user() | ||
264 | { | ||
265 | PLAY_SONG(tone_goodbye); | ||
266 | _delay_ms(150); | ||
267 | stop_all_notes(); | ||
268 | } | ||
269 | |||
270 | void music_on_user(void) | ||
271 | { | ||
272 | music_scale_user(); | ||
273 | } | ||
274 | |||
275 | void music_scale_user(void) | ||
276 | { | ||
277 | PLAY_SONG(music_scale); | ||
278 | } | ||
279 | |||
280 | #endif | ||
diff --git a/keyboards/subatomic/rules.mk b/keyboards/subatomic/rules.mk new file mode 100644 index 000000000..b4e2f488d --- /dev/null +++ b/keyboards/subatomic/rules.mk | |||
@@ -0,0 +1,69 @@ | |||
1 | |||
2 | |||
3 | # MCU name | ||
4 | MCU = at90usb1286 | ||
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 | # LUFA specific | ||
21 | # | ||
22 | # Target architecture (see library "Board Types" documentation). | ||
23 | ARCH = AVR8 | ||
24 | |||
25 | # Input clock frequency. | ||
26 | # This will define a symbol, F_USB, in all source code files equal to the | ||
27 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
28 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
29 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
30 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
31 | # at the end, this will be done automatically to create a 32-bit value in your | ||
32 | # source code. | ||
33 | # | ||
34 | # If no clock division is performed on the input clock inside the AVR (via the | ||
35 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
36 | F_USB = $(F_CPU) | ||
37 | |||
38 | # Interrupt driven control endpoint task(+60) | ||
39 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
40 | |||
41 | |||
42 | # Boot Section Size in *bytes* | ||
43 | # Teensy halfKay 512 | ||
44 | # Teensy++ halfKay 1024 | ||
45 | # Atmel DFU loader 4096 | ||
46 | # LUFA bootloader 4096 | ||
47 | # USBaspLoader 2048 | ||
48 | OPT_DEFS += -DBOOTLOADER_SIZE=8192 | ||
49 | |||
50 | # Build Options | ||
51 | # change to "no" to disable the options, or define them in the Makefile in | ||
52 | # the appropriate keymap folder that will get included automatically | ||
53 | # | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
55 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
57 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
60 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
61 | MIDI_ENABLE = yes # MIDI controls | ||
62 | AUDIO_ENABLE = yes # Audio output on port C6 | ||
63 | UNICODE_ENABLE = no # Unicode | ||
64 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
65 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | ||
66 | API_SYSEX_ENABLE = no | ||
67 | |||
68 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
69 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file | ||
diff --git a/keyboards/subatomic/subatomic.c b/keyboards/subatomic/subatomic.c new file mode 100644 index 000000000..f2120721c --- /dev/null +++ b/keyboards/subatomic/subatomic.c | |||
@@ -0,0 +1 @@ | |||
#include "subatomic.h" \ No newline at end of file | |||
diff --git a/keyboards/subatomic/subatomic.h b/keyboards/subatomic/subatomic.h new file mode 100644 index 000000000..b23cb8eb1 --- /dev/null +++ b/keyboards/subatomic/subatomic.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef SUBATOMIC_H | ||
2 | #define SUBATOMIC_H | ||
3 | |||
4 | #include "quantum.h" | ||
5 | |||
6 | #endif \ No newline at end of file | ||