1
0
Fork 0

[Keyboard] 8 pack (#6031)

* 8-Pack Macropad

* Added MANUFACTUTER to config.h

* Fix the mirrored keymaps by creating rev1.1 and rev1.2 layouts, then using them in the keymaps

* fixes from code review comments

* Use revisions to manage the different layouts for rev1.1 and rev1.2

* Add DEFAULT_FOLDER to fix default build failures

* code review comments fixes

* code review comments fixes
This commit is contained in:
gorbachev 2019-06-02 01:43:00 -04:00 committed by Drashna Jaelre
parent 0744af97af
commit 6766c5315e
15 changed files with 190 additions and 0 deletions

1
keyboards/8pack/8pack.c Normal file
View file

@ -0,0 +1 @@
#include "8pack.h"

11
keyboards/8pack/8pack.h Normal file
View file

@ -0,0 +1,11 @@
#pragma once
#include "quantum.h"
#ifdef KEYBOARD_8pack_rev11
#include "rev11.h"
#endif
#ifdef KEYBOARD_8pack_rev12
#include "rev12.h"
#endif

39
keyboards/8pack/config.h Normal file
View file

@ -0,0 +1,39 @@
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x2171
#define MANUFACTURER Charles Garcia
#define PRODUCT 8-Pack
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 4
/* key matrix pins */
#define DIRECT_PINS { { F4, F5, F6, F7 }, { B1, B3, B2, B6 } }
#define BACKLIGHT_LED_COUNT 8
#undef BACKLIGHT_PIN
#define BACKLIGHT_PINS { D1, D0, D4, C6, D7, E6, B4, B5 }
#define BACKLIGHT_LEVELS 8
// ws2812 options
#define RGB_DI_PIN D2 // pin the DI on the ws2812 is hooked-up to
#define RGBLED_NUM 8 // number of LEDs
#define RGBLIGHT_ANIMATIONS

21
keyboards/8pack/info.json Normal file
View file

@ -0,0 +1,21 @@
{
"keyboard_name": "8-Pack",
"url": "https://github.com/cgarcia2097/8-Pack",
"maintainer": "Charles Garcia",
"width": 4,
"height": 2,
"layouts": {
"LAYOUT": {
"layout": [
{"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":0, "y":1},
{"x":1, "y":1},
{"x":2, "y":1},
{"x":3, "y":1}
]
}
}
}

View file

@ -0,0 +1,12 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_V, KC_C, KC_X, MO(1),
KC_A, KC_S, KC_D, KC_F
),
[1] = LAYOUT(
RGB_TOG, RGB_RMOD, RGB_MOD, KC_NO,
RESET, BL_DEC, BL_INC, BL_TOGG
)
};

13
keyboards/8pack/readme.md Normal file
View file

@ -0,0 +1,13 @@
# 8-Pack Macropad
An open source 2x4 macropad designed by Charles Garcia.
Keyboard Maintainer: [Charles Garcia](https://github.com/cgarcia2097)
Hardware Supported: 8-Pack Macropad PCB
Hardware Availability: [8-Pack Github](https://github.com/cgarcia2097/8-Pack)
Make example for this keyboard (after setting up your build environment):
make 8pack: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,3 @@
#pragma once
#define DEVICE_VER 0x0001

View file

@ -0,0 +1 @@
#include "rev11.h"

View file

@ -0,0 +1,11 @@
#pragma once
#include "8pack.h"
#define LAYOUT( \
K00, K01, K02, K03, \
K10, K11, K12, K13 \
) { \
{ K13, K12, K11, K10 }, \
{ K03, K02, K01, K00 } \
}

View file

View file

@ -0,0 +1,3 @@
#pragma once
#define DEVICE_VER 0x0002

View file

@ -0,0 +1 @@
#include "rev12.h"

View file

@ -0,0 +1,11 @@
#pragma once
#include "8pack.h"
#define LAYOUT( \
K00, K01, K02, K03, \
K10, K11, K12, K13 \
) { \
{ K03, K02, K01, K00 }, \
{ K13, K12, K11, K10 } \
}

View file

63
keyboards/8pack/rules.mk Normal file
View file

@ -0,0 +1,63 @@
# MCU name
MCU = atmega32u4
# 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 = caterina
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
AUDIO_ENABLE = no
RGBLIGHT_ENABLE = yes
OLED_DRIVER_ENABLE = no
DEFAULT_FOLDER = 8pack/rev12