From e6f4173aecaedabe3b2550340321520f45227c7f Mon Sep 17 00:00:00 2001 From: zvecr Date: Wed, 24 Apr 2019 19:13:07 +0100 Subject: Refactor cospad to current standards and enable support for backlight keycodes (#5582) --- keyboards/cospad/config.h | 50 ++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 24 deletions(-) (limited to 'keyboards/cospad/config.h') diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h index 1f7c174e6..b7e7ec384 100644 --- a/keyboards/cospad/config.h +++ b/keyboards/cospad/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -32,42 +31,43 @@ along with this program. If not, see . #define MATRIX_ROWS 6 #define MATRIX_COLS 4 -// 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 { D0, D1, D2, D3, D4, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7 } #define UNUSED_PINS -#define BACKLIGHT_PIN F7 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST +/* Backlight configuration */ +#define BACKLIGHT_PIN F7 +#define BACKLIGHT_LEVELS 1 + +/* Underlight configuration */ +#define RGB_DI_PIN F6 +#define RGBLED_NUM 4 +#define RGBLIGHT_ANIMATIONS -/* Set 0 if debouncing isn't needed */ +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + /* 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 -/* Backlight configuration - */ -#define BACKLIGHT_LEVELS 4 - -/* Underlight configuration - */ - -#define RGB_DI_PIN F6 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 4 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -86,4 +86,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 -- cgit v1.2.3