diff --git a/qmk_porting/keyboards/ClassPad/ClassPad.c b/qmk_porting/keyboards/ClassPad/ClassPad.c new file mode 100644 index 00000000..8adc01fd --- /dev/null +++ b/qmk_porting/keyboards/ClassPad/ClassPad.c @@ -0,0 +1,115 @@ +/* +Copyright 2023 OctopusZ + +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 . +*/ + +#include QMK_KEYBOARD_H +#include "gpio.h" +#include "extra_keycode.h" + +#ifdef RGB_MATRIX_ENABLE +/* clang-format off */ +led_config_t g_led_config = { + { + {0 , 1 , 2 , 3 , NO_LED, NO_LED, NO_LED}, + {NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED}, + {NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED}, + {NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED}, + {NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED}, + }, { + {0,0},{12,0},{24,0},{35,0}, + }, { + 2, 2, 2, 2, + } +}; +/* clang-format on */ + +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) +{ + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } + if (led_min <= 0 && led_max > 0 && host_keyboard_led_state().num_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(0, 0xFF, 0x00, 0x00); + } else { + RGB_MATRIX_INDICATOR_SET_COLOR(0, 0x00, 0x00, 0x00); + } + if (led_min <= 1 && led_max > 1) { + RGB_MATRIX_INDICATOR_SET_COLOR(1, 0x00, 0x00, 0x00); + } + if (led_min <= 2 && led_max > 2) { + RGB_MATRIX_INDICATOR_SET_COLOR(2, 0x00, 0x00, 0x00); + } + if (led_min <= 3 && led_max > 3) { + RGB_MATRIX_INDICATOR_SET_COLOR(3, 0x00, 0x00, 0x00); + } + +#if defined BATTERY_MEASURE_PIN || defined BLE_ENABLE + extern void wireless_rgb_indicator_task(uint8_t led_min, uint8_t led_max); + + wireless_rgb_indicator_task(led_min, led_max); +#endif + return true; +} + +#endif +bool dip_switch_update_kb(uint8_t index, bool active) +{ + switch (index) { + case 0: + if (active) // run once when tirggle + { + // writePinHigh(B12); // for debug + // setPinOutput(B12); + if (kbd_protocol_type != kbd_protocol_ble) { + wait_ms(50); // for debounce + bootloader_boot_mode_set(BOOTLOADER_BOOT_MODE_BLE); + soft_reset_keyboard(); + } + } else { + // writePinLow(B12); // for debug + // setPinOutput(B12); + if (kbd_protocol_type != kbd_protocol_usb) { + wait_ms(50); // for debounce + bootloader_boot_mode_set(BOOTLOADER_BOOT_MODE_USB); + soft_reset_keyboard(); + } + } + break; + } + return true; +} + +int main() +{ + extern void protocol_setup(); + extern void protocol_init(); + extern void protocol_task(); + + platform_setup(); + + protocol_setup(); +#if !defined ESB_ENABLE || ESB_ENABLE != 2 + keyboard_setup(); +#endif + + protocol_init(); + + /* Main loop */ + for (;;) { + protocol_task(); + //! housekeeping_task() is handled by platform + } +} diff --git a/qmk_porting/keyboards/ClassPad/ClassPad.h b/qmk_porting/keyboards/ClassPad/ClassPad.h new file mode 100644 index 00000000..544667b7 --- /dev/null +++ b/qmk_porting/keyboards/ClassPad/ClassPad.h @@ -0,0 +1,38 @@ +/* +Copyright 2022 OctopusZ + +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 . +*/ + +#pragma once + +#include "quantum.h" +#include "extra_keycode.h" + +// clang-format off +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, \ + K100, K101, K102, K104, K105, K106, \ + K200, K201, K202, K203, K204, K205, K206, \ + K300, K301, K302, \ + K400, K402, K403 \ +) \ +{ \ + {K000, K001, K002, K003, K004, K005, K006 },\ + {K100, K101, K102, KC_NO, K104, K105, K106 },\ + {K200, K201, K202, K203, K204, K205, K206 },\ + {K300, K301, K302, KC_NO, KC_NO, KC_NO, KC_NO},\ + {K400, KC_NO, K402, K403, KC_NO, KC_NO, KC_NO}\ +} +// clang-format on diff --git a/qmk_porting/keyboards/ClassPad/halconf.h b/qmk_porting/keyboards/ClassPad/halconf.h new file mode 100644 index 00000000..e0f2ccf0 --- /dev/null +++ b/qmk_porting/keyboards/ClassPad/halconf.h @@ -0,0 +1,48 @@ +/* +Copyright 2022 Huckies + +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 . +*/ + +// RB_PIN_UART0 - UART0: PB4/PB7 -> PA15/PA14 +// #define UART0_IO_REMAPPING + +// RB_PIN_UART1 - UART1: PA8/PA9 -> PB12/PB13 +// #define UART1_IO_REMAPPING + +// RB_PIN_UART2 - UART2: PA6/PA7 -> PB22/PB23 +// #define UART2_IO_REMAPPING + +// RB_PIN_UART3 - UART3: PA4/PA5 -> PB20/PB21 +// #define UART3_IO_REMAPPING + +/* I2C_IO_REMAPPING - I2C: PB13/PB12 -> PB21/PB20 */ +// #define I2C_IO_REMAPPING + +/* SPI_IO_REMAPPING - SPI0: PA12/PA13/PA14/PA15 -> PB12/PB13/PB14/PB15 */ +#define SPI_IO_REMAPPING + +// #define BLE_TX_POWER LL_TX_POWEER_MINUS_16_DBM +// #define BLE_TX_POWER LL_TX_POWEER_MINUS_12_DBM +// #define BLE_TX_POWER LL_TX_POWEER_MINUS_8_DBM +// #define BLE_TX_POWER LL_TX_POWEER_MINUS_5_DBM +// #define BLE_TX_POWER LL_TX_POWEER_MINUS_3_DBM +// #define BLE_TX_POWER LL_TX_POWEER_MINUS_1_DBM +// #define BLE_TX_POWER LL_TX_POWEER_0_DBM +// #define BLE_TX_POWER LL_TX_POWEER_1_DBM +// #define BLE_TX_POWER LL_TX_POWEER_2_DBM +#define BLE_TX_POWER LL_TX_POWEER_3_DBM +// #define BLE_TX_POWER LL_TX_POWEER_4_DBM +// #define BLE_TX_POWER LL_TX_POWEER_5_DBM +// #define BLE_TX_POWER LL_TX_POWEER_6_DBM diff --git a/qmk_porting/keyboards/ClassPad/info.json b/qmk_porting/keyboards/ClassPad/info.json new file mode 100755 index 00000000..b5dde4e8 --- /dev/null +++ b/qmk_porting/keyboards/ClassPad/info.json @@ -0,0 +1,185 @@ +{ + "name": "ClassPad", + "vendorId": "0xCAFE", + "productId": "0x0b9A", + "customKeycodes": [ + { + "name": "USB", + "title": "USB MODE", + "shortName": "USB" + }, + { + "name": "BLE1", + "title": "Tap = Use BLE slot 1, Hold = Clean BLE slot 1 binding", + "shortName": "BLE1" + }, + { + "name": "BLE2", + "title": "Tap = Use BLE slot 2, Hold = Clean BLE slot 2 binding", + "shortName": "BLE2" + }, + { + "name": "BLE3", + "title": "Tap = Use BLE slot 3, Hold = Clean BLE slot 3 binding", + "shortName": "BLE3" + }, + { + "name": "BLE4", + "title": "Tap = Use BLE slot 4, Hold = Clean BLE slot 4 binding", + "shortName": "BLE4" + }, + { + "name": "BLE5", + "title": "Tap = Use BLE slot 5, Hold = Clean BLE slot 5 binding", + "shortName": "BLE5" + }, + { + "name": "BLE6", + "title": "Tap = Use BLE slot 6, Hold = Clean BLE slot 6 binding", + "shortName": "BLE6" + }, + { + "name": "BLE7", + "title": "Tap = Use BLE slot 7, Hold = Clean BLE slot 7 binding", + "shortName": "BLE7" + }, + { + "name": "BLE8", + "title": "Tap = Use BLE slot 8, Hold = Clean BLE slot 8 binding", + "shortName": "BLE8" + }, + { + "name": "BLE9", + "title": "Tap = Use BLE slot 9, Hold = Clean BLE slot 9 binding", + "shortName": "BLE9" + }, + { + "name": "BLE10", + "title": "Tap = Use BLE slot 10, Hold = Clean BLE slot 10 binding", + "shortName": "BLE10" + }, + { + "name": "BLE11", + "title": "Tap = Use BLE slot 11, Hold = Clean BLE slot 11 binding", + "shortName": "BLE11" + }, + { + "name": "BLE12", + "title": "Tap = Use BLE slot 12, Hold = Clean BLE slot 12 binding", + "shortName": "BLE12" + }, + { + "name": "BLE13", + "title": "Tap = Use BLE slot 13, Hold = Clean BLE slot 13 binding", + "shortName": "BLE13" + }, + { + "name": "BLE814", + "title": "Tap = Use BLE slot 14, Hold = Clean BLE slot 14 binding", + "shortName": "BLE14" + }, + { + "name": "BLE815", + "title": "Tap = Use BLE slot 15, Hold = Clean BLE slot 15 binding", + "shortName": "BLE15" + }, + { + "name": "BLE816", + "title": "Tap = Use BLE slot 16, Hold = Clean BLE slot 16 binding", + "shortName": "BLE16" + }, + { + "name": "BC_A", + "title": "Clean ALL BLE slot binding", + "shortName": "BC_A" + }, + { + "name": "2.4G", + "title": "ESB MODE(2.4G mode)", + "shortName": "2.4G" + }, + { + "name": "BAT", + "title": "Enable battery lever indicator", + "shortName": "BAT" + } + ], + "matrix": { + "rows": 5, + "cols": 7 + }, + "layouts": { + "keymap": [ + [ + "0,0", + "0,1", + "0,2", + "0,3", + { + "x": 0.25 + }, + "0,4\n\n\n0,0", + "0,5\n\n\n0,0", + "0,6\n\n\n0,0", + { + "w": 1.5 + }, + "0,4\n\n\n0,1", + { + "w": 1.5 + }, + "0,6\n\n\n0,1" + ], + [ + "1,0", + "1,1", + "1,2", + { + "h": 2 + }, + "2,3", + { + "x": 0.25, + "w": 1.5 + }, + "1,4\n\n\n1,0", + { + "w": 1.5 + }, + "1,6\n\n\n1,0", + "1,4\n\n\n1,1", + "1,5\n\n\n1,1", + "1,6\n\n\n1,1" + ], + [ + "2,0", + "2,1", + "2,2" + ], + [ + "3,0", + "3,1", + "3,2", + { + "h": 2 + }, + "4,3", + { + "x": 1.25 + }, + "2,5\n\n\n\n\n\n\n\n\ne0" + ], + [ + { + "w": 2 + }, + "4,0", + "4,2" + ] + ], + "labels": [ + "A", + "B" + ] + } +} \ No newline at end of file diff --git a/qmk_porting/keyboards/ClassPad/keymaps/bluetooth_le/keymap.c b/qmk_porting/keyboards/ClassPad/keymaps/bluetooth_le/keymap.c new file mode 100644 index 00000000..8b575ea9 --- /dev/null +++ b/qmk_porting/keyboards/ClassPad/keymaps/bluetooth_le/keymap.c @@ -0,0 +1,99 @@ +/* +Copyright 2023 OctopusZ + +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 . +*/ + +#include QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [0] = LAYOUT_all(/* 0: qwerty */ + KC_NUM, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_DEL, KC_HOME, MO(1), + KC_KP_7, KC_KP_8 , KC_KP_9, LCTL(KC_C), KC_HOME, LCTL(KC_V), + KC_KP_4, KC_KP_5 , KC_KP_6, KC_KP_PLUS, EE_CLR, KC_MUTE,KC_MUTE, + KC_KP_1, KC_KP_2 , KC_KP_3, + KC_KP_0, KC_KP_DOT , KC_PENT), + [1] = LAYOUT_all(/* 1: fn */ + _______, _______, _______, _______, _______, MO(2), _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______), + [2] = LAYOUT_all(/* 2: fn */ + USB_MODE,BLE_SLOT0,BLE_SLOT1,BLE_SLOT2, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, + BLE_ALL_CLEAR, _______, _______), + [3] = LAYOUT_all(/* 2: fn */ + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______), + [4] = LAYOUT_all(/* 2: fn */ + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______), + [5] = LAYOUT_all(/* 2: fn */ + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______), + [6] = LAYOUT_all(/* 2: fn */ + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______), + [7] = LAYOUT_all(/* 2: fn */ + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______), + [8] = LAYOUT_all(/* 2: fn */ + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______), + [9] = LAYOUT_all(/* 2: fn */ + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______), + // clang-format on +}; + +#ifdef ENCODER_MAP_ENABLE + +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [2] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [4] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [5] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [6] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [7] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [8] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [9] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, +}; + +#endif diff --git a/qmk_porting/keyboards/ClassPad/keymaps/bluetooth_le/rules.cmake b/qmk_porting/keyboards/ClassPad/keymaps/bluetooth_le/rules.cmake new file mode 100644 index 00000000..0882c7e2 --- /dev/null +++ b/qmk_porting/keyboards/ClassPad/keymaps/bluetooth_le/rules.cmake @@ -0,0 +1,2 @@ +set(BLE_ENABLE ON CACHE BOOL "KB" FORCE) +set(ESB_ENABLE OFF CACHE BOOL "KB" FORCE) diff --git a/qmk_porting/keyboards/ClassPad/mcuconf.h b/qmk_porting/keyboards/ClassPad/mcuconf.h new file mode 100644 index 00000000..e675aca4 --- /dev/null +++ b/qmk_porting/keyboards/ClassPad/mcuconf.h @@ -0,0 +1,27 @@ +/* +Copyright 2022 Huckies + +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 . +*/ + +#pragma once + +// #define DEBUG Debug_UART1 +#define DEBUG_BAUDRATE 460800 +#define DCDC_ENABLE 1 +#define FREQ_SYS 40000000 +#define LSE_ENABLE 1 +#define BLE_SLOT_NUM 4 +#define HSE_LOAD_CAPACITANCE 20 // in pF unit +#define LSE_LOAD_CAPACITANCE 19 // in pF unit diff --git a/qmk_porting/keyboards/ClassPad/qmk_config.h b/qmk_porting/keyboards/ClassPad/qmk_config.h new file mode 100644 index 00000000..cee112e8 --- /dev/null +++ b/qmk_porting/keyboards/ClassPad/qmk_config.h @@ -0,0 +1,163 @@ +/* +Copyright 2022 OctopusZ + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCAFE +#define PRODUCT_ID 0x0B9A +#define DEVICE_VER 0x0001 +#define MANUFACTURER Class +#define PRODUCT ClassPad + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 7 +#define MATRIX_ROW_PINS \ + { \ + B9, B8, B17, B16, B18 \ + } +// for M2DK +// #define MATRIX_COL_PINS { A6, A0, A1, A2, A3, A15, A14} +// for ClassPad +#define MATRIX_COL_PINS \ + { \ + A6, A0, A1, A2, B2, B3, B4 \ + } + +#define DYNAMIC_KEYMAP_LAYER_COUNT 10 + +#define DIODE_DIRECTION COL2ROW +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 +// #define PERMISSIVE_HOLD +#define HOLD_ON_OTHER_KEY_PRESS + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE + +#define WS2812_EN_PIN A5 +#define WS2812_EN_LEVEL 1 + +#define BATTERY_MEASURE_PIN A4 +#define POWER_DETECT_PIN B12 + +#define BATTERY_INDICATOR_START_INDEX 0 +#define BATTERY_INDICATOR_END_INDEX 3 + +#ifdef ENCODER_ENABLE +#define ENCODERS_PAD_A \ + { \ + A3,A14 \ + } +#define ENCODERS_PAD_B \ + { \ + A15,A13 \ + } +#define ENCODER_RESOLUTION 1 +#endif + +#ifdef RGB_MATRIX_ENABLE + +#define BLE_INDICATOR_PREFIX +#define BLE_SLOT_1_INDICATOR 1 +#define BLE_SLOT_2_INDICATOR 2 +#define BLE_SLOT_3_INDICATOR 3 +#define RGB_MATRIX_KEYPRESSES +// #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_REACTIVE +#define WS2812_SPI_DRIVER 2 +#define RGBLED_NUM 4 +#define RGB_MATRIX_LED_COUNT RGBLED_NUM +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 32 +#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +#define RGB_MATRIX_HUE_STEP 10 +#define RGB_MATRIX_SAT_STEP 8 +#define RGB_MATRIX_VAL_STEP 4 +#define RGB_MATRIX_SPD_STEP 10 +#define RGB_DISABLE_WHEN_USB_SUSPENDED +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +#endif +#ifdef RGB_RAW_ENABLE +#define AUXILIARY_RGB_USE_UNIVERSAL_BRIGHTNESS +#endif + +/* define if matrix has ghost */ +// #define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 10 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +// #define NO_ACTION_LAYER +// #define NO_ACTION_TAPPING +// #define NO_ACTION_ONESHOT + +#define DIP_SWITCH_PINS \ + { \ + B0, B1 \ + } diff --git a/qmk_porting/keyboards/ClassPad/rules.cmake b/qmk_porting/keyboards/ClassPad/rules.cmake new file mode 100644 index 00000000..3d1d067e --- /dev/null +++ b/qmk_porting/keyboards/ClassPad/rules.cmake @@ -0,0 +1,20 @@ +set(MOUSE_ENABLE ON CACHE BOOL "KB" FORCE) +set(NKRO_ENABLE ON CACHE BOOL "KB" FORCE) +set(ENCODER_ENABLE ON CACHE BOOL "KB" FORCE) +set(ENCODER_MAP_ENABLE ON CACHE BOOL "KB" FORCE) +set(VIA_ENABLE ON CACHE BOOL "KB" FORCE) +set(BOOTMAGIC_ENABLE ON CACHE BOOL "KB" FORCE) +set(GRAVE_ESC_ENABLE ON CACHE BOOL "KB" FORCE) +set(COMMAND_ENABLE ON CACHE BOOL "KB" FORCE) +set(RGB_MATRIX_ENABLE ON CACHE BOOL "KB" FORCE) +set(DIP_SWITCH_ENABLE OFF CACHE STRING "KB" FORCE) + +set(RGB_MATRIX_DRIVER "WS2812" CACHE STRING "KB" FORCE) +set(WS2812_DRIVER "spi" CACHE STRING "KB" FORCE) +set(EEPROM_DRIVER "custom" CACHE STRING "KB" FORCE) + +# set(CUSTOM_MATRIX "${CMAKE_CURRENT_LIST_DIR}/matrix.c" CACHE STRING "KB" FORCE) +set(USB_ENABLE ON CACHE BOOL "KB" FORCE) +set(BLE_ENABLE ON CACHE BOOL "KB" FORCE) +set(ESB_ENABLE ON CACHE BOOL "KB" FORCE) +set(ESB_ROLE "keyboard" CACHE STRING "KB")