Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Keyboard] Add Electronlab KLOR keyboard definitions #24372

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
58 changes: 58 additions & 0 deletions keyboards/electronlab/klor/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
Copyright 2024 ElectronLab

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

/* The way how "handedness" is decided (which half is which), see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness for more options.*/
//#define EE_HANDS
#define MASTER_LEFT
//#define MASTER_RIGHT
//#define SPLIT_HAND_PIN GP10 //If handedness jumpers are bridged on KLOR REV 1.5 PCB onward

Lefuneste83 marked this conversation as resolved.
Show resolved Hide resolved
#define I2C1_SCL_PIN GP3
#define I2C1_SDA_PIN GP2

# define OLED_DISPLAY_128X64
# define SPLIT_OLED_ENABLE
# define OLED_FONT_H "./lib/glcdfont.c"

#define AUDIO_PWM_DRIVER PWMD4
#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_B
#define AUDIO_STATE_TIMER GPTD4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be needed by the pwm_hardware driver

Suggested change
#define AUDIO_STATE_TIMER GPTD4

#define AUDIO_PIN GP9
#define AUDIO_DAC_SAMPLE_MAX 4095U
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define AUDIO_DAC_SAMPLE_MAX 4095U

#define AUDIO_VOICE_DEFAULT butts_fader

# define STARTUP_SONG SONG(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 GOODBYE_SONG SONG(H__NOTE(_DS4), H__NOTE(_DS3), W__NOTE(_DS1))
# define DEFAULT_LAYER_SONGS \
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND) }

#define DRV2605L_FB_ERM_LRA 1
#define DRV2605L_FB_BRAKEFACTOR 3
#define DRV2605L_FB_LOOPGAIN 1
#define DRV2605L_RATED_VOLTAGE 2
#define DRV2605L_V_PEAK 2.8
#define DRV2605L_V_RMS 2.0
#define DRV2605L_F_LRA 150
#define DRV2605L_DRV_GREETING alert_750ms
#define DRV2605L_DEFAULT_MODE 4
Comment on lines +44 to +51
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these are default, and some of these are wrong

Suggested change
#define DRV2605L_FB_BRAKEFACTOR 3
#define DRV2605L_FB_LOOPGAIN 1
#define DRV2605L_RATED_VOLTAGE 2
#define DRV2605L_V_PEAK 2.8
#define DRV2605L_V_RMS 2.0
#define DRV2605L_F_LRA 150
#define DRV2605L_DRV_GREETING alert_750ms
#define DRV2605L_DEFAULT_MODE 4
#define DRV2605L_V_PEAK 2.8
#define DRV2605L_F_LRA 150
#define DRV2605L_DRV_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
#define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_SHARP_CLICK_100


# define POINTING_DEVICE_SCLK_PIN GP3
# define POINTING_DEVICE_SDIO_PIN GP2
# define POINTING_DEVICE_AUTO_MOUSE_ENABLE
# define AUTO_MOUSE_DELAY 300
11 changes: 11 additions & 0 deletions keyboards/electronlab/klor/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2022 QMK
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define HAL_USE_ADC TRUE
#define HAL_USE_I2C TRUE
#define HAL_USE_SPI TRUE
#define HAL_USE_PWM TRUE

#include_next <halconf.h>
Loading