aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/hifumi/config.h56
-rw-r--r--keyboards/hifumi/hifumi.h31
-rw-r--r--keyboards/hifumi/info.json12
-rw-r--r--keyboards/hifumi/keymaps/default/keymap.c47
-rw-r--r--keyboards/hifumi/keymaps/test/keymap.c32
-rw-r--r--keyboards/hifumi/readme.md13
-rw-r--r--keyboards/hifumi/rules.mk62
7 files changed, 253 insertions, 0 deletions
diff --git a/keyboards/hifumi/config.h b/keyboards/hifumi/config.h
new file mode 100644
index 000000000..dccb0352d
--- /dev/null
+++ b/keyboards/hifumi/config.h
@@ -0,0 +1,56 @@
1/*
2Copyright 2019 zk-phi
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#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0xFEED
23#define PRODUCT_ID 0x3060
24#define DEVICE_VER 0x0001
25#define MANUFACTURER riconken
26#define PRODUCT hifumi
27#define DESCRIPTION A macropad with 6 keys
28
29/* key matrix size */
30#define MATRIX_ROWS 2
31#define MATRIX_COLS 3
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 { D4, C6 }
44#define MATRIX_COL_PINS { F4, F5, F6 }
45#define UNUSED_PINS
46#define DIODE_DIRECTION COL2ROW
47
48/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
49#define DEBOUNCING_DELAY 5
50
51/* ws2812 RGB LED */
52#define RGB_DI_PIN D3
53#define RGBLED_NUM 6
54#define RGBLIGHT_LIMIT_VAL 255
55#define RGBLIGHT_HUE_STEP 5
56#define RGBLIGHT_ANIMATIONS
diff --git a/keyboards/hifumi/hifumi.h b/keyboards/hifumi/hifumi.h
new file mode 100644
index 000000000..389ce206e
--- /dev/null
+++ b/keyboards/hifumi/hifumi.h
@@ -0,0 +1,31 @@
1/* Copyright 2019 zk-phi
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// The following is an example using the Planck MIT layout
22// The first section contains all of the arguments
23// The second converts the arguments into a two-dimensional array
24#define LAYOUT( \
25 k00, k01, k02, \
26 k10, k11, k12 \
27) \
28{ \
29 { k00, k01, k02 }, \
30 { k10, k11, k12 } \
31}
diff --git a/keyboards/hifumi/info.json b/keyboards/hifumi/info.json
new file mode 100644
index 000000000..2466838a0
--- /dev/null
+++ b/keyboards/hifumi/info.json
@@ -0,0 +1,12 @@
1{
2 "keyboard_name": "hifumi",
3 "url": "https://github.com/zk-phi/1x2x3-keyboard",
4 "maintainer": "riconken",
5 "width": 3,
6 "height": 2,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [{"label":"F5", "x":0, "y":0}, {"label":"Up", "x":1, "y":0}, {"label":"PrSc", "x":2, "y":0}, {"label":"Left", "x":0, "y":1}, {"label":"Down", "x":1, "y":1}, {"label":"Right", "x":2, "y":1}]
10 }
11 }
12}
diff --git a/keyboards/hifumi/keymaps/default/keymap.c b/keyboards/hifumi/keymaps/default/keymap.c
new file mode 100644
index 000000000..9a4330398
--- /dev/null
+++ b/keyboards/hifumi/keymaps/default/keymap.c
@@ -0,0 +1,47 @@
1/* Copyright 2019 zk-phi
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 QMK_KEYBOARD_H
17
18#ifdef RGBLIGHT_ENABLE
19//Following line allows macro to read current RGB settings
20extern rgblight_config_t rgblight_config;
21#endif
22
23enum layers {
24 DEFAULT,
25 RAISE,
26 LOWER,
27 ADJUST
28};
29
30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31 [DEFAULT] = LAYOUT(
32 LT(RAISE, KC_F5), KC_UP, LT(LOWER, KC_PSCR),
33 KC_LEFT, KC_DOWN, KC_RIGHT
34 ),
35 [RAISE] = LAYOUT(
36 _______, KC_PGUP, MO(ADJUST),
37 KC_HOME, KC_PGDN, KC_END
38 ),
39 [LOWER] = LAYOUT(
40 MO(ADJUST), _______, _______,
41 _______, _______, _______
42 ),
43 [ADJUST] = LAYOUT(
44 _______, RGB_TOG, _______,
45 RGB_MODE_SNAKE, RGB_MODE_PLAIN, RGB_HUI
46 )
47};
diff --git a/keyboards/hifumi/keymaps/test/keymap.c b/keyboards/hifumi/keymaps/test/keymap.c
new file mode 100644
index 000000000..7aec009eb
--- /dev/null
+++ b/keyboards/hifumi/keymaps/test/keymap.c
@@ -0,0 +1,32 @@
1/* Copyright 2019 zk-phi
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 QMK_KEYBOARD_H
17
18#ifdef RGBLIGHT_ENABLE
19//Following line allows macro to read current RGB settings
20extern rgblight_config_t rgblight_config;
21#endif
22
23enum layers {
24 DEFAULT
25};
26
27const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
28 [DEFAULT] = LAYOUT(
29 KC_1, KC_2, KC_3,
30 KC_A, KC_B, KC_C
31 )
32};
diff --git a/keyboards/hifumi/readme.md b/keyboards/hifumi/readme.md
new file mode 100644
index 000000000..2911c1244
--- /dev/null
+++ b/keyboards/hifumi/readme.md
@@ -0,0 +1,13 @@
1# hifumi
2
3A macro pad with 6 keys.
4
5Keyboard Maintainer: riconken, [zk-phi](https://github.com/zk-phi)
6Hardware Supported: hifumi PCB, Pro Micro
7Hardware Availability: [PCB & Case Data](https://github.com/zk-phi/1x2x3-keyboard)
8
9Make example for this keyboard (after setting up your build environment):
10
11 make hifumi:default
12
13See 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/hifumi/rules.mk b/keyboards/hifumi/rules.mk
new file mode 100644
index 000000000..98560f058
--- /dev/null
+++ b/keyboards/hifumi/rules.mk
@@ -0,0 +1,62 @@
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# 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# Bootloader
38# This definition is optional, and if your keyboard supports multiple bootloaders of
39# different sizes, comment this out, and the correct address will be loaded
40# automatically (+60). See bootloader.mk for all options.
41BOOTLOADER = caterina
42
43# Interrupt driven control endpoint task(+60)
44OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
45
46# Build Options
47# change to "no" to disable the options, or define them in the Makefile in
48# the appropriate keymap folder that will get included automatically
49#
50BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
51MOUSEKEY_ENABLE = no # Mouse keys(+4700)
52EXTRAKEY_ENABLE = no # Audio control and System control(+450)
53CONSOLE_ENABLE = no # Console for debug(+400)
54COMMAND_ENABLE = no # Commands for debug and configuration
55NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
56BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
57MIDI_ENABLE = no # MIDI controls
58AUDIO_ENABLE = no # Audio output on port C6
59UNICODE_ENABLE = no # Unicode
60BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
61RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
62SWAP_HANDS_ENABLE = no # Enable one-hand typing