1
0
Fork 0
forked from forks/qmk_firmware

[Keyboard] Add 6macro keyboard (#6362)

* Initial commit for 6macro firmware

* Updated layout documentation

* Removed unused commented code
This commit is contained in:
Joao Maia 2019-07-18 20:31:40 +01:00 committed by noroadsleft
parent 171f7c561b
commit 00c6892b3f
12 changed files with 408 additions and 0 deletions

View file

@ -0,0 +1,16 @@
/* Copyright 2019 joaofbmaia
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "6macro.h"

View file

@ -0,0 +1,35 @@
/* Copyright 2019 joaofbmaia
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
/* This a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT( \
k00, k01, k02, \
k10, k11, k12 \
) \
{ \
{ k00, k01, k02 }, \
{ k10, k11, k12 }, \
}

View file

@ -0,0 +1,70 @@
/*
Copyright 2019 joaofbmaia
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0037
#define DEVICE_VER 0x0001
#define MANUFACTURER joaofbmaia
#define PRODUCT 6macro
#define DESCRIPTION 6macro
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 3
/* pinout - DON'T CHANGE */
#define MATRIX_ROW_PINS { B3, B4 }
#define MATRIX_COL_PINS { B0, B1, B2 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define RGB_DI_PIN D2
#define RGBLED_NUM 10
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
// /*== all animations enable ==*/
// #define RGBLIGHT_ANIMATIONS
// /*== or choose animations ==*/
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
// #define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
// #define RGBLIGHT_EFFECT_RGB_TEST
// #define RGBLIGHT_EFFECT_ALTERNATING
// /*== customize breathing effect ==*/
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
// /*==== use exp() and sin() ====*/
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

View file

@ -0,0 +1,13 @@
{
"keyboard_name": "6macro",
"url": "",
"maintainer": "joaofbmaia",
"width": 3,
"height": 2,
"layouts": {
"LAYOUT": {
"layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}]
}
}
}

View file

@ -0,0 +1,18 @@
/* Copyright 2019 joaofbmaia
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once

View file

@ -0,0 +1,56 @@
/* Copyright 2019 joaofbmaia
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* LAYER 0
* ,-----------------------.
* | F13 | F14 | F15/FN| Hold for FN
* |-------+-------+-------|
* | F16 | F17 | F18 |
* `-------+-------+-------'
*/
[0] = LAYOUT(
KC_F13, KC_F14, LT(1, KC_F15), \
KC_F16, KC_F17, KC_F18 \
),
/* LAYER 1
* ,-----------------------.
* |RGB_TOG|RGBMOD+| |
* |-------+-------+-------|
* |RGBHUE+|RGBBRI+|Spec FN| Hold along with previous to access special funtions (RESET)
* `-------+-------+-------'
*/
[1] = LAYOUT(
RGB_TOG, RGB_MOD, KC_TRNS, \
RGB_HUI, RGB_VAI, MO(2) \
),
/* LAYER 2
* ,-----------------------.
* | RESET |RGBMOD-| |
* |-------+-------+-------|
* |RGBHUE-|RGBBRI-| |
* `-------+-------+-------'
*/
[2] = LAYOUT(
RESET, RGB_RMOD, KC_NO, \
RGB_HUD, RGB_VAD, KC_TRNS \
)
};

View file

@ -0,0 +1,15 @@
Layer 0:
![Layer 0](https://raw.githubusercontent.com/joaofbmaia/6macro/master/layer0_default.png)
Layer 1:
![Layer 1](https://raw.githubusercontent.com/joaofbmaia/6macro/master/layer1.png)
Layer 2:
![Layer 2](https://raw.githubusercontent.com/joaofbmaia/6macro/master/layer2.png)
# Default 6macro Layout
This is the default layout. Layer 0 is mappped to function keys 13-18. Top right key switches to layer above when held. Upper layers are for RGB control.

View file

@ -0,0 +1,18 @@
/* Copyright 2019 joaofbmaia
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once

View file

@ -0,0 +1,56 @@
/* Copyright 2019 joaofbmaia
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* LAYER 0
* ,-----------------------.
* | ESC | ~ | SPC/FN| Hold for FN
* |-------+-------+-------|
* | C | Z | X |
* `-------+-------+-------'
*/
[0] = LAYOUT(
KC_ESC, KC_GRAVE, LT(1, KC_SPC), \
KC_C, KC_Z, KC_X \
),
/* LAYER 1
* ,-----------------------.
* |RGB_TOG|RGBMOD+| |
* |-------+-------+-------|
* |RGBHUE+|RGBBRI+|Spec FN| Hold along with previous to access special funtions (RESET)
* `-------+-------+-------'
*/
[1] = LAYOUT(
RGB_TOG, RGB_MOD, KC_TRNS, \
RGB_HUI, RGB_VAI, MO(2) \
),
/* LAYER 2
* ,-----------------------.
* | RESET |RGBMOD-| |
* |-------+-------+-------|
* |RGBHUE-|RGBBRI-| |
* `-------+-------+-------'
*/
[2] = LAYOUT(
RESET, RGB_RMOD, KC_NO, \
RGB_HUD, RGB_VAD, KC_TRNS \
)
};

View file

@ -0,0 +1,15 @@
Layer 0:
![Layer 0](https://raw.githubusercontent.com/joaofbmaia/6macro/master/layer0_osu.png)
Layer 1:
![Layer 1](https://raw.githubusercontent.com/joaofbmaia/6macro/master/layer1.png)
Layer 2:
![Layer 2](https://raw.githubusercontent.com/joaofbmaia/6macro/master/layer2.png)
# OSU 6macro Layout
This layout is for the game OSU. Layer 0 is mappped as shown above. Top right key switches to layer above when held. Upper layers are for RGB control.

View file

@ -0,0 +1,15 @@
# 6macro
![6macro photo](https://raw.githubusercontent.com/joaofbmaia/6macro/master/photo.jpg)
![6macro photo with RGB](https://raw.githubusercontent.com/joaofbmaia/6macro/master/photo_rgb.jpg)
This is a 6-key keyboard intended for macros or as a dedicated controller for games with few bindings.
Keyboard Maintainer: [joaofbmaia](https://github.com/joaofbmaia)
Hardware: https://github.com/joaofbmaia/6macro
Make example for this keyboard (after setting up your build environment):
make handwired/6macro:default
See 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).

View file

@ -0,0 +1,81 @@
# MCU name
MCU = atmega32u2
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# atmega32a bootloadHID
BOOTLOADER = atmel-dfu
# If you don't know the bootloader type, then you can specify the
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
#RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500)
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = yes # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)