~ruther/qmk_firmware

d591ab6263a4c5581d1614b006b5ef52b012c9a8 — Paul J. Miller 6 years ago 7871a46
feat: add kbd67v2 support (#5777)

* feat: add kbd67v2 support

* update cr

* Update keyboards/kbdfans/kbd67/rev2/config.h

Co-Authored-By: Vorror <paul@dgtlrepublic.com>

* Update keyboards/kbdfans/kbd67/rev2/config.h

Co-Authored-By: Vorror <paul@dgtlrepublic.com>

* Update keyboards/kbdfans/kbd67/rev2/rev2.c

Co-Authored-By: Vorror <paul@dgtlrepublic.com>

* Update keyboards/kbdfans/kbd67/rev2/rules.mk

Co-Authored-By: MechMerlin <30334081+mechmerlin@users.noreply.github.com>

* Update keyboards/kbdfans/kbd67/rev2/readme.md

Co-Authored-By: MechMerlin <30334081+mechmerlin@users.noreply.github.com>
A keyboards/kbdfans/kbd67/rev2/config.h => keyboards/kbdfans/kbd67/rev2/config.h +64 -0
@@ 0,0 1,64 @@
/*
Copyright 2019 Vorror

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      0x6060
#define DEVICE_VER      0x0001
#define MANUFACTURER    KBDFans
#define PRODUCT         KBD67v2
#define DESCRIPTION     65% Keyboard

/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 16

#define MATRIX_ROW_PINS { B7, D0, F0, F1, F4 }
#define MATRIX_COL_PINS { B0, B1, B2, B3, D1, D2, D3, D6, D7, B4, B6, C6, C7, F7, F6, F5 }
#define UNUSED_PINS

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

/* number of backlight levels */
#define BACKLIGHT_PIN B5
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 3
#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

#define RGB_DI_PIN E2
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 18
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_LIMIT_VAL 240
#endif

A keyboards/kbdfans/kbd67/rev2/info.json => keyboards/kbdfans/kbd67/rev2/info.json +16 -0
@@ 0,0 1,16 @@
{
  "keyboard_name": "kbd67v2",
  "url": "",
  "maintainer": "qmk",
  "width": 16,
  "height": 5,
  "layouts": {
      "LAYOUT_all": {
          "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
      },

      "LAYOUT_65_ansi": {
          "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
      }
  }
}

A keyboards/kbdfans/kbd67/rev2/keymaps/default/config.h => keyboards/kbdfans/kbd67/rev2/keymaps/default/config.h +19 -0
@@ 0,0 1,19 @@
/* Copyright 2018 MechMerlin
 *
 * 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

// place overrides here

A keyboards/kbdfans/kbd67/rev2/keymaps/default/keymap.c => keyboards/kbdfans/kbd67/rev2/keymaps/default/keymap.c +99 -0
@@ 0,0 1,99 @@
/* Copyright 2018 'mechmerlin'
 *
 * 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

// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
  QMKBEST = SAFE_RANGE,
  QMKURL
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap (Base Layer) Default Layer
   * ,----------------------------------------------------------------.
   * |Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp |Home|
   * |----------------------------------------------------------------|
   * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \  |PgUp|
   * |----------------------------------------------------------------|
   * |Ctrl   |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return |PgDn|
   * |----------------------------------------------------------------|
   * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift | Up|End |
   * |----------------------------------------------------------------|
   * |Ctrl|Win |Alt |        Space          |Alt| FN|Ctrl|Lef|Dow|Rig |
   * `----------------------------------------------------------------'
   */
[0] = LAYOUT_65_ansi(
  KC_ESC,  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_HOME, \
  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_PGUP, \
  KC_LCTL, 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_PGDN,  \
  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_END,           \
  KC_LCTL, KC_LGUI, KC_LALT,                KC_SPC,                          KC_RALT, MO(1),   KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),

  /* Keymap Fn Layer
   * ,----------------------------------------------------------------.
   * |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del    |Ins |
   * |----------------------------------------------------------------|
   * |Caps |   |Up |   |   |   |   |   |PSc|SLk|Pau|Up |   |     |    |
   * |----------------------------------------------------------------|
   * |      |Lef|Dow|Rig|   |   |   |   |Hom|PUp|Lef|Rig|        |    |
   * |----------------------------------------------------------------|
   * |        |   |   |   |   |   |   |   |End|PDn|Dow|      |PUp|    |
   * |----------------------------------------------------------------|
   * |    |    |    |                       |   |   |    |Hom|PDn|End |
   * `----------------------------------------------------------------'
   */
[1] = LAYOUT_65_ansi(
   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_INS, \
   KC_CAPS,_______,  KC_UP,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,  KC_UP,_______,     _______,_______,   \
      _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,_______,_______,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT,            _______,_______, \
           _______,_______,_______,_______,_______,_______,_______,_______, KC_END,KC_PGDN,KC_DOWN,       _______,KC_PGUP,_______, \
    _______,  _______,  _______,                     _______,                     _______,_______,_______,KC_HOME,KC_PGDN, KC_END),

};

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
  switch (keycode) {
    case QMKBEST:
      if (record->event.pressed) {
        // when keycode QMKBEST is pressed
        SEND_STRING("QMK is the best thing ever!");
      } else {
        // when keycode QMKBEST is released
      }
      break;
    case QMKURL:
      if (record->event.pressed) {
        // when keycode QMKURL is pressed
        SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
      } else {
        // when keycode QMKURL is released
      }
      break;
  }
  return true;
}

void matrix_init_user(void) {

}

void matrix_scan_user(void) {

}

void led_set_user(uint8_t usb_led) {

}

A keyboards/kbdfans/kbd67/rev2/keymaps/default/readme.md => keyboards/kbdfans/kbd67/rev2/keymaps/default/readme.md +1 -0
@@ 0,0 1,1 @@
# The default keymap for kbd67

A keyboards/kbdfans/kbd67/rev2/keymaps/koba/config.h => keyboards/kbdfans/kbd67/rev2/keymaps/koba/config.h +17 -0
@@ 0,0 1,17 @@
/* Copyright 2019 Daisuke Kobayashi
 *
 * 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

A keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c => keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c +61 -0
@@ 0,0 1,61 @@
/* Copyright 2019 Daisuke Kobayashi
 *
 * 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
#include "keymap_jp.h"

#define RGB_RMO RGB_RMOD

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap (Base Layer) Default Layer
   * ,----------------------------------------------------------------.
   * |Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  ^|  \|BS |Del |
   * |----------------------------------------------------------------|
   * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  @|  [| Ent |PgUp|
   * |------------------------------------------------------.    |----|
   * |H/Z   |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  :|  ]|    |PgDn|
   * |----------------------------------------------------------------|
   * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift |Up |PScr|
   * |----------------------------------------------------------------|
   * |Ctrl|Win |Alt | Space    |Fn | Space  |Alt |Ctrl|  |Lef|Dow|Rig |
   * `------------------------------------------------'  `------------'
   */
[0] = LAYOUT_all(
  KC_ESC,  KC_1,   KC_2,   KC_3,   KC_4,   KC_5,   KC_6,   KC_7,   KC_8,    KC_9,    KC_0,    KC_MINS, JP_CIRC, KC_JYEN, KC_BSPC, KC_DELT, \
  KC_TAB,     KC_Q,   KC_W,   KC_E,   KC_R,   KC_T,   KC_Y,   KC_U,   KC_I,    KC_O,    KC_P,    JP_AT,   JP_LBRC, JP_RBRC,       KC_PGUP, \
  KC_ZKHK,       KC_A,   KC_S,   KC_D,   KC_F,   KC_G,   KC_H,   KC_J,   KC_K,    KC_L,    KC_SCLN, JP_COLN,       KC_ENT,        KC_PGDN, \
  KC_LSFT, XXXXXXX, 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_PSCR, \
  KC_LCTL, KC_LGUI, KC_LALT,        KC_SPC,         MO(1),          KC_SPC,          KC_RALT, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT),

  /* Keymap Fn Layer
   * ,----------------------------------------------------------------.
   * |Rst| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|   |   |Ins |
   * |----------------------------------------------------------------|
   * |     |M- |M+ |RGB|H- |H+ |   |   |Prt|SLk|Pau|   |   |     |    |
   * |------------------------------------------------------.    |----|
   * |Caps  |Vo-|Vo+|Mut|S- |S+ |  *|  /|Hom|PUp|   |   |   |    |    |
   * |----------------------------------------------------------------|
   * |        |BL-|BL+|BL |V- |V+ |  +|  -|End|PDn|  _|      |PUp|    |
   * |----------------------------------------------------------------|
   * |    |    |    | Muhenkan |   | Henkan |Kana|Menu|  |Hom|PDn|End |
   * `------------------------------------------------'  `------------'
   */
[1] = LAYOUT_all(
   RESET,  KC_F1,  KC_F2,  KC_F3,  KC_F4,  KC_F5,  KC_F6,  KC_F7,  KC_F8,  KC_F9,  KC_F10, KC_F11, KC_F12, XXXXXXX,_______,KC_INS,  \
   _______,   RGB_RMO,RGB_MOD,RGB_TOG,RGB_HUD,RGB_HUI,XXXXXXX,XXXXXXX,KC_PSCR,KC_SLCK,KC_PAUS,XXXXXXX,XXXXXXX,XXXXXXX,     _______, \
   KC_CAPS,     KC_VOLD,KC_VOLU,KC_MUTE,RGB_SAD,RGB_SAI,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,XXXXXXX,XXXXXXX,      KC_PENT,     _______, \
   _______,_______,BL_DEC, BL_INC, BL_TOGG,RGB_VAD,RGB_VAI,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,JP_UNDS,_______,        KC_PGUP,_______, \
   _______,_______,_______,        KC_MHEN,        _______,        KC_HENK,        KC_KANA,KC_APP, _______,KC_HOME,KC_PGDN,KC_END),
};

A keyboards/kbdfans/kbd67/rev2/keymaps/koba/readme.md => keyboards/kbdfans/kbd67/rev2/keymaps/koba/readme.md +7 -0
@@ 0,0 1,7 @@
# Koba's keymap for KBD67

![keyboard-layout](https://user-images.githubusercontent.com/1042121/54736578-244ffe80-4bef-11e9-9882-37611b4efdf4.png)

- JIS layout.
- Fn layer is arranged like HHKB.
- 3 splitted space bar. (Space-Fn-Space)

A keyboards/kbdfans/kbd67/rev2/readme.md => keyboards/kbdfans/kbd67/rev2/readme.md +13 -0
@@ 0,0 1,13 @@
# KBD67 rev2

65% pcb with blocker. Revision 2 (Manufactured after 05/01/19). 

Keyboard Maintainer: [Vorror](https://github.com/vorror)  
Hardware Supported: KBD67v2 PCB (Sometimes sold under the name "KBD65")  
Hardware Availability: KBDFans [Keyboard Kit](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit), [PCB](https://kbdfans.cn/collections/65/products/kbd65-65-custom-mechanical-keyboard-pcb)

Make example for this keyboard (after setting up your build environment):

    make kbdfans/kbd67/rev2: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).

A keyboards/kbdfans/kbd67/rev2/rev2.c => keyboards/kbdfans/kbd67/rev2/rev2.c +42 -0
@@ 0,0 1,42 @@
/* Copyright 2019 Vorror
 *
 * 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 "rev2.h"

void matrix_init_kb(void) {
	// put your keyboard start-up code here
	// runs once when the firmware starts up

	matrix_init_user();
}

void matrix_scan_kb(void) {
	// put your looping keyboard code here
	// runs every cycle (a lot)

	matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
	// put your per-action keyboard code here
	// runs for every action, just before processing by the firmware

	return process_record_user(keycode, record);
}

void led_set_kb(uint8_t usb_led) {
	// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
	led_set_user(usb_led);
}

A keyboards/kbdfans/kbd67/rev2/rev2.h => keyboards/kbdfans/kbd67/rev2/rev2.h +57 -0
@@ 0,0 1,57 @@
/* Copyright 2018 MechMerlin
 *
 * 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_all( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
    K10,      K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \
    K20,      K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,      K2F, \
    K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,      K3D, K3E, K3F, \
    K40, K41,      K43, K44,      K46,      K48,      K4A, K4B, K4C, K4D, K4E, K4F  \
) \
{ \
    { K00, K01,   K02,   K03, K04, K05,   K06, K07,   K08, K09,   K0A, K0B, K0C,   K0D, K0E,   K0F }, \
    { K10, KC_NO, K12,   K13, K14, K15,   K16, K17,   K18, K19,   K1A, K1B, K1C,   K1D, K1E,   K1F }, \
    { K20, KC_NO, K22,   K23, K24, K25,   K26, K27,   K28, K29,   K2A, K2B, K2C,   K2D, KC_NO, K2F }, \
    { K30, K31,   K32,   K33, K34, K35,   K36, K37,   K38, K39,   K3A, K3B, KC_NO, K3D, K3E,   K3F }, \
    { K40, K41,   KC_NO, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C,   K4D, K4E,   K4F }, \
}

#define LAYOUT_65_ansi( \
    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C,      K0E, K0F, \
    K10,      K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \
    K20,      K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,      K2F, \
    K30,      K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B,      K3D, K3E, K3F, \
    K40, K41,      K43,           K46,                K4A, K4B, K4C, K4D, K4E, K4F  \
) \
{ \
    { K00, K01,   K02,   K03, K04,   K05,   K06, K07,   K08,   K09,   K0A, K0B, K0C,   KC_NO, K0E,   K0F }, \
    { K10, KC_NO, K12,   K13, K14,   K15,   K16, K17,   K18,   K19,   K1A, K1B, K1C,   K1D,   K1E,   K1F }, \
    { K20, KC_NO, K22,   K23, K24,   K25,   K26, K27,   K28,   K29,   K2A, K2B, K2C,   K2D,   KC_NO, K2F }, \
    { K30, KC_NO, K32,   K33, K34,   K35,   K36, K37,   K38,   K39,   K3A, K3B, KC_NO, K3D,   K3E,   K3F }, \
    { K40, K41,   KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C,   K4D,   K4E,   K4F }, \
}


A keyboards/kbdfans/kbd67/rev2/rules.mk => keyboards/kbdfans/kbd67/rev2/rules.mk +82 -0
@@ 0,0 1,82 @@
# 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 = 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 = lite     # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
CONSOLE_ENABLE = yes        # 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 = no            # USB Nkey Rollover
BACKLIGHT_ENABLE = yes       # 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 = no         # 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)

LAYOUTS = 65_ansi