aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaoto Takai <takai@recompile.net>2019-04-21 23:01:58 +0900
committerNaoto Takai <takai@cookpad.com>2019-07-26 11:17:34 +0900
commitabb65857ffef2fcf2a735ce67c88dc987dae5e31 (patch)
treeb564e1e94434624bb8eaf7bf075a2ec39ebba48c
parent36d3902504d6aa0d2bdac88c90339c902ade11b3 (diff)
downloadqmk_firmware-abb65857ffef2fcf2a735ce67c88dc987dae5e31.tar.gz
qmk_firmware-abb65857ffef2fcf2a735ce67c88dc987dae5e31.zip
Add support for Choco60
-rw-r--r--keyboards/choco60/choco60.c51
-rw-r--r--keyboards/choco60/choco60.h46
-rw-r--r--keyboards/choco60/config.h55
-rw-r--r--keyboards/choco60/info.json12
-rw-r--r--keyboards/choco60/keymaps/default/config.h19
-rw-r--r--keyboards/choco60/keymaps/default/keymap.c41
-rw-r--r--keyboards/choco60/keymaps/default/readme.md1
-rw-r--r--keyboards/choco60/readme.md15
-rw-r--r--keyboards/choco60/rules.mk82
9 files changed, 322 insertions, 0 deletions
diff --git a/keyboards/choco60/choco60.c b/keyboards/choco60/choco60.c
new file mode 100644
index 000000000..e38f335c1
--- /dev/null
+++ b/keyboards/choco60/choco60.c
@@ -0,0 +1,51 @@
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 "choco60.h"
17
18// Optional override functions below.
19// You can leave any or all of these undefined.
20// These are only required if you want to perform custom actions.
21
22/*
23
24void matrix_init_kb(void) {
25 // put your keyboard start-up code here
26 // runs once when the firmware starts up
27
28 matrix_init_user();
29}
30
31void matrix_scan_kb(void) {
32 // put your looping keyboard code here
33 // runs every cycle (a lot)
34
35 matrix_scan_user();
36}
37
38bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
39 // put your per-action keyboard code here
40 // runs for every action, just before processing by the firmware
41
42 return process_record_user(keycode, record);
43}
44
45void led_set_kb(uint8_t usb_led) {
46 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
47
48 led_set_user(usb_led);
49}
50
51*/
diff --git a/keyboards/choco60/choco60.h b/keyboards/choco60/choco60.h
new file mode 100644
index 000000000..fedcf942b
--- /dev/null
+++ b/keyboards/choco60/choco60.h
@@ -0,0 +1,46 @@
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#define LAYOUT( \
29 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, R06, R07, R08, \
30 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, R17, \
31 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, R26, \
32 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, R36, \
33 L40, L41, L43, R40, R41, R43, R44 \
34) \
35{ \
36 { L00, L01, L02, L03, L04, L05, KC_NO, KC_NO, KC_NO }, \
37 { L10, L11, L12, L13, L14, L15, KC_NO, KC_NO, KC_NO }, \
38 { L20, L21, L22, L23, L24, L25, KC_NO, KC_NO, KC_NO }, \
39 { L30, L31, L32, L33, L34, L35, KC_NO, KC_NO, KC_NO }, \
40 { L40, L41, KC_NO, L43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
41 { R00, R01, R02, R03, R04, R05, R06, R07, R08 }, \
42 { R10, R11, R12, R13, R14, R15, R16, R17, KC_NO }, \
43 { R20, R21, R22, R23, R24, R25, R26, KC_NO, KC_NO }, \
44 { R30, R31, R32, R33, R34, R35, R36, KC_NO, KC_NO }, \
45 { R40, R41, KC_NO, R43, R44, KC_NO, KC_NO, KC_NO, KC_NO } \
46}
diff --git a/keyboards/choco60/config.h b/keyboards/choco60/config.h
new file mode 100644
index 000000000..97d7c61ac
--- /dev/null
+++ b/keyboards/choco60/config.h
@@ -0,0 +1,55 @@
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 0x6000
25#define DEVICE_VER 0x0001
26#define MANUFACTURER Naoto Takai
27#define PRODUCT choco60
28#define DESCRIPTION A 60% split keyboard for programmers.
29
30/* key matrix size */
31#define MATRIX_ROWS 10
32#define MATRIX_COLS 9
33
34/*
35 * Keyboard Matrix Assignments
36 *
37 * Change this to how you wired your keyboard
38 * COLS: AVR pins used for columns, left to right
39 * ROWS: AVR pins used for rows, top to bottom
40 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
41 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
42 *
43*/
44#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
45#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D1 }
46#define UNUSED_PINS
47
48/* COL2ROW, ROW2COL*/
49#define DIODE_DIRECTION COL2ROW
50
51/*
52 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
53 */
54#define SOFT_SERIAL_PIN D3 // or D1, D2, D3, E6
55#define SPLIT_HAND_PIN D0
diff --git a/keyboards/choco60/info.json b/keyboards/choco60/info.json
new file mode 100644
index 000000000..3918dcb5f
--- /dev/null
+++ b/keyboards/choco60/info.json
@@ -0,0 +1,12 @@
1{
2 "keyboard_name": "Choco60",
3 "url": "https://keys.recompile.net/projects/choco60/",
4 "maintainer": "Naoto Takai",
5 "width": 16,
6 "height": 5,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":7, "y":0}, {"label":"&", "x":8, "y":0}, {"label":"*", "x":9, "y":0}, {"label":"(", "x":10, "y":0}, {"label":")", "x":11, "y":0}, {"label":"_", "x":12, "y":0}, {"label":"+", "x":13, "y":0}, {"label":"|", "x":14, "y":0}, {"label":"~", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":7.5, "y":1}, {"label":"U", "x":8.5, "y":1}, {"label":"I", "x":9.5, "y":1}, {"label":"O", "x":10.5, "y":1}, {"label":"P", "x":11.5, "y":1}, {"label":"{", "x":12.5, "y":1}, {"label":"}", "x":13.5, "y":1}, {"label":"Delete", "x":14.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":7.75, "y":2}, {"label":"J", "x":8.75, "y":2}, {"label":"K", "x":9.75, "y":2}, {"label":"L", "x":10.75, "y":2}, {"label":":", "x":11.75, "y":2}, {"label":"\"", "x":12.75, "y":2}, {"label":"Return", "x":13.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":8.25, "y":3}, {"label":"M", "x":9.25, "y":3}, {"label":"<", "x":10.25, "y":3}, {"label":">", "x":11.25, "y":3}, {"label":"?", "x":12.25, "y":3}, {"label":"Shift", "x":13.25, "y":3, "w":1.75}, {"label":"Fn", "x":15, "y":3}, {"label":"Opt", "x":1.5, "y":4}, {"label":"\u2318", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":2.75}, {"label":"Opt", "x":7.75, "y":4}, {"x":8.75, "y":4, "w":2.25}, {"label":"\u2318", "x":11, "y":4, "w":1.5}, {"label":"Ctrl", "x":12.5, "y":4}]
10 }
11 }
12}
diff --git a/keyboards/choco60/keymaps/default/config.h b/keyboards/choco60/keymaps/default/config.h
new file mode 100644
index 000000000..cf4c8bcbe
--- /dev/null
+++ b/keyboards/choco60/keymaps/default/config.h
@@ -0,0 +1,19 @@
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#pragma once
18
19// place overrides here
diff --git a/keyboards/choco60/keymaps/default/keymap.c b/keyboards/choco60/keymaps/default/keymap.c
new file mode 100644
index 000000000..ab3f2c6a2
--- /dev/null
+++ b/keyboards/choco60/keymaps/default/keymap.c
@@ -0,0 +1,41 @@
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 _FN,
22};
23
24#define KC_FN MO(_FN)
25
26const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
27 [_BASE] = LAYOUT(
28 KC_ESC, 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, KC_GRAVE,
29 KC_TAB, 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,
30 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,
31 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,
32 KC_LALT, KC_LGUI, KC_SPACE, KC_SPACE, KC_SPACE, KC_RGUI, KC_RALT
33 ),
34 [_FN] = LAYOUT(
35 _______, 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_INSERT, KC_DELETE,
36 _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCREEN, KC_SCROLLLOCK, KC_PAUSE, KC_UP, KC_RBRACKET, KC_BSPACE,
37 _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_ENTER,
38 RESET, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDOWN, KC_DOWN, KC_RSHIFT, KC_FN,
39 _______, _______, _______, _______, _______, KC_STOP, _______
40 )
41};
diff --git a/keyboards/choco60/keymaps/default/readme.md b/keyboards/choco60/keymaps/default/readme.md
new file mode 100644
index 000000000..f55e392c3
--- /dev/null
+++ b/keyboards/choco60/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for choco60
diff --git a/keyboards/choco60/readme.md b/keyboards/choco60/readme.md
new file mode 100644
index 000000000..ca309fdcb
--- /dev/null
+++ b/keyboards/choco60/readme.md
@@ -0,0 +1,15 @@
1# choco60
2
3![choco60](https://keys.recompile.net/images/choco60-main@600w.jpg)
4
5A 60% split keyboard for programmers.
6
7Keyboard Maintainer: [Naoto Takai](https://github.com/takai)
8Hardware Supported: The Choco60 PCBs, Pro Micro supported
9Hardware Availability: https://keys.recompile.net/projects/choco60/
10
11Make example for this keyboard (after setting up your build environment):
12
13 make choco60: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/choco60/rules.mk b/keyboards/choco60/rules.mk
new file mode 100644
index 000000000..343469db2
--- /dev/null
+++ b/keyboards/choco60/rules.mk
@@ -0,0 +1,82 @@
1# MCU name
2MCU = atmega32u4
3
4# Processor frequency.
5# This will define a symbol, F_CPU, in all source code files equal to the
6# processor frequency in Hz. You can then use this symbol in your source code to
7# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
8# automatically to create a 32-bit value in your source code.
9#
10# This will be an integer division of F_USB below, as it is sourced by
11# F_USB after it has run through any CPU prescalers. Note that this value
12# does not *change* the processor frequency - it should merely be updated to
13# reflect the processor speed set externally so that the code can use accurate
14# software delays.
15F_CPU = 16000000
16
17
18#
19# LUFA specific
20#
21# Target architecture (see library "Board Types" documentation).
22ARCH = AVR8
23
24# Input clock frequency.
25# This will define a symbol, F_USB, in all source code files equal to the
26# input clock frequency (before any prescaling is performed) in Hz. This value may
27# differ from F_CPU if prescaling is used on the latter, and is required as the
28# raw input clock is fed directly to the PLL sections of the AVR for high speed
29# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
30# at the end, this will be done automatically to create a 32-bit value in your
31# source code.
32#
33# If no clock division is performed on the input clock inside the AVR (via the
34# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
35F_USB = $(F_CPU)
36
37# Interrupt driven control endpoint task(+60)
38OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
39
40
41# Bootloader selection
42# Teensy halfkay
43# Pro Micro caterina
44# Atmel DFU atmel-dfu
45# LUFA DFU lufa-dfu
46# QMK DFU qmk-dfu
47# atmega32a bootloadHID
48BOOTLOADER = caterina
49
50
51# If you don't know the bootloader type, then you can specify the
52# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
53# Teensy halfKay 512
54# Teensy++ halfKay 1024
55# Atmel DFU loader 4096
56# LUFA bootloader 4096
57# USBaspLoader 2048
58# OPT_DEFS += -DBOOTLOADER_SIZE=4096
59
60
61# Build Options
62# change yes to no to disable
63#
64BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
65MOUSEKEY_ENABLE = no # Mouse keys(+4700)
66EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
67CONSOLE_ENABLE = no # Console for debug(+400)
68COMMAND_ENABLE = no # Commands for debug and configuration
69# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
70SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
71# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
72NKRO_ENABLE = no # USB Nkey Rollover
73BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
74RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
75MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
76UNICODE_ENABLE = no # Unicode
77BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
78AUDIO_ENABLE = no # Audio output on port C6
79FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
80HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
81
82SPLIT_KEYBOARD = yes # Enable split keyboard