136 lines
5.5 KiB
C
136 lines
5.5 KiB
C
/*
|
|
Copyright 2022 GEIST <@geigeigeist>
|
|
|
|
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"
|
|
|
|
|
|
// ┌─────────────────────────────────────────────────┐
|
|
// │ k e y m a t r i x │
|
|
// └─────────────────────────────────────────────────┘
|
|
|
|
#define MATRIX_ROW_PINS { C6, D7, E6, B4 }
|
|
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
|
|
#define DIODE_DIRECTION COL2ROW
|
|
#define MATRIX_ROWS 8
|
|
#define MATRIX_COLS 6
|
|
#define DEBOUNCE 5
|
|
|
|
|
|
// ┌─────────────────────────────────────────────────┐
|
|
// │ s p l i t c o m m u n i c a t i o n │
|
|
// └─────────────────────────────────────────────────┘
|
|
|
|
#define USE_SERIAL
|
|
#define SOFT_SERIAL_PIN D2
|
|
#define SERIAL_USE_MULTI_TRANSACTION
|
|
//#define SPLIT_LAYER_STATE_ENABLE
|
|
//#define SPLIT_USB_DETECT
|
|
|
|
// Sadek added:
|
|
#define SPLIT_TRANSPORT_MIRROR
|
|
#define SPLIT_LAYER_STATE_ENABLE
|
|
|
|
|
|
// ┌─────────────────────────────────────────────────┐
|
|
// │ e n c o d e r s │
|
|
// └─────────────────────────────────────────────────┘
|
|
|
|
#define ENCODERS_PAD_A { F5 }
|
|
#define ENCODERS_PAD_B { F4 }
|
|
#define ENCODERS_PAD_A_RIGHT { F4 }
|
|
#define ENCODERS_PAD_B_RIGHT { F5 }
|
|
#define ENCODER_RESOLUTION 2
|
|
|
|
|
|
// ┌─────────────────────────────────────────────────┐
|
|
// │ o l e d s │
|
|
// └─────────────────────────────────────────────────┘
|
|
|
|
#ifdef OLED_ENABLE
|
|
# define OLED_DISPLAY_128X64
|
|
# define SPLIT_OLED_ENABLE
|
|
# define OLED_FONT_H "./lib/glcdfont.c"
|
|
#endif
|
|
|
|
|
|
// ┌─────────────────────────────────────────────────┐
|
|
// │ r g b l e d s │
|
|
// └─────────────────────────────────────────────────┘
|
|
|
|
#define WS2812_DI_PIN D3
|
|
#ifndef RGBLIGHT_LED_COUNT
|
|
# define RGBLIGHT_LED_COUNT 42
|
|
#endif
|
|
#ifndef RGBLED_SPLIT
|
|
# define RGBLED_SPLIT { 21, 21 }
|
|
#endif
|
|
#define RGB_MATRIX_LED_COUNT RGBLIGHT_LED_COUNT
|
|
|
|
#ifdef RGB_MATRIX_ENABLE
|
|
# define SPLIT_TRANSPORT_MIRROR
|
|
#ifndef RGB_MATRIX_LED_COUNT
|
|
# define RGB_MATRIX_LED_COUNT 42 // Number of LEDs
|
|
#endif
|
|
#ifndef RGB_MATRIX_SPLIT
|
|
# define RGB_MATRIX_SPLIT { 21, 21 }
|
|
#endif
|
|
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180
|
|
# define RGB_MATRIX_STARTUP_HUE 35
|
|
# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
|
|
# define RGB_MATRIX_SLEEP
|
|
# define RGB_MATRIX_KEYPRESSES
|
|
#endif
|
|
|
|
|
|
|
|
// ┌─────────────────────────────────────────────────┐
|
|
// │ a u d i o │
|
|
// └─────────────────────────────────────────────────┘
|
|
|
|
#define AUDIO_PIN B5
|
|
#define AUDIO_VOICES
|
|
#define AUDIO_DAC_SAMPLE_MAX 4095U
|
|
#define AUDIO_VOICE_DEFAULT butts_fader
|
|
|
|
#ifdef AUDIO_ENABLE
|
|
# define KLOR_SOUND W__NOTE(_DS0), W__NOTE(_DS1), H__NOTE(_DS2), H__NOTE(_DS3), Q__NOTE(_DS4), Q__NOTE(_DS5), E__NOTE(_DS6), E__NOTE(_DS7), S__NOTE(_DS8), Q__NOTE(_GS0)
|
|
# define STARTUP_SONG SONG(KLOR_SOUND)
|
|
# define BYE_SOUND H__NOTE(_DS4), H__NOTE(_DS3), W__NOTE(_DS1)
|
|
# define GOODBYE_SONG SONG(BYE_SOUND)
|
|
# define DEFAULT_LAYER_SONGS \
|
|
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND) }
|
|
|
|
#endif
|
|
|
|
|
|
// ┌─────────────────────────────────────────────────┐
|
|
// │ h a p t i c f e e d b a c k │
|
|
// └─────────────────────────────────────────────────┘
|
|
|
|
#ifdef HAPTIC_ENABLE
|
|
# define FB_ERM_LRA 1
|
|
# define FB_BRAKEFACTOR 3 // For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7
|
|
# define FB_LOOPGAIN 1 // For Low:0, Medium:1, High:2, Very High:3
|
|
# define RATED_VOLTAGE 2
|
|
# define V_PEAK 2.8
|
|
# define V_RMS 2.0
|
|
# define F_LRA 150 // resonance freq
|
|
# define DRV_GREETING alert_750ms
|
|
#endif
|