X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=keyboards%2Fclueboard%2F66_hotswap%2Fgen1%2Fconfig.h;h=6b0cfb60b53cf48c6357dee48403b0d2ded2ea63;hb=0f62383be57d2e3dacc79a76973295c73e805038;hp=d5d36d4a1c2e02b8c7eca4e01e5ca5a511bf202d;hpb=539a6fc8255b5a9f0173dca0b9b6bd94c12a51f4;p=qmk_firmware.git diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h index d5d36d4a1..6b0cfb60b 100644 --- a/keyboards/clueboard/66_hotswap/gen1/config.h +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -1,44 +1,146 @@ -#pragma once +/* + * Copyright 2017 skully + * + * 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 . + */ +#pragma once #include "config_common.h" -#define PRODUCT_ID 0x2390 +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED +#define PRODUCT_ID 0x2391 #define DEVICE_VER 0x0001 +#define MANUFACTURER Clueboard + +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 /* key matrix size */ #define MATRIX_ROWS 10 #define MATRIX_COLS 8 -/* ROWS: Top to bottom, COLS: Left to right +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * */ -#define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 } -#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 } -#define UNUSED_PINS +#define MATRIX_ROW_PINS { B11, A6, A3, A2, A1, B5, B6, C15, C14, C13 } +#define MATRIX_COL_PINS { B10, B2, B1, B0, A7, B4, B3, B7 } +#define UNUSED_PINS { A0, A8, A15, B12, B13, B14, B15 } +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 6 -/* Speaker configuration +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * */ -#define B7_AUDIO -#define NO_MUSIC_MODE -#define AUDIO_CLICKY +//#define FORCE_NKRO + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) -/* Backlight configuration +/* + * Feature disable options + * These options are also useful to firmware size reduction. */ -#define BACKLIGHT_LEVELS 1 -/* Underlight configuration +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options */ -#define RGB_DI_PIN D7 -#define RGBLED_NUM 26 // Number of LEDs -#define RGBLIGHT_HUE_STEP 32 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 -#define RGBLIGHT_EFFECT_BREATHE_MAX 200 -#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2 -#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 // How many LEDs wide to light up -#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 16 // The led to start at -#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8 // How many LEDs to travel -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + + /* Backlight configuration + */ +#define BACKLIGHT_LEVELS 10 + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define LED_DRIVER_ADDR_1 0b1110100 +#define I2C1_BANK GPIOB +#define I2C1_SCL 8 +#define I2C1_SDA 9 + +#define LED_DRIVER_COUNT 1 +#define LED_DRIVER_LED_COUNT 71