summaryrefslogtreecommitdiffstats
path: root/keyboards/keebio/chocopad
diff options
context:
space:
mode:
authorlokher <lokher@gmail.com>2022-12-06 17:04:10 +0800
committerlokher <lokher@gmail.com>2022-12-06 17:04:10 +0800
commit27fc28fd2ff52e079a5bc58d6aaea4c752420615 (patch)
tree7ac943fb1ba4f430a7220efd18f66f6a77205c30 /keyboards/keebio/chocopad
parente736133392fe6427cfb995da0787337189828272 (diff)
parent2709b6ed616f8012ff4cfd3ee69a822a8d188351 (diff)
Merge upstream master
Diffstat (limited to 'keyboards/keebio/chocopad')
-rw-r--r--keyboards/keebio/chocopad/chocopad.c18
-rw-r--r--keyboards/keebio/chocopad/config.h45
2 files changed, 63 insertions, 0 deletions
diff --git a/keyboards/keebio/chocopad/chocopad.c b/keyboards/keebio/chocopad/chocopad.c
new file mode 100644
index 0000000000..523e0626a9
--- /dev/null
+++ b/keyboards/keebio/chocopad/chocopad.c
@@ -0,0 +1,18 @@
+#include "chocopad.h"
+
+void eeconfig_init_kb(void) {
+#ifdef BACKLIGHT_ENABLE
+ backlight_enable();
+ backlight_level(5);
+#endif
+#ifdef RGBLIGHT_ENABLE
+ rgblight_enable(); // Enable RGB by default
+ rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness
+#ifdef RGBLIGHT_MODE_EFFECT_SWIRL
+ rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default
+#endif
+#endif
+
+ eeconfig_update_kb(0);
+ eeconfig_init_user();
+}
diff --git a/keyboards/keebio/chocopad/config.h b/keyboards/keebio/chocopad/config.h
new file mode 100644
index 0000000000..a617e480c6
--- /dev/null
+++ b/keyboards/keebio/chocopad/config.h
@@ -0,0 +1,45 @@
+#pragma once
+
+#include "config_common.h"
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 4
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { D7, E6, B3, B2 }
+#define MATRIX_COL_PINS { D2, D4, F6, F5 }
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* number of backlight levels */
+#define BACKLIGHT_PIN B5
+#define BACKLIGHT_LEVELS 6
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+/* 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
+
+#ifdef RGB_DI_PIN
+#define RGBLIGHT_EFFECT_BREATHING
+#define RGBLIGHT_EFFECT_RAINBOW_MOOD
+#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+#define RGBLIGHT_EFFECT_SNAKE
+#define RGBLIGHT_EFFECT_KNIGHT
+#define RGBLIGHT_EFFECT_CHRISTMAS
+#define RGBLIGHT_EFFECT_STATIC_GRADIENT
+#define RGBLIGHT_EFFECT_RGB_TEST
+#define RGBLIGHT_EFFECT_ALTERNATING
+#define RGBLIGHT_EFFECT_TWINKLE
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
+#endif
+#define RGB_DI_PIN D3
+#define RGBLED_NUM 4