[TractylM] Add changes from PR
This commit is contained in:
parent
6bf3f6b868
commit
b09ff15d8e
12 changed files with 40 additions and 168 deletions
|
@ -21,6 +21,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#define ROTATIONAL_TRANSFORM_ANGLE -25
|
#define ROTATIONAL_TRANSFORM_ANGLE -25
|
||||||
#define POINTING_DEVICE_INVERT_X
|
#define POINTING_DEVICE_INVERT_X
|
||||||
|
|
||||||
#define LAYER_STATE_16BIT
|
|
||||||
|
|
||||||
#define POINTING_DEVICE_RIGHT
|
#define POINTING_DEVICE_RIGHT
|
||||||
|
|
|
@ -71,7 +71,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#define POINTING_DEVICE_CS_PIN B8
|
#define POINTING_DEVICE_CS_PIN B8
|
||||||
#define POINTING_DEVICE_ROTATION_270
|
#define POINTING_DEVICE_ROTATION_270
|
||||||
#undef ROTATIONAL_TRANSFORM_ANGLE
|
#undef ROTATIONAL_TRANSFORM_ANGLE
|
||||||
#define PMW33XX_SPI_DIVISOR 8
|
#define PMW33XX_SPI_DIVISOR 16
|
||||||
|
|
||||||
// lcd
|
// lcd
|
||||||
#define DISPLAY_RST_PIN NO_PIN
|
#define DISPLAY_RST_PIN NO_PIN
|
||||||
|
@ -82,5 +82,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#define DRV2605L_FB_ERM_LRA 0
|
#define DRV2605L_FB_ERM_LRA 0
|
||||||
#define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
|
#define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
|
||||||
#define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_BUZZ_1_100
|
#define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_BUZZ_1_100
|
||||||
|
|
||||||
#define VIA_FIRMWARE_VERSION 0x00000001
|
|
||||||
|
|
|
@ -40,7 +40,9 @@ bool check_user_button_state(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void board_init(void) {
|
void board_init(void) {
|
||||||
// unset improper SPI pins
|
// Board setup sets these pins as SPI, but we aren't using them as such.
|
||||||
|
// So to prevent them from misbehaving, we need to set them to a different, non-spi mode.
|
||||||
|
// This is a bit of a hack, but nothing else runs soon enough, without re-implementing spi_init().
|
||||||
gpio_set_pin_input(A5);
|
gpio_set_pin_input(A5);
|
||||||
gpio_set_pin_input(A6);
|
gpio_set_pin_input(A6);
|
||||||
gpio_set_pin_input(A7);
|
gpio_set_pin_input(A7);
|
||||||
|
|
|
@ -17,9 +17,17 @@
|
||||||
"diode_direction": "COL2ROW",
|
"diode_direction": "COL2ROW",
|
||||||
"encoder": {
|
"encoder": {
|
||||||
"rotary": [
|
"rotary": [
|
||||||
{"pin_a": "A15", "pin_b": "C0"}
|
{"pin_a": "C0", "pin_b": "A15"}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"eeprom": {
|
||||||
|
"driver": "wear_leveling",
|
||||||
|
"wear_leveling": {
|
||||||
|
"driver": "spi_flash",
|
||||||
|
"backing_size": 16384,
|
||||||
|
"logical_size": 4096
|
||||||
|
}
|
||||||
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"console": true,
|
"console": true,
|
||||||
"haptic": true
|
"haptic": true
|
||||||
|
@ -51,11 +59,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"usb": {
|
|
||||||
"shared_endpoint": {
|
|
||||||
"keyboard": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ws2812": {
|
"ws2812": {
|
||||||
"driver": "pwm",
|
"driver": "pwm",
|
||||||
"pin": "C6"
|
"pin": "C6"
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
MOUSE_SHARED_EP = yes
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
KEYBOARD_SHARED_EP = yes
|
|
||||||
MOUSE_SHARED_EP = yes
|
|
|
@ -0,0 +1 @@
|
||||||
|
POINTING_DEVICE_DRIVER = pmw3360
|
|
@ -18,18 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
/* 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 SPLIT_POINTING_ENABLE
|
#define SPLIT_POINTING_ENABLE
|
||||||
#define POINTING_DEVICE_TASK_THROTTLE_MS 1
|
#define POINTING_DEVICE_TASK_THROTTLE_MS 1
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
"manufacturer": "QMK Community",
|
"manufacturer": "QMK Community",
|
||||||
"maintainer": "Drashna Jael're",
|
"maintainer": "Drashna Jael're",
|
||||||
"usb": {
|
"usb": {
|
||||||
"vid": "0x44DD"
|
"vid": "0x44DD",
|
||||||
|
"shared_endpoint": {
|
||||||
|
"keyboard": true,
|
||||||
|
"mouse": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,112 +0,0 @@
|
||||||
/*
|
|
||||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
|
||||||
Copyright 2015 Jack Humbert
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
// mouse config
|
|
||||||
#ifdef MOUSEKEY_ENABLE
|
|
||||||
# ifndef MOUSEKEY_MOVE_DELTA
|
|
||||||
# ifndef MK_KINETIC_SPEED
|
|
||||||
# define MOUSEKEY_MOVE_DELTA 5
|
|
||||||
# else
|
|
||||||
# define MOUSEKEY_MOVE_DELTA 25
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_DELAY
|
|
||||||
# ifndef MK_KINETIC_SPEED
|
|
||||||
# define MOUSEKEY_DELAY 300
|
|
||||||
# else
|
|
||||||
# define MOUSEKEY_DELAY 8
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_INTERVAL
|
|
||||||
# ifndef MK_KINETIC_SPEED
|
|
||||||
# define MOUSEKEY_INTERVAL 50
|
|
||||||
# else
|
|
||||||
# define MOUSEKEY_INTERVAL 20
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_MAX_SPEED
|
|
||||||
# define MOUSEKEY_MAX_SPEED 7
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_TIME_TO_MAX
|
|
||||||
# define MOUSEKEY_TIME_TO_MAX 60
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_INITIAL_SPEED
|
|
||||||
# define MOUSEKEY_INITIAL_SPEED 100
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_BASE_SPEED
|
|
||||||
# define MOUSEKEY_BASE_SPEED 1000
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_DECELERATED_SPEED
|
|
||||||
# define MOUSEKEY_DECELERATED_SPEED 400
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_ACCELERATED_SPEED
|
|
||||||
# define MOUSEKEY_ACCELERATED_SPEED 3000
|
|
||||||
# endif
|
|
||||||
|
|
||||||
// mouse scroll config
|
|
||||||
# ifndef MOUSEKEY_WHEEL_DELAY
|
|
||||||
# define MOUSEKEY_WHEEL_DELAY 15
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_WHEEL_DELTA
|
|
||||||
# define MOUSEKEY_WHEEL_DELTA 1
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_WHEEL_INTERVAL
|
|
||||||
# define MOUSEKEY_WHEEL_INTERVAL 50
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_WHEEL_MAX_SPEED
|
|
||||||
# define MOUSEKEY_WHEEL_MAX_SPEED 8
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_WHEEL_TIME_TO_MAX
|
|
||||||
# define MOUSEKEY_WHEEL_TIME_TO_MAX 80
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifndef MOUSEKEY_WHEEL_INITIAL_MOVEMENTS
|
|
||||||
# define MOUSEKEY_WHEEL_INITIAL_MOVEMENTS 8
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_WHEEL_BASE_MOVEMENTS
|
|
||||||
# define MOUSEKEY_WHEEL_BASE_MOVEMENTS 48
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS
|
|
||||||
# define MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS 48
|
|
||||||
# endif
|
|
||||||
# ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS
|
|
||||||
# define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef DEBOUNCE
|
|
||||||
# define DEBOUNCE 5
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_LIMIT_VAL)
|
|
||||||
# if defined(OLED_ENABLE)
|
|
||||||
# define RGBLIGHT_LIMIT_VAL 100
|
|
||||||
# else
|
|
||||||
# define RGBLIGHT_LIMIT_VAL 150
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(OLED_BRIGHTNESS)
|
|
||||||
# if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
|
||||||
# define OLED_BRIGHTNESS 80
|
|
||||||
# else
|
|
||||||
# define OLED_BRIGHTNESS 150
|
|
||||||
# endif
|
|
||||||
#endif
|
|
|
@ -15,11 +15,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "tractyl_manuform.h"
|
#include "tractyl_manuform.h"
|
||||||
#include "keyboard.h"
|
|
||||||
#ifdef POINTING_DEVICE_ENABLE
|
#ifdef POINTING_DEVICE_ENABLE
|
||||||
#include "pointing_device.h"
|
# include "pointing_device.h"
|
||||||
#endif
|
#endif
|
||||||
#include "quantum.h"
|
|
||||||
#include "transactions.h"
|
#include "transactions.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -317,10 +315,6 @@ void eeconfig_init_kb(void) {
|
||||||
eeconfig_init_user();
|
eeconfig_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
|
||||||
read_charybdis_config_from_eeprom(&g_charybdis_config);
|
|
||||||
matrix_init_user();
|
|
||||||
}
|
|
||||||
void matrix_power_up(void) {
|
void matrix_power_up(void) {
|
||||||
pointing_device_task();
|
pointing_device_task();
|
||||||
}
|
}
|
||||||
|
@ -360,16 +354,21 @@ void keyboard_post_init_kb(void) {
|
||||||
|
|
||||||
void keyboard_pre_init_kb(void) {
|
void keyboard_pre_init_kb(void) {
|
||||||
user_button_init();
|
user_button_init();
|
||||||
|
read_charybdis_config_from_eeprom(&g_charybdis_config);
|
||||||
keyboard_pre_init_user();
|
keyboard_pre_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
void housekeeping_task_kb(void) {
|
__attribute__((weak)) void execute_user_button_action(void) {
|
||||||
if (check_user_button_state()) {
|
|
||||||
if (is_keyboard_master()) {
|
if (is_keyboard_master()) {
|
||||||
reset_keyboard();
|
reset_keyboard();
|
||||||
} else {
|
} else {
|
||||||
soft_reset_keyboard();
|
soft_reset_keyboard();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void housekeeping_task_kb(void) {
|
||||||
|
if (check_user_button_state()) {
|
||||||
|
execute_user_button_action();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POINTING_DEVICE_ENABLE
|
#ifdef POINTING_DEVICE_ENABLE
|
||||||
|
@ -401,16 +400,14 @@ void housekeeping_task_kb(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USER_BUTTON_PIN
|
#ifdef USER_BUTTON_PIN
|
||||||
__attribute__((weak)) void bootmagic_scan(void) {
|
/**
|
||||||
// We need multiple scans because debouncing can't be turned off.
|
* @brief Replace and add upon the default bootmagic reset function.
|
||||||
matrix_scan();
|
* In this case, we also check the user button.
|
||||||
# if defined(DEBOUNCE) && DEBOUNCE > 0
|
*
|
||||||
wait_ms(DEBOUNCE * 2);
|
* @return true if the user button is pressed, or normal bootmagic key position.
|
||||||
# else
|
* @return false if the user button is not pressed and normal bootmagic key position is not pressed.
|
||||||
wait_ms(30);
|
*/
|
||||||
# endif
|
__attribute__((weak)) bool bootmagic_should_reset(void) {
|
||||||
matrix_scan();
|
|
||||||
|
|
||||||
uint8_t row = BOOTMAGIC_ROW;
|
uint8_t row = BOOTMAGIC_ROW;
|
||||||
uint8_t col = BOOTMAGIC_COLUMN;
|
uint8_t col = BOOTMAGIC_COLUMN;
|
||||||
|
|
||||||
|
@ -421,10 +418,7 @@ __attribute__((weak)) void bootmagic_scan(void) {
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
if (matrix_get_row(row) & (1 << col) || (is_keyboard_master() && check_user_button_state())) {
|
return matrix_get_row(row) & (1 << col) || check_user_button_state();
|
||||||
eeconfig_disable();
|
|
||||||
bootloader_jump();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif // USER_BUTTON_PIN
|
#endif // USER_BUTTON_PIN
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue