Browse Source

[Keyboard] Support for Wheat Field Peripherals blocked 65% PCB (#4763)

* Basic Fanoe support (no LED yet)

* Enable RGB lights

* Backlighting support

* Change to reflect Wheat Field brand of Fanoe PCB

* Hot swap variant

* Fix review comment issues

* Fix review issues

* Corrected rules.mk

* Change naming to avoid using possibly copyrighted names

* Added info.json

* Corrected manufacturer name in info.json

* Keymap updates

* Add layout for use with ws2812b and such

* Fixes based on code review
walkerstop 6 years ago
parent
commit
1d3b9eea94

+ 1 - 0
keyboards/wheatfield/blocked65/blocked65.c

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

+ 20 - 0
keyboards/wheatfield/blocked65/blocked65.h

@@ -0,0 +1,20 @@
+#pragma once
+
+#include "quantum.h"
+
+#define _x_ KC_NO
+
+#define LAYOUT( \
+  K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+  K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
+  K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,      K2D, K2E, \
+  K30,      K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
+  K40, K41, K42,                K46,                K4A, K4B, K4C, K4D, K4E  \
+){ \
+  { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
+  { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
+  { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \
+  { K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
+  { K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, _x_, K4A, K4B, K4C, K4D, K4E }, \
+}
+

+ 53 - 0
keyboards/wheatfield/blocked65/config.h

@@ -0,0 +1,53 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID       0xFEED
+#define PRODUCT_ID      0x6060
+#define DEVICE_VER      0x0001
+#define MANUFACTURER    Dou
+#define PRODUCT         Blocked65
+#define DESCRIPTION     65% keyboard with arrow cluster blocker
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 }
+#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION ROW2COL
+
+/* number of backlight levels */
+
+#define BACKLIGHT_PIN B6
+
+#ifdef BACKLIGHT_PIN
+#define BACKLIGHT_LEVELS 6
+#endif
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 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 combination for command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+#define RGB_DI_PIN E2
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 2
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
+

File diff suppressed because it is too large
+ 9 - 0
keyboards/wheatfield/blocked65/info.json


+ 25 - 0
keyboards/wheatfield/blocked65/keymaps/default/keymap.c

@@ -0,0 +1,25 @@
+#include QMK_KEYBOARD_H
+
+#define RAISE MO(_RAISE)
+
+enum layers {
+  _QWERTY,
+  _RAISE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+  [_QWERTY] = LAYOUT(
+      KC_GESC, KC_1,    KC_2,    KC_3,    KC_4,   KC_5,   KC_6,   KC_7,   KC_8,   KC_9,    KC_0,    KC_MINS,  KC_EQL,  KC_BSPC,  KC_INSERT,    \
+      KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,   KC_T,   KC_Y,   KC_U,   KC_I,   KC_O,    KC_P,    KC_LBRC,  KC_RBRC, KC_BSLS,  KC_DEL,  \
+      KC_CAPS, KC_A,    KC_S,    KC_D,    KC_F,   KC_G,   KC_H,   KC_J,   KC_K,   KC_L,    KC_SCLN, KC_QUOT,  KC_ENT,            KC_PGUP,    \
+      KC_LSFT,          KC_Z,    KC_X,    KC_C,   KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM, KC_DOT,  KC_SLSH,  KC_RSFT, KC_UP,    KC_PGDN,      \
+      KC_LCTL, KC_LGUI, KC_LALT,                          KC_SPC,                 KC_RALT, RAISE,   KC_LEFT,  KC_DOWN, KC_RIGHT),
+
+  [_RAISE] = LAYOUT(
+      KC_GRV,  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_DEL,   KC_PSCR,    \
+      KC_TRNS, KC_NO,   KC_UP,   KC_NO,   RGB_TOG,RGB_VAI,RGB_HUI,RGB_SAI,KC_INS, RESET,   KC_PSCR, KC_SLCK,  KC_PAUS, KC_BSLS,  KC_SLCK, \
+      KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,RGB_MOD,RGB_VAD,RGB_HUD,RGB_SAD,KC_NO,  KC_NO,   KC_F14,  KC_F15,   KC_INS,            KC_HOME,   \
+      KC_LSFT,          KC_MPRV, KC_MPLY, KC_MNXT,KC_NO,  BL_TOGG,KC_NO,  KC_MUTE,KC_VOLD, KC_VOLU, KC_NO,    KC_RSFT, RGB_MOD,  KC_END,       \
+      KC_LCTL, KC_LGUI, KC_LALT,                          RESET,                  KC_RALT, KC_TRNS,           KC_HOME, BL_STEP,  KC_END)
+};

+ 9 - 0
keyboards/wheatfield/blocked65/keymaps/walker/config.h

@@ -0,0 +1,9 @@
+#pragma once
+
+#define RGB_DI_PIN E2
+#define RGBLIGHT_ANIMATIONS
+#undef RGBLED_NUM
+#define RGBLED_NUM 72
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8

+ 27 - 0
keyboards/wheatfield/blocked65/keymaps/walker/keymap.c

@@ -0,0 +1,27 @@
+#include QMK_KEYBOARD_H
+
+#define RAISE MO(_RAISE)
+
+enum layers {
+  _QWERTY,
+  _RAISE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+  [_QWERTY] = LAYOUT(
+      KC_GESC, KC_1,    KC_2,    KC_3,    KC_4,   KC_5,   KC_6,   KC_7,   KC_8,   KC_9,    KC_0,    KC_MINS,  KC_EQL,  KC_BSPC,  KC_INSERT,    \
+      KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,   KC_T,   KC_Y,   KC_U,   KC_I,   KC_O,    KC_P,    KC_LBRC,  KC_RBRC, KC_BSLS,  KC_DEL,  \
+      KC_CAPS, KC_A,    KC_S,    KC_D,    KC_F,   KC_G,   KC_H,   KC_J,   KC_K,   KC_L,    KC_SCLN, KC_QUOT,  KC_ENT,            KC_PGUP,    \
+      KC_LSFT,          KC_Z,    KC_X,    KC_C,   KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM, KC_DOT,  KC_SLSH,  KC_RSFT, KC_UP,    KC_PGDN,      \
+      KC_LCTL, KC_LGUI, KC_LALT,                          KC_SPC,                 KC_RALT, RAISE,   KC_LEFT,  KC_DOWN, KC_RIGHT),
+
+  [_RAISE] = LAYOUT(
+      KC_GRV,  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_DEL,   KC_PSCR,    \
+      KC_TRNS, KC_NO,   KC_UP,   KC_NO,   RGB_TOG,RGB_VAI,RGB_HUI,RGB_SAI,KC_INS, RESET,   KC_PSCR, KC_SLCK,  KC_PAUS, KC_BSLS,  KC_SLCK, \
+      KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,RGB_MOD,RGB_VAD,RGB_HUD,RGB_SAD,KC_NO,  KC_NO,   KC_F14,  KC_F15,   KC_INS,            KC_HOME,   \
+      KC_LSFT,          KC_MPRV, KC_MPLY, KC_MNXT,KC_NO,  BL_TOGG,KC_NO,  KC_MUTE,KC_VOLD, KC_VOLU, KC_NO,    KC_RSFT, RGB_MOD,  KC_END,       \
+      KC_LCTL, KC_LGUI, KC_LALT,                          RESET,                  KC_RALT, KC_TRNS,           KC_HOME, BL_STEP,  KC_END)
+
+};
+

+ 59 - 0
keyboards/wheatfield/blocked65/rules.mk

@@ -0,0 +1,59 @@
+# 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 = atmel-dfu
+
+# Boot Section Size in *bytes*
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# Build Options
+#   change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes      # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no        # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
+CONSOLE_ENABLE = no         # Console for debug(+400)
+COMMAND_ENABLE = yes        # Commands for debug and configuration
+SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes           # USB Nkey Rollover
+BACKLIGHT_ENABLE = yes      # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = yes
+MIDI_ENABLE = no            # MIDI controls
+UNICODE_ENABLE = no         # Unicode
+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no           # Audio output on port C6

Some files were not shown because too many files changed in this diff