87e6d0137484fdc8e076eb79dbbed47836eba2c5

Author
GO <44800276+GoTakigawa@users.noreply.github.com>
Committer
Drashna Jaelre <drashna@live.com>
Date

Message

Keyboard: add newgame (#4466)

* Add files via upload

* Add files via upload

* Update keyboards/newgame40/keymaps/default/keymap.c

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/keymaps/default/keymap.c

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/newgame40.h

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/keymaps/default/keymap.c

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/keymaps/default/keymap.c

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/keymaps/default/keymap.c

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/keymaps/default/keymap.c

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/keymaps/default/keymap.c

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/keymaps/default/keymap.c

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/keymaps/default/keymap.c

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/config.h

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/config.h

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/config.h

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/config.h

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/config.h

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/keymaps/default/keymap.c

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/config.h

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/rules.mk

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/rules.mk

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Add readme (newgame40)

* Update keyboards/newgame40/readme.md

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keyboards/newgame40/readme.md

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Update keymap.c

* Update keyboards/newgame40/rules.mk

Co-Authored-By: GoTakigawa <44800276+GoTakigawa@users.noreply.github.com>

* Add files via upload

* remove community/ortho_4x10

Diff

This diff is truncated to protect this page.

  1diff --git a/keyboards/newgame40/config.h b/keyboards/newgame40/config.h
  2new file mode 100644
  3index 0000000000000000000000000000000000000000..01c9142f7719398a2cc6d482ac5e708990aeffb8
  4--- /dev/null
  5+++ b/keyboards/newgame40/config.h
  6@@ -0,0 +1,75 @@
  7+/*
  8+Copyright 2018 Go Takigawa <gotakigawa@gmail.com>
  9+
 10+This program is free software: you can redistribute it and/or modify
 11+it under the terms of the GNU General Public License as published by
 12+the Free Software Foundation, either version 2 of the License, or
 13+(at your option) any later version.
 14+
 15+This program is distributed in the hope that it will be useful,
 16+but WITHOUT ANY WARRANTY; without even the implied warranty of
 17+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 18+GNU General Public License for more details.
 19+
 20+You should have received a copy of the GNU General Public License
 21+along with this program.  If not, see <http://www.gnu.org/licenses/>.
 22+*/
 23+
 24+#pragma once
 25+
 26+#include "config_common.h"
 27+
 28+/* USB Device descriptor parameter */
 29+#define VENDOR_ID       0xFEED
 30+#define PRODUCT_ID      0x0000
 31+#define DEVICE_VER      0x0001
 32+#define MANUFACTURER    GoTakigawa
 33+#define PRODUCT         NEWGAME40
 34+#define DESCRIPTION     4x10key keyboard
 35+
 36+/* key matrix size */
 37+#define MATRIX_ROWS 4
 38+#define MATRIX_COLS 10
 39+
 40+/* pin-out */
 41+#define MATRIX_ROW_PINS { F7, B1, B3, B2 }
 42+#define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5 }
 43+#define UNUSED_PINS
 44+
 45+/* ws2812 RGB LED */
 46+#define RGB_DI_PIN F6
 47+#define RGBLIGHT_ANIMATIONS
 48+#define RGBLED_NUM 25    // Number of LEDs
 49+#define RGBLIGHT_HUE_STEP 10
 50+#define RGBLIGHT_SAT_STEP 17
 51+
 52+#ifndef IOS_DEVICE_ENABLE
 53+  #if RGBLED_NUM <= 6
 54+    #define RGBLIGHT_LIMIT_VAL 255
 55+  #else
 56+    #define RGBLIGHT_LIMIT_VAL 130
 57+  #endif
 58+  #define RGBLIGHT_VAL_STEP 17
 59+#else
 60+  #if RGBLED_NUM <= 6
 61+    #define RGBLIGHT_LIMIT_VAL 90
 62+  #else
 63+    #define RGBLIGHT_LIMIT_VAL 45
 64+  #endif
 65+  #define RGBLIGHT_VAL_STEP 4
 66+#endif
 67+#define RGBLIGHT_HUE_STEP 10
 68+#define RGBLIGHT_SAT_STEP 17
 69+
 70+#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
 71+  #define USB_MAX_POWER_CONSUMPTION 400
 72+#else
 73+  // fix iPhone and iPad power adapter issue
 74+  // iOS device need lessthan 100
 75+  #define USB_MAX_POWER_CONSUMPTION 100
 76+#endif
 77+/* COL2ROW or ROW2COL */
 78+#define DIODE_DIRECTION COL2ROW
 79+
 80+#define TAPPING_TERM 200
 81+
 82diff --git a/keyboards/newgame40/info.json b/keyboards/newgame40/info.json
 83new file mode 100644
 84index 0000000000000000000000000000000000000000..0239614082b92a5730f3b92f0b7ada8348cb5ead
 85--- /dev/null
 86+++ b/keyboards/newgame40/info.json
 87@@ -0,0 +1,13 @@
 88+{
 89+  "keyboard_name": "NEWGAME40",
 90+  "url": "",
 91+  "maintainer": "qmk",
 92+  "width": 10,
 93+  "height": 4,
 94+  "layouts": {
 95+    "LAYOUT_ortho_4x10": {
 96+      "key_count": 40,
 97diff --git a/keyboards/newgame40/keymaps/default/config.h b/keyboards/newgame40/keymaps/default/config.h
 98new file mode 100644
 99index 0000000000000000000000000000000000000000..d533d806c90c80149c283434445a79ee164a554c
100--- /dev/null
101+++ b/keyboards/newgame40/keymaps/default/config.h
102@@ -0,0 +1,5 @@
103+
104+
105+#pragma once
106+
107+// place overrides here
108diff --git a/keyboards/newgame40/keymaps/default/keymap.c b/keyboards/newgame40/keymaps/default/keymap.c
109new file mode 100644
110index 0000000000000000000000000000000000000000..b42fef00fe03b5e58128a19ff9ba28e5d95b3330
111--- /dev/null
112+++ b/keyboards/newgame40/keymaps/default/keymap.c
113@@ -0,0 +1,208 @@
114+/* Copyright 2018 GoTakigawa
115+ *
116+ * This program is free software: you can redistribute it and/or modify
117+ * it under the terms of the GNU General Public License as published by
118+ * the Free Software Foundation, either version 2 of the License, or
119+ * (at your option) any later version.
120+ *
121+ * This program is distributed in the hope that it will be useful,
122+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
123+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
124+ * GNU General Public License for more details.
125+ *
126+ * You should have received a copy of the GNU General Public License
127+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
128+ */
129+
130+ #include QMK_KEYBOARD_H
131+
132+ extern keymap_config_t keymap_config;
133+
134+enum layers {
135+  _QWERTY,
136+  _COLEMAK,
137+  _DVORAK,
138+  _EUCALYN,
139+  _LOWER,
140+  _RAISE,
141+  _ADJUST,
142+};
143+
144+ enum custom_keycodes {
145+   QWERTY = SAFE_RANGE,
146+   COLEMAK,
147+   DVORAK,
148+   LOWER,
149+   RAISE,
150+   EUCALYN,
151+   ADJUST,
152+ };
153+
154+ // Fillers to make layering more clear
155+ #define LOWER MO(_LOWER)
156+ #define RAISE MO(_RAISE)
157+
158+ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
159+
160+ /* Qwerty
161+  * ,---------------------------------------------------------------------.
162+  * |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  |
163+  * |------+------+------+------+------+------|------+------+------+------|
164+  * |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   -  |
165+  * |------+------+------+------+------+------+-------------+------+------|
166+  * |   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |
167+  * |-------------+------+------+------+------+------+------+------+------'
168+  * |Shift |  GUI |Lower | Ctrl |Space | Bksp |Enter |Raise | Left |Right |
169+  * `---------------------------------------------------------------------'
170+  */
171+ [_QWERTY] = LAYOUT_ortho_4x10( \
172+   KC_Q,     KC_W,     KC_E,      KC_R,      KC_T,      KC_Y,      KC_U,      KC_I,      KC_O,      KC_P,     \
173+   KC_A,     KC_S,     KC_D,      KC_F,      KC_G,      KC_H,      KC_J,      KC_K,      KC_L,      KC_MINS,  \
174+   KC_Z,     KC_X,     KC_C,      KC_V,      KC_B,      KC_N,      KC_M,      KC_COMM,   KC_DOT,    KC_SLSH,  \
175+   KC_LSFT, KC_LGUI, LT(_LOWER,KC_LANG2),  KC_LCTL, KC_SPC,  KC_BSPC, KC_ENT, LT(_RAISE,KC_LANG1),  KC_LEFT, KC_RGHT\
176+ ),
177+
178+ /* Colemak
179+  * ,---------------------------------------------------------------------.
180+  * |   Q  |   W  |   F  |   P  |   G  |   J  |   L  |   U  |   Y  |   -  |
181+  * |------+------+------+------+------+------|------+------+------+------|
182+  * |   A  |   R  |   S  |   T  |   D  |   H  |   N  |   E  |   I  |   O  |
183+  * |------+------+------+------+------+------+-------------+------+------|
184+  * |   Z  |   X  |   C  |   V  |   B  |   K  |   M  |   ,  |   .  |   /  |
185+  * |-------------+------+------+------+------+------+------+------+------'
186+  * |Shift |  GUI |Lower | Ctrl |Space | Bksp |Enter |Raise | Left |Right |
187+  * `---------------------------------------------------------------------'
188+  */
189+ [_COLEMAK] = LAYOUT_ortho_4x10( \
190+   KC_Q,     KC_W,     KC_F,      KC_P,      KC_G,      KC_J,      KC_L,      KC_U,      KC_Y,      KC_MINS,  \
191+   KC_A,     KC_R,     KC_S,      KC_T,      KC_D,      KC_H,      KC_N,      KC_E,      KC_I,      KC_O,     \
192+   KC_Z,     KC_X,     KC_C,      KC_V,      KC_B,      KC_K,      KC_M,      KC_COMM,   KC_DOT,    KC_SLSH,  \
193+   KC_LSFT, KC_LGUI, LT(_LOWER,KC_LANG2),  KC_LCTL, KC_SPC,  KC_BSPC, KC_ENT, LT(_RAISE,KC_LANG1),  KC_LEFT, KC_RGHT\
194+ ),
195+
196+ /* Dvorak
197+  * ,---------------------------------------------------------------------.
198+  * |   "  |   ,  |   .  |   P  |   Y  |   F  |   G  |   C  |   R  |   L  |
199+  * |------+------+------+------+------+------|------+------+------+------|
200+  * |   A  |   O  |   E  |   U  |   I  |   D  |   H  |   T  |   N  |   S  |
201+  * |------+------+------+------+------+------+-------------+------+------|
202+  * |   ;  |   Q  |   J  |   K  |   X  |   B  |   M  |   W  |   V  |   Z  |
203+  * |-------------+------+------+------+------+------+------+------+------'
204+  * |Shift |  GUI |Lower | Ctrl |Space | Bksp |Enter |Raise | Left |Right |
205+  * `---------------------------------------------------------------------'
206+  */
207+ [_DVORAK] = LAYOUT_ortho_4x10( \
208+   KC_QUOT,   KC_COMM,  KC_DOT,    KC_P,      KC_Y,       KC_F,     KC_G,      KC_C,     KC_R,      KC_L, \
209+   KC_A,      KC_O,     KC_E,      KC_U,      KC_I,       KC_D,     KC_H,      KC_T,     KC_N,      KC_S, \
210+   KC_SCLN,   KC_Q,     KC_J,      KC_K,      KC_X,       KC_B,     KC_M,      KC_W,     KC_V,      KC_Z, \
211+   KC_LSFT, KC_LGUI, LT(_LOWER,KC_LANG2),  KC_LCTL, KC_SPC,  KC_BSPC, KC_ENT, LT(_RAISE,KC_LANG1),  KC_LEFT, KC_RGHT\
212+ ),
213diff --git a/keyboards/newgame40/newgame40.c b/keyboards/newgame40/newgame40.c
214new file mode 100644
215index 0000000000000000000000000000000000000000..e55b25b3d0d714458314145b9dba048228a65fc2
216--- /dev/null
217+++ b/keyboards/newgame40/newgame40.c
218@@ -0,0 +1,5 @@
219+#include "newgame40.h"
220+
221+void matrix_init_kb(void) {
222+	matrix_init_user();
223+}
224diff --git a/keyboards/newgame40/newgame40.h b/keyboards/newgame40/newgame40.h
225new file mode 100644
226index 0000000000000000000000000000000000000000..6044f3765747f2caea97c341e2732a24e9350aa7
227--- /dev/null
228+++ b/keyboards/newgame40/newgame40.h
229@@ -0,0 +1,19 @@
230+#ifndef NEWGAME40_H
231+#define NEWGAME40_H
232+
233+#include "quantum.h"
234+
235+#define LAYOUT_ortho_4x10( \
236+      k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, \
237+      k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, \
238+      k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, \
239+      k401, k402, k403, k404, k405, k406, k407, k408, k409, k410 \
240+) \
241+{ \
242+      {k101, k102, k103, k104, k105, k106, k107, k108, k109, k110}, \
243+      {k201, k202, k203, k204, k205, k206, k207, k208, k209, k210}, \
244+      {k301, k302, k303, k304, k305, k306, k307, k308, k309, k310}, \
245+      {k401, k402, k403, k404, k405, k406, k407, k408, k409, k410} \
246+}
247+
248+#endif
249diff --git a/keyboards/newgame40/readme.md b/keyboards/newgame40/readme.md
250new file mode 100644
251index 0000000000000000000000000000000000000000..2aa568cfb09ab18c29e5180082be8d17d82ecadd
252--- /dev/null
253+++ b/keyboards/newgame40/readme.md
254@@ -0,0 +1,17 @@
255+# NEWGAME40
256+
257+![NEWGAME40](https://i.imgur.com/HtujXda.jpg)
258+
259+40% (4x10) ortholinear keyboard.
260+
261+Keyboard Maintainer:
262+[GoTakigawa](https://github.com/GoTakigawa)
263+[@Go_Drums](https://twitter.com/Go_Drums)  
264+Hardware Supported: The NEWGAME40 PCBs, ProMicro supported  
265+Hardware Availability: Group buy soon
266+
267+Make example for this keyboard (after setting up your build environment):
268+
269+    make newgame40:default
270+
271diff --git a/keyboards/newgame40/rules.mk b/keyboards/newgame40/rules.mk
272new file mode 100644
273index 0000000000000000000000000000000000000000..cca40ce8e2cf74cc9e667c3df36c93968902ba3c
274--- /dev/null
275+++ b/keyboards/newgame40/rules.mk
276@@ -0,0 +1,74 @@
277+# MCU name
278+#MCU = at90usb1287
279+MCU = atmega32u4
280+
281+# Processor frequency.
282+#     This will define a symbol, F_CPU, in all source code files equal to the
283+#     processor frequency in Hz. You can then use this symbol in your source code to
284+#     calculate timings. Do NOT tack on a 'UL' at the end, this will be done
285+#     automatically to create a 32-bit value in your source code.
286+#
287+#     This will be an integer division of F_USB below, as it is sourced by
288+#     F_USB after it has run through any CPU prescalers. Note that this value
289+#     does not *change* the processor frequency - it should merely be updated to
290+#     reflect the processor speed set externally so that the code can use accurate
291+#     software delays.
292+F_CPU = 16000000
293+
294+#
295+# LUFA specific
296+#
297+# Target architecture (see library "Board Types" documentation).
298+ARCH = AVR8
299+
300+# Input clock frequency.
301+#     This will define a symbol, F_USB, in all source code files equal to the
302+#     input clock frequency (before any prescaling is performed) in Hz. This value may
303+#     differ from F_CPU if prescaling is used on the latter, and is required as the
304+#     raw input clock is fed directly to the PLL sections of the AVR for high speed
305+#     clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
306+#     at the end, this will be done automatically to create a 32-bit value in your
307+#     source code.
308+#
309+#     If no clock division is performed on the input clock inside the AVR (via the
310+#     CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
311+F_USB = $(F_CPU)
312+
313+# Interrupt driven control endpoint task(+60)
314+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
315+
316+
317+# Boot Section Size in *bytes*
318+#   Teensy halfKay   512
319+#   Teensy++ halfKay 1024
320+#   Atmel DFU loader 4096
321+#   LUFA bootloader  4096
322+#   USBaspLoader     2048
323+BOOTLOADER = caterina
324+
325+# Build Options
326+#   change to "no" to disable the options, or define them in the Makefile in
327+#   the appropriate keymap folder that will get included automatically
328+#
329+BOOTMAGIC_ENABLE = lite    # Virtual DIP switch configuration(+1000)
330+MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
331+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
332+CONSOLE_ENABLE = no         # Console for debug(+400)
333+COMMAND_ENABLE = no         # Commands for debug and configuration
334+NKRO_ENABLE = yes           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
335+BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
336+MIDI_ENABLE = no            # MIDI controls
337+AUDIO_ENABLE = no           # Audio output on port C6
338+UNICODE_ENABLE = yes        # Unicode
339+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
340+RGBLIGHT_ENABLE = yes       # Enable WS2812 RGB underlight.
341+IOS_DEVICE_ENABLE = no     # connect to IOS Device
342+
343+  ifeq ($(strip $(IOS_DEVICE_ENABLE )), yes)
344+    OPT_DEFS += -DIOS_DEVICE_ENABLE 
345+  endif
346+
347+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
348+SLEEP_LED_ENABLE = no    # Breathing sleep LED during USB suspend
349+
350+LAYOUTS = ortho_4x10
351diff --git a/layouts/default/ortho_4x10/default_ortho_4x10/keymap.c b/layouts/default/ortho_4x10/default_ortho_4x10/keymap.c
352new file mode 100644
353index 0000000000000000000000000000000000000000..3f6285e2ddbf15b01de0473a4df70f3bd7864e75
354--- /dev/null
355+++ b/layouts/default/ortho_4x10/default_ortho_4x10/keymap.c
356@@ -0,0 +1,10 @@
357+#include QMK_KEYBOARD_H
358+
359+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
360+    [0] = LAYOUT_ortho_4x10( 
361+        KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J, 
362+        KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J,
363+        KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J,
364+        KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_I, KC_J
365+    )
366+};
367diff --git a/layouts/default/ortho_4x10/layout.json b/layouts/default/ortho_4x10/layout.json
368new file mode 100644
369index 0000000000000000000000000000000000000000..86f098e27eb69f3da8272748941d2c615cefb639
370--- /dev/null
371+++ b/layouts/default/ortho_4x10/layout.json
372@@ -0,0 +1,4 @@
373+["","","","","","","","","",""],
374+["","","","","","","","","",""],
375+["","","","","","","","","",""],
376+["","","","","","","","","",""]
377diff --git a/layouts/default/ortho_4x10/readme.md b/layouts/default/ortho_4x10/readme.md
378new file mode 100644
379index 0000000000000000000000000000000000000000..c5c29251c81281d318a0be63e45f9897c8d1bd46
380--- /dev/null
381+++ b/layouts/default/ortho_4x10/readme.md
382@@ -0,0 +1,3 @@
383+# ortho_4x10
384+
385+    LAYOUT_ortho_4x10