aboutsummaryrefslogtreecommitdiff
path: root/keyboards/cocoa40
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/cocoa40')
-rw-r--r--keyboards/cocoa40/.noci0
-rw-r--r--keyboards/cocoa40/cocoa40.c16
-rw-r--r--keyboards/cocoa40/cocoa40.h44
-rw-r--r--keyboards/cocoa40/config.h54
-rw-r--r--keyboards/cocoa40/info.json10
-rw-r--r--keyboards/cocoa40/keymaps/default/keymap.c55
-rw-r--r--keyboards/cocoa40/keymaps/default/readme.md1
-rw-r--r--keyboards/cocoa40/readme.md15
-rw-r--r--keyboards/cocoa40/rules.mk19
9 files changed, 214 insertions, 0 deletions
diff --git a/keyboards/cocoa40/.noci b/keyboards/cocoa40/.noci
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/cocoa40/.noci
diff --git a/keyboards/cocoa40/cocoa40.c b/keyboards/cocoa40/cocoa40.c
new file mode 100644
index 000000000..fdc9f9c0e
--- /dev/null
+++ b/keyboards/cocoa40/cocoa40.c
@@ -0,0 +1,16 @@
1/* Copyright 2019 'Naoto Takai'
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "cocoa40.h"
diff --git a/keyboards/cocoa40/cocoa40.h b/keyboards/cocoa40/cocoa40.h
new file mode 100644
index 000000000..a468a75ef
--- /dev/null
+++ b/keyboards/cocoa40/cocoa40.h
@@ -0,0 +1,44 @@
1/* Copyright 2019 'Naoto Takai'
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include "quantum.h"
19
20/* This a shortcut to help you visually see your layout.
21 *
22 * The first section contains all of the arguments representing the physical
23 * layout of the board and position of the keys.
24 *
25 * The second converts the arguments into a two-dimensional array which
26 * represents the switch matrix.
27 */
28
29#define LAYOUT( \
30 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, R06, R07, \
31 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, \
32 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, R26, \
33 L31, L32, L33, R30, R32, R33 \
34) \
35{ \
36 { L00, L01, L02, L03, L04, L05, KC_NO, KC_NO }, \
37 { L10, L11, L12, L13, L14, L15, KC_NO, KC_NO }, \
38 { L20, L21, L22, L23, L24, L25, KC_NO, KC_NO }, \
39 { KC_NO, L31, L32, L33, KC_NO, KC_NO, KC_NO, KC_NO }, \
40 { R00, R01, R02, R03, R04, R05, R06, R07 }, \
41 { R10, R11, R12, R13, R14, R15, R16, KC_NO }, \
42 { R20, R21, R22, R23, R24, R25, R26, KC_NO }, \
43 { R30, KC_NO, R32, R33, KC_NO, KC_NO, KC_NO, KC_NO } \
44}
diff --git a/keyboards/cocoa40/config.h b/keyboards/cocoa40/config.h
new file mode 100644
index 000000000..50da34ffb
--- /dev/null
+++ b/keyboards/cocoa40/config.h
@@ -0,0 +1,54 @@
1/*
2Copyright 2019 'Naoto Takai'
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#pragma once
19
20#include "config_common.h"
21
22/* USB Device descriptor parameter */
23#define VENDOR_ID 0xC0C0
24#define PRODUCT_ID 0x4000
25#define DEVICE_VER 0x0001
26#define MANUFACTURER recompile keys
27#define PRODUCT cocoa40
28
29/* key matrix size */
30#define MATRIX_ROWS 8
31#define MATRIX_COLS 8
32
33/*
34 * Keyboard Matrix Assignments
35 *
36 * Change this to how you wired your keyboard
37 * COLS: AVR pins used for columns, left to right
38 * ROWS: AVR pins used for rows, top to bottom
39 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
40 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
41 *
42*/
43#define MATRIX_ROW_PINS { F4, F5, F6, F7 }
44#define MATRIX_COL_PINS { B5, B4, E6, D7, C6, D4, D0, D1 }
45#define UNUSED_PINS
46
47/* COL2ROW, ROW2COL*/
48#define DIODE_DIRECTION COL2ROW
49
50/*
51 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
52 */
53#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6
54#define SPLIT_HAND_PIN D3
diff --git a/keyboards/cocoa40/info.json b/keyboards/cocoa40/info.json
new file mode 100644
index 000000000..d2b75a6fc
--- /dev/null
+++ b/keyboards/cocoa40/info.json
@@ -0,0 +1,10 @@
1{
2 "keyboard_name": "Cocoa40",
3 "url": "https://keys.recompile.net/projects/cocoa40/",
4 "maintainer": "Naoto Takai",
5 "layouts": {
6 "LAYOUT": {
7 "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":7.25, "y":0}, {"label":"U", "x":8.25, "y":0}, {"label":"I", "x":9.25, "y":0}, {"label":"O", "x":10.25, "y":0}, {"label":"P", "x":11.25, "y":0}, {"label":"{", "x":12.25, "y":0}, {"label":"}", "x":13.25, "y":0}, {"label":"Back<br>Space", "x":14.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":7.5, "y":1}, {"label":"J", "x":8.5, "y":1}, {"label":"K", "x":9.5, "y":1}, {"label":"L", "x":10.5, "y":1}, {"label":":", "x":11.5, "y":1}, {"label":"\"", "x":12.5, "y":1}, {"label":"Enter", "x":13.5, "y":1, "w":1.75}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":8, "y":2}, {"label":"M", "x":9, "y":2}, {"label":"<", "x":10, "y":2}, {"label":">", "x":11, "y":2}, {"label":"?", "x":12, "y":2}, {"label":"Shift", "x":13, "y":2, "w":1.25}, {"label":"Fn", "x":14.25, "y":2}, {"label":"Opt", "x":1.5, "y":3}, {"label":"Command", "x":2.5, "y":3, "w":1.5}, {"label":"", "x":4, "y":3, "w":2.25}, {"label":"", "x":7.5, "y":3, "w":2.75}, {"label":"Command", "x":10.25, "y":3, "w":1.5}, {"label":"Opt", "x":11.75, "y":3}]
8 }
9 }
10}
diff --git a/keyboards/cocoa40/keymaps/default/keymap.c b/keyboards/cocoa40/keymaps/default/keymap.c
new file mode 100644
index 000000000..320f918a9
--- /dev/null
+++ b/keyboards/cocoa40/keymaps/default/keymap.c
@@ -0,0 +1,55 @@
1/* Copyright 2019 'Naoto Takai'
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19enum layer_names {
20 _BASE,
21 _NUMS,
22 _SYMS,
23 _FN,
24};
25
26#define KC_NUMS LT(_NUMS, KC_SPACE)
27#define KC_SYMS LT(_SYMS, KC_SPACE)
28#define KC_FN MO(_FN)
29
30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31 [_BASE] = LAYOUT(
32 KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSPACE,
33 KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER,
34 KC_LSHIFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, KC_FN,
35 KC_LALT, KC_LGUI, KC_NUMS, KC_SYMS, KC_RGUI, KC_RALT
36 ),
37 [_NUMS] = LAYOUT(
38 KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSLASH,
39 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
40 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
41 _______, _______, _______, _______, _______, _______
42 ),
43 [_SYMS] = LAYOUT(
44 KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_MINUS, KC_PLUS, KC_PIPE,
45 _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______,
46 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
47 _______, _______, _______, _______, _______, _______
48 ),
49 [_FN] = LAYOUT(
50 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DELETE,
51 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
52 RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
53 _______, _______, _______, _______, _______, _______
54 ),
55};
diff --git a/keyboards/cocoa40/keymaps/default/readme.md b/keyboards/cocoa40/keymaps/default/readme.md
new file mode 100644
index 000000000..9e530faff
--- /dev/null
+++ b/keyboards/cocoa40/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for cocoa40
diff --git a/keyboards/cocoa40/readme.md b/keyboards/cocoa40/readme.md
new file mode 100644
index 000000000..e05caaba9
--- /dev/null
+++ b/keyboards/cocoa40/readme.md
@@ -0,0 +1,15 @@
1# cocoa40
2
3![cocoa40](https://keys.recompile.net/images/[email protected])
4
5A 40% split keyboard for programmers.
6
7Keyboard Maintainer: [Naoto Takai](https://github.com/takai)
8Hardware Supported: The Cocoa40 PCBs, Pro Micro supported
9Hardware Availability: https://keys.recompile.net/projects/cocoa40/
10
11Make example for this keyboard (after setting up your build environment):
12
13 make cocoa40:default
14
15See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/cocoa40/rules.mk b/keyboards/cocoa40/rules.mk
new file mode 100644
index 000000000..3ef3128f4
--- /dev/null
+++ b/keyboards/cocoa40/rules.mk
@@ -0,0 +1,19 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = caterina
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
11MOUSEKEY_ENABLE =no # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15NKRO_ENABLE = no # Enable N-Key Rollover
16BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
17RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
18AUDIO_ENABLE = no # Audio output
19SPLIT_KEYBOARD = yes