aboutsummaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorBiacco42 <secondimpact_2000@yahoo.co.jp>2019-02-06 01:20:47 +0900
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-02-05 08:20:47 -0800
commitb89cab87ce9daed9253126d2af43af1b6d79d54d (patch)
treea95ca115d7dbad1004a22f4ad31dc00ce2a08991 /keyboards
parent9b232a7f885e320061aae994713acd31297eac5c (diff)
downloadqmk_firmware-b89cab87ce9daed9253126d2af43af1b6d79d54d.tar.gz
qmk_firmware-b89cab87ce9daed9253126d2af43af1b6d79d54d.zip
Add "meishi" keyboard (#5054)
* Add meishi keyboard project * Update readme * Fix copyrights * Fix copyright year * Replace include guard with pragma once * Replace KEYMAP with LAYOUT
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/meishi/config.h188
-rw-r--r--keyboards/meishi/keymaps/default/keymap.c42
-rw-r--r--keyboards/meishi/keymaps/default/readme.md1
-rw-r--r--keyboards/meishi/meishi.c43
-rw-r--r--keyboards/meishi/meishi.h31
-rw-r--r--keyboards/meishi/readme.md19
-rw-r--r--keyboards/meishi/rules.mk68
7 files changed, 392 insertions, 0 deletions
diff --git a/keyboards/meishi/config.h b/keyboards/meishi/config.h
new file mode 100644
index 000000000..cbc22476d
--- /dev/null
+++ b/keyboards/meishi/config.h
@@ -0,0 +1,188 @@
1/*
2Copyright 2019 Biacco42
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 0xBC42
24#define PRODUCT_ID 0x0002
25#define DEVICE_VER 0x0001
26#define MANUFACTURER Biacco42
27#define PRODUCT meishi
28#define DESCRIPTION The micro macro keyboard
29
30/* key matrix size */
31#define MATRIX_ROWS 1
32#define MATRIX_COLS 4
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 { B5 }
45#define MATRIX_COL_PINS { B1, B3, B2, B6 }
46#define UNUSED_PINS
47
48/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
49#define DIODE_DIRECTION COL2ROW
50
51// #define BACKLIGHT_PIN B7
52// #define BACKLIGHT_BREATHING
53// #define BACKLIGHT_LEVELS 3
54
55
56/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
57#define DEBOUNCING_DELAY 5
58
59/* define if matrix has ghost (lacks anti-ghosting diodes) */
60//#define MATRIX_HAS_GHOST
61
62/* number of backlight levels */
63
64/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
65#define LOCKING_SUPPORT_ENABLE
66/* Locking resynchronize hack */
67#define LOCKING_RESYNC_ENABLE
68
69/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
70 * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
71 */
72// #define GRAVE_ESC_CTRL_OVERRIDE
73
74/*
75 * Force NKRO
76 *
77 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
78 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
79 * makefile for this to work.)
80 *
81 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
82 * until the next keyboard reset.
83 *
84 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
85 * fully operational during normal computer usage.
86 *
87 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
88 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
89 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
90 * power-up.
91 *
92 */
93//#define FORCE_NKRO
94
95/*
96 * Magic Key Options
97 *
98 * Magic keys are hotkey commands that allow control over firmware functions of
99 * the keyboard. They are best used in combination with the HID Listen program,
100 * found here: https://www.pjrc.com/teensy/hid_listen.html
101 *
102 * The options below allow the magic key functionality to be changed. This is
103 * useful if your keyboard/keypad is missing keys and you want magic key support.
104 *
105 */
106
107/* key combination for magic key command */
108#define IS_COMMAND() ( \
109 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
110)
111
112/* control how magic key switches layers */
113//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
114//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
115//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
116
117/* override magic key keymap */
118//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
119//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
120//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
121//#define MAGIC_KEY_HELP1 H
122//#define MAGIC_KEY_HELP2 SLASH
123//#define MAGIC_KEY_DEBUG D
124//#define MAGIC_KEY_DEBUG_MATRIX X
125//#define MAGIC_KEY_DEBUG_KBD K
126//#define MAGIC_KEY_DEBUG_MOUSE M
127//#define MAGIC_KEY_VERSION V
128//#define MAGIC_KEY_STATUS S
129//#define MAGIC_KEY_CONSOLE C
130//#define MAGIC_KEY_LAYER0_ALT1 ESC
131//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
132//#define MAGIC_KEY_LAYER0 0
133//#define MAGIC_KEY_LAYER1 1
134//#define MAGIC_KEY_LAYER2 2
135//#define MAGIC_KEY_LAYER3 3
136//#define MAGIC_KEY_LAYER4 4
137//#define MAGIC_KEY_LAYER5 5
138//#define MAGIC_KEY_LAYER6 6
139//#define MAGIC_KEY_LAYER7 7
140//#define MAGIC_KEY_LAYER8 8
141//#define MAGIC_KEY_LAYER9 9
142//#define MAGIC_KEY_BOOTLOADER PAUSE
143//#define MAGIC_KEY_LOCK CAPS
144//#define MAGIC_KEY_EEPROM E
145//#define MAGIC_KEY_NKRO N
146//#define MAGIC_KEY_SLEEP_LED Z
147
148/*
149 * Feature disable options
150 * These options are also useful to firmware size reduction.
151 */
152
153/* disable debug print */
154//#define NO_DEBUG
155
156/* disable print */
157//#define NO_PRINT
158
159/* disable action features */
160//#define NO_ACTION_LAYER
161//#define NO_ACTION_TAPPING
162//#define NO_ACTION_ONESHOT
163//#define NO_ACTION_MACRO
164//#define NO_ACTION_FUNCTION
165
166/*
167 * MIDI options
168 */
169
170/* Prevent use of disabled MIDI features in the keymap */
171//#define MIDI_ENABLE_STRICT 1
172
173/* enable basic MIDI features:
174 - MIDI notes can be sent when in Music mode is on
175*/
176//#define MIDI_BASIC
177
178/* enable advanced MIDI features:
179 - MIDI notes can be added to the keymap
180 - Octave shift and transpose
181 - Virtual sustain, portamento, and modulation wheel
182 - etc.
183*/
184//#define MIDI_ADVANCED
185
186/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
187//#define MIDI_TONE_KEYCODE_OCTAVES 1
188
diff --git a/keyboards/meishi/keymaps/default/keymap.c b/keyboards/meishi/keymaps/default/keymap.c
new file mode 100644
index 000000000..88f08ee56
--- /dev/null
+++ b/keyboards/meishi/keymaps/default/keymap.c
@@ -0,0 +1,42 @@
1/* Copyright 2017 Biacco42
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 "meishi.h"
17
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19[0] = LAYOUT( /* Base */
20 LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V) \
21),
22};
23
24const uint16_t PROGMEM fn_actions[] = {
25
26};
27
28void matrix_init_user(void) {
29
30}
31
32void matrix_scan_user(void) {
33
34}
35
36bool process_record_user(uint16_t keycode, keyrecord_t *record) {
37 return true;
38}
39
40void led_set_user(uint8_t usb_led) {
41
42}
diff --git a/keyboards/meishi/keymaps/default/readme.md b/keyboards/meishi/keymaps/default/readme.md
new file mode 100644
index 000000000..a9eb4e9cd
--- /dev/null
+++ b/keyboards/meishi/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for meishi \ No newline at end of file
diff --git a/keyboards/meishi/meishi.c b/keyboards/meishi/meishi.c
new file mode 100644
index 000000000..92c5194d5
--- /dev/null
+++ b/keyboards/meishi/meishi.c
@@ -0,0 +1,43 @@
1/* Copyright 2019 Biacco42
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 "meishi.h"
17
18void matrix_init_kb(void) {
19 // put your keyboard start-up code here
20 // runs once when the firmware starts up
21
22 matrix_init_user();
23}
24
25void matrix_scan_kb(void) {
26 // put your looping keyboard code here
27 // runs every cycle (a lot)
28
29 matrix_scan_user();
30}
31
32bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
33 // put your per-action keyboard code here
34 // runs for every action, just before processing by the firmware
35
36 return process_record_user(keycode, record);
37}
38
39void led_set_kb(uint8_t usb_led) {
40 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
41
42 led_set_user(usb_led);
43}
diff --git a/keyboards/meishi/meishi.h b/keyboards/meishi/meishi.h
new file mode 100644
index 000000000..61b9f628d
--- /dev/null
+++ b/keyboards/meishi/meishi.h
@@ -0,0 +1,31 @@
1/* Copyright 2019 Biacco42
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#include "quantum.h"
20
21// This a shortcut to help you visually see your layout.
22// The following is an example using the Planck MIT layout
23// The first section contains all of the arguments
24// The second converts the arguments into a two-dimensional array
25#define LAYOUT( \
26 k00, k01, k02, k03\
27) \
28{ \
29 { k00, k01, k02, k03 }\
30}
31
diff --git a/keyboards/meishi/readme.md b/keyboards/meishi/readme.md
new file mode 100644
index 000000000..99421ed8d
--- /dev/null
+++ b/keyboards/meishi/readme.md
@@ -0,0 +1,19 @@
1# Meishi - The micro macro keyboard
2
3_Meishi_ means name cards.
4
5![meishi](https://raw.githubusercontent.com/Biacco42/meishi/readme/readme_image/P1210037.JPG)
6
7Only four keys keyboard for self made keyboard beginners.
8
9Keyboard Maintainer: [Biacco42](https://github.com/biacco42)
10Hardware Supported: [Meishi keyboard PCB](https://github.com/Biacco42/meishi), Pro Micro supported
11Hardware Availability: [Tanoshi life - Booth](https://biacco42.booth.pm/)
12
13Make example for this keyboard (after setting up your build environment):
14
15```
16$ make meishi:default:avrdude
17```
18
19See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
diff --git a/keyboards/meishi/rules.mk b/keyboards/meishi/rules.mk
new file mode 100644
index 000000000..45eb6ee37
--- /dev/null
+++ b/keyboards/meishi/rules.mk
@@ -0,0 +1,68 @@
1# MCU name
2#MCU = at90usb1286
3MCU = atmega32u4
4
5# Processor frequency.
6# This will define a symbol, F_CPU, in all source code files equal to the
7# processor frequency in Hz. You can then use this symbol in your source code to
8# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
9# automatically to create a 32-bit value in your source code.
10#
11# This will be an integer division of F_USB below, as it is sourced by
12# F_USB after it has run through any CPU prescalers. Note that this value
13# does not *change* the processor frequency - it should merely be updated to
14# reflect the processor speed set externally so that the code can use accurate
15# software delays.
16F_CPU = 16000000
17
18
19#
20# LUFA specific
21#
22# Target architecture (see library "Board Types" documentation).
23ARCH = 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.
36F_USB = $(F_CPU)
37
38# Interrupt driven control endpoint task(+60)
39OPT_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
48OPT_DEFS += -DBOOTLOADER_SIZE=4096
49
50
51# Build Options
52# change yes to no to disable
53#
54BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
55MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
56EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
57CONSOLE_ENABLE = yes # Console for debug(+400)
58COMMAND_ENABLE = yes # Commands for debug and configuration
59# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
60SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
61# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
62NKRO_ENABLE = no # USB Nkey Rollover
63BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
64MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
65UNICODE_ENABLE = no # Unicode
66BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
67AUDIO_ENABLE = no # Audio output on port C6
68FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches