From fa40c927ead88ec221a95c3af984805fc0c211b3 Mon Sep 17 00:00:00 2001 From: Matthias Fulz Date: Thu, 1 Dec 2022 12:23:46 +0100 Subject: [PATCH] Trenctyl without enc --- .../trenctyl_manuform/6x6/f01/config.h | 52 +++++++++++-------- .../handwired/trenctyl_manuform/6x6/info.json | 10 +++- .../6x6/keymaps/default/keymap.c | 16 ++++-- .../handwired/trenctyl_manuform/config.h | 4 +- 4 files changed, 52 insertions(+), 30 deletions(-) diff --git a/keyboards/handwired/trenctyl_manuform/6x6/f01/config.h b/keyboards/handwired/trenctyl_manuform/6x6/f01/config.h index 4322bb5349..5e4eab7865 100644 --- a/keyboards/handwired/trenctyl_manuform/6x6/f01/config.h +++ b/keyboards/handwired/trenctyl_manuform/6x6/f01/config.h @@ -20,28 +20,36 @@ along with this program. If not, see . #include "config_common.h" -#define PRODUCT_ID 0x3836 -#define DEVICE_VER 0x0001 -#define PRODUCT Trenctyl Manuform (6x6) BlackPill F01 +//#define PRODUCT_ID 0x3836 +//#define DEVICE_VER 0x0001 +//#define PRODUCT Trenctyl Manuform(6x6) BlackPill F01 -#define MATRIX_ROW_PINS { A15, B13, B14, B15, A8, B6, B7 } -#define MATRIX_COL_PINS { B10, B0, A1, A0, B4, C14 } +#define MATRIX_ROW_PINS \ + { A15, B13, B14, B15, A8, B6, B7 } +#define MATRIX_COL_PINS \ + { B10, B0, A1, A0, B4, C14 } -#define MATRIX_ROW_PINS_RIGHT { A15, B13, B14, B15, A8, B6, B7 } -#define MATRIX_COL_PINS_RIGHT { B10, B0, A1, A0, B4, C14 } +#define MATRIX_ROW_PINS_RIGHT \ + { A15, B13, B14, B15, A8, B6, B7 } +#define MATRIX_COL_PINS_RIGHT \ + { B10, B0, A1, A0, B4, C14 } #define DIODE_DIRECTION ROW2COL #define RGB_DI_PIN B3 #define RGBLED_NUM 74 #define DRIVER_LED_TOTAL 74 +#define RGB_MATRIX_LED_COUNT 74 #define RGBLIGHT_SPLIT -#define RGBLED_SPLIT { 38, 36 } +#define RGBLED_SPLIT \ + { 38, 36 } #define RGBLIGHT_LIMIT_VAL 200 -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS RGBLIGHT_LIMIT_VAL -#define RGB_MATRIX_SPLIT RGBLED_SPLIT -#define RGB_MATRIX_CENTER { 110, 19 } +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +#define RGB_MATRIX_SPLIT \ + { 38, 36 } +#define RGB_MATRIX_CENTER \ + { 110, 19 } #define SERIAL_USART_RX_PIN A2 #define SELECT_SOFT_SERIAL_SPEED 1 @@ -53,18 +61,20 @@ along with this program. If not, see . #define I2C1_SCL_PIN B8 #define I2C1_SDA_PIN B9 -#define PMW3360_CS_PIN A4 +#define PMW33XX_CS_PIN A4 -#define SPI_DRIVER SPID1 -#define SPI_SCK_PIN A5 -#define SPI_SCK_PAL_MODE 5 -#define SPI_MOSI_PIN A7 -#define SPI_MOSI_PAL_MODE 5 -#define SPI_MISO_PIN A6 -#define SPI_MISO_PAL_MODE 5 +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_SCK_PAL_MODE 5 +#define SPI_MOSI_PIN A7 +#define SPI_MOSI_PAL_MODE 5 +#define SPI_MISO_PIN A6 +#define SPI_MISO_PAL_MODE 5 -#define ENCODERS_PAD_A { C13 } -#define ENCODERS_PAD_B { C15 } +#define ENCODERS_PAD_A \ + { C13 } +#define ENCODERS_PAD_B \ + { C15 } #define WS2812_PWM_DRIVER PWMD2 #define WS2812_PWM_CHANNEL 2 diff --git a/keyboards/handwired/trenctyl_manuform/6x6/info.json b/keyboards/handwired/trenctyl_manuform/6x6/info.json index 117cd49867..4055ae06ee 100644 --- a/keyboards/handwired/trenctyl_manuform/6x6/info.json +++ b/keyboards/handwired/trenctyl_manuform/6x6/info.json @@ -1,7 +1,13 @@ { - "keyboard_name": "Dactyl Manuform 6x6", + "keyboard_name": "Trenctyl Manuform(6x6) BlackPill F01", "url": "", - "maintainer": "qmk", + "usb": { + "vid": "0x44FD", + "pid": "0x3836", + "device_version": "0.0.1" + }, + "manufacturer": "mfulz", + "maintainer": "Matthias Fulz", "layouts": { "LAYOUT_6x6": { "layout": [ diff --git a/keyboards/handwired/trenctyl_manuform/6x6/keymaps/default/keymap.c b/keyboards/handwired/trenctyl_manuform/6x6/keymaps/default/keymap.c index 5143cb2b6a..66cbb25a7e 100644 --- a/keyboards/handwired/trenctyl_manuform/6x6/keymaps/default/keymap.c +++ b/keyboards/handwired/trenctyl_manuform/6x6/keymaps/default/keymap.c @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC, KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_LBRC, KC_LCTL, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, - OSM(MOD_LSFT), KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_DOT,KC_COMM ,KC_SLSH,KC_BSLASH, + OSM(MOD_LSFT), KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_DOT,KC_COMM ,KC_SLSH,KC_BACKSLASH, KC_MUTE,KC_RBRC,KC_MINS, KC_NUBS, KC_EQL, KC_LALT,KC_ENT, KC_SPC, KC_RALT, KC_ESC,I3WM, KC_LGUI,MOUSE, @@ -95,7 +95,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_CONTROL] = LAYOUT_6x6( - ENC_INIT,ENC_LOAD,ENC_CLOSE,ENC_KEY,_______,_______, ENC_REQ_ALLOW,ENC_REQ_DENY,_______,_______,_______,EEP_RST, + /*ENC_INIT,ENC_LOAD,ENC_CLOSE,ENC_KEY,_______,_______, ENC_REQ_ALLOW,ENC_REQ_DENY,_______,_______,_______,_______,*/ + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_DEL, _______,_______,KC_PGDN,KC_UP,KC_PGUP,_______, _______,KC_7,KC_8,KC_9,_______,_______, _______,_______,KC_LEFT,KC_DOWN,KC_RGHT,_______, KC_HOME,KC_4,KC_5,KC_6,KC_END,_______, @@ -319,9 +320,9 @@ report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) { } #endif -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (!_vis_status) { - return; + return false; } HSV hsv = (HSV){0, 0, 0}; @@ -341,7 +342,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { led_off = true; break; default: - return; + return false; } hsv.v = rgb_matrix_get_val(); @@ -368,6 +369,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } } } + return false; } typedef struct _vis_status { @@ -429,11 +431,15 @@ void keyboard_pre_init_user(void) { _vis_status = true; _vis_timeout_sec = 120; _vis_timer = timer_read32(); +#ifdef ENC_ENABLE pre_init_enc(); +#endif } void eeconfig_init_user(void) { +#ifdef ENC_ENABLE eeconfig_init_enc(); +#endif } void keyboard_post_init_user(void) { diff --git a/keyboards/handwired/trenctyl_manuform/config.h b/keyboards/handwired/trenctyl_manuform/config.h index cb2768a2e5..0ff2387a03 100644 --- a/keyboards/handwired/trenctyl_manuform/config.h +++ b/keyboards/handwired/trenctyl_manuform/config.h @@ -21,8 +21,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x44FD -#define MANUFACTURER mfulz +//#define VENDOR_ID 0x44FD +//#define MANUFACTURER mfulz /* mouse config */ //#define MOUSEKEY_INTERVAL 20