qmk_firmare/keyboards/fingerpunch/fflx/config.h

88 lines
2.6 KiB
C

/*
Copyright 2021 Sadek Baroudi <sadekbaroudi@gmail.com>
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 "keyboards/fingerpunch/src/config_pre.h"
/* key matrix size */
/* Rows are doubled up */
#define MATRIX_ROWS 6
#define MATRIX_COLS 8
// wiring
#define MATRIX_ROW_PINS \
{ D2, F4, F5, F6, F7, B1 }
#define MATRIX_COL_PINS \
{ B5, B4, E6, D7, C6, D4, B2, B3 }
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define WS2812_DI_PIN D3 // 41
#ifdef RGBLIGHT_ENABLE
// Use twinkle as the default rgb mode for the layers
#define DEFAULT_RGB_LAYER_MODE RGBLIGHT_MODE_TWINKLE+2
#define RGBLIGHT_LED_COUNT 19
#define RGBLIGHT_HUE_STEP 16
#define RGBLIGHT_SAT_STEP 16
#define RGBLIGHT_VAL_STEP 16
#define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level for RGBLIGHT_ENABLE */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
#define RGBLIGHT_EFFECT_TWINKLE
#endif
#define ENCODERS_PAD_A {D5, B6}
#define ENCODERS_PAD_B {B7, F1}
#define ENCODER_RESOLUTION 2
#ifdef FP_EVQ_UNDER_PALMS
#define ENCODERS_A_REVERSE
#define ENCODERS_B_REVERSE
#endif
#ifdef FP_EC11_UNDER_PALMS
#define ENCODERS_C_REVERSE
#endif
#ifdef CIRQUE_ENABLE
// cirque trackpad config
#define CIRQUE_PINNACLE_ADDR 0x2A
#define POINTING_DEVICE_ROTATION_90
#define CIRQUE_PINNACLE_TAP_ENABLE
#define POINTING_DEVICE_TASK_THROTTLE_MS 5
#define I2C1_CLOCK_SPEED 400000
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
#endif
/* 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