summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/bbaserdem/rules.mk2
-rw-r--r--users/bcat/config.h2
-rw-r--r--users/bcat/rules.mk1
-rw-r--r--users/bocaj/config.h2
-rw-r--r--users/curry/config.h2
-rw-r--r--users/drashna/config.h2
-rw-r--r--users/drashna/drashna.h2
-rw-r--r--users/drashna/pimoroni_trackball.c151
-rw-r--r--users/drashna/pimoroni_trackball.h35
-rw-r--r--users/drashna/rules.mk2
-rw-r--r--users/dshields/rules.mk1
-rwxr-xr-xusers/ericgebhart/rules.mk1
-rw-r--r--users/romus/rules.mk2
-rw-r--r--users/spidey3/config.h4
-rw-r--r--users/tominabox1/config.h2
15 files changed, 9 insertions, 202 deletions
diff --git a/users/bbaserdem/rules.mk b/users/bbaserdem/rules.mk
index 94f01cdffc..8b9741cf93 100644
--- a/users/bbaserdem/rules.mk
+++ b/users/bbaserdem/rules.mk
@@ -16,8 +16,6 @@ SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested.
NKRO_ENABLE = no # Default is 6KRO which is plenty
MIDI_ENABLE = no # Untested feature
KEY_LOCK_ENABLE = no # Allows locking any key. Not used
-API_SYSEX_ENABLE = no # Allows OS to send signals.
-KEY_LOCK_ENABLE = no # Allows locking any key. Not used
# Disabling this makes it compile, i dont know why
# VARIABLE_TRACE = no # Allows debugging variables
diff --git a/users/bcat/config.h b/users/bcat/config.h
index 16188950e2..5bb93f3833 100644
--- a/users/bcat/config.h
+++ b/users/bcat/config.h
@@ -33,7 +33,7 @@
#if defined(RGB_MATRIX_ENABLE)
/* Turn off per-key RGB when the host goes to sleep. */
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true
+# define RGB_DISABLE_WHEN_USB_SUSPENDED
/* Keep per-key RGB increments consistent across keyboards. */
# undef RGB_MATRIX_HUE_STEP
diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk
index 3442a78ac2..d49c04a402 100644
--- a/users/bcat/rules.mk
+++ b/users/bcat/rules.mk
@@ -27,7 +27,6 @@ MIDI_ENABLE = no
SLEEP_LED_ENABLE = no
# Disable other unused options on all keyboards.
-API_SYSEX_ENABLE = no
AUTO_SHIFT_ENABLE = no
COMBO_ENABLE = no
KEYBOARD_LOCK_ENABLE = no
diff --git a/users/bocaj/config.h b/users/bocaj/config.h
index 2a44aabfc4..ecfb09c6f9 100644
--- a/users/bocaj/config.h
+++ b/users/bocaj/config.h
@@ -28,7 +28,7 @@
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
// # define EECONFIG_RGB_MATRIX (uint32_t *)16
diff --git a/users/curry/config.h b/users/curry/config.h
index b982dab038..e3c0a103ef 100644
--- a/users/curry/config.h
+++ b/users/curry/config.h
@@ -17,7 +17,7 @@
#if defined(RGB_MATRIX_ENABLE)
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true
+# define RGB_DISABLE_WHEN_USB_SUSPENDED
# define DISABLE_RGB_MATRIX_ALPHAS_MODS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 5f7c32ff35..7964856892 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -65,7 +65,7 @@
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
// # define EECONFIG_RGB_MATRIX (uint32_t *)16
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index e66f106574..e37c73bb28 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -33,7 +33,7 @@
# include "oled_stuff.h"
#endif
#if defined(PIMORONI_TRACKBALL_ENABLE)
-# include "pimoroni_trackball.h"
+# include "drivers/sensors/pimoroni_trackball.h"
#endif
/* Define layer names */
diff --git a/users/drashna/pimoroni_trackball.c b/users/drashna/pimoroni_trackball.c
deleted file mode 100644
index a6ca6c9966..0000000000
--- a/users/drashna/pimoroni_trackball.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
- *
- * 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/>.
- */
-
-#include "pimoroni_trackball.h"
-#include "i2c_master.h"
-
-static uint8_t scrolling = 0;
-static int16_t x_offset = 0;
-static int16_t y_offset = 0;
-static int16_t h_offset = 0;
-static int16_t v_offset = 0;
-static float precisionSpeed = 1;
-
-#ifndef I2C_TIMEOUT
-# define I2C_TIMEOUT 100
-#endif
-#ifndef MOUSE_DEBOUNCE
-# define MOUSE_DEBOUNCE 5
-#endif
-
-void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) {
- uint8_t data[] = {0x00, red, green, blue, white};
- i2c_transmit(TRACKBALL_ADDRESS << 1, data, sizeof(data), I2C_TIMEOUT);
-}
-
-int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) {
- int16_t offset = (int16_t)positive - (int16_t)negative;
- int16_t magnitude = (int16_t)(scale * offset * offset * precisionSpeed);
- return offset < 0 ? -magnitude : magnitude;
-}
-
-void update_member(int8_t* member, int16_t* offset) {
- if (*offset > 127) {
- *member = 127;
- *offset -= 127;
- } else if (*offset < -127) {
- *member = -127;
- *offset += 127;
- } else {
- *member = *offset;
- *offset = 0;
- }
-}
-
-__attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* mouse) {
- if (pressed) {
- mouse->buttons |= MOUSE_BTN1;
- } else {
- mouse->buttons &= ~MOUSE_BTN1;
- }
-}
-
-void trackball_register_button(bool pressed, enum mouse_buttons button) {
- report_mouse_t currentReport = pointing_device_get_report();
- if (pressed) {
- currentReport.buttons |= button;
- } else {
- currentReport.buttons &= ~button;
- }
- pointing_device_set_report(currentReport);
-}
-
-float trackball_get_precision(void) { return precisionSpeed; }
-void trackball_set_precision(float precision) { precisionSpeed = precision; }
-bool trackball_is_scrolling(void) { return scrolling; }
-void trackball_set_scrolling(bool scroll) { scrolling = scroll; }
-
-bool has_report_changed (report_mouse_t first, report_mouse_t second) {
- return !(
- (!first.buttons && first.buttons == second.buttons) &&
- (!first.x && first.x == second.x) &&
- (!first.y && first.y == second.y) &&
- (!first.h && first.h == second.h) &&
- (!first.v && first.v == second.v) );
-}
-
-
-__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x00, 0x00, 0x00, 0x4F); }
-
-void pointing_device_task(void) {
- static bool debounce;
- static uint16_t debounce_timer;
- uint8_t state[5] = {};
- if (i2c_readReg(TRACKBALL_ADDRESS << 1, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) {
- if (!state[4] && !debounce) {
- if (scrolling) {
-#ifdef PIMORONI_TRACKBALL_INVERT_X
- h_offset += mouse_offset(state[2], state[3], 1);
-#else
- h_offset -= mouse_offset(state[2], state[3], 1);
-#endif
-#ifdef PIMORONI_TRACKBALL_INVERT_Y
- v_offset += mouse_offset(state[1], state[0], 1);
-#else
- v_offset -= mouse_offset(state[1], state[0], 1);
-#endif
- } else {
-#ifdef PIMORONI_TRACKBALL_INVERT_X
- x_offset -= mouse_offset(state[2], state[3], 5);
-#else
- x_offset += mouse_offset(state[2], state[3], 5);
-#endif
-#ifdef PIMORONI_TRACKBALL_INVERT_Y
- y_offset -= mouse_offset(state[1], state[0], 5);
-#else
- y_offset += mouse_offset(state[1], state[0], 5);
-#endif
- }
- } else {
- if (state[4]) {
- debounce = true;
- debounce_timer = timer_read();
- }
- }
- }
-
- if (timer_elapsed(debounce_timer) > MOUSE_DEBOUNCE) debounce = false;
-
- report_mouse_t mouse = pointing_device_get_report();
-
- trackball_check_click(state[4] & (1 << 7), &mouse);
-
-#ifndef PIMORONI_TRACKBALL_ROTATE
- update_member(&mouse.x, &x_offset);
- update_member(&mouse.y, &y_offset);
- update_member(&mouse.h, &h_offset);
- update_member(&mouse.v, &v_offset);
-#else
- update_member(&mouse.x, &y_offset);
- update_member(&mouse.y, &x_offset);
- update_member(&mouse.h, &v_offset);
- update_member(&mouse.v, &h_offset);
-#endif
- pointing_device_set_report(mouse);
- if (has_report_changed(mouse, pointing_device_get_report())) {
- pointing_device_send();
- }
-}
diff --git a/users/drashna/pimoroni_trackball.h b/users/drashna/pimoroni_trackball.h
deleted file mode 100644
index a30fb0bb8c..0000000000
--- a/users/drashna/pimoroni_trackball.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
- *
- * 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
-
-#include "quantum.h"
-#include "pointing_device.h"
-
-#ifndef TRACKBALL_ADDRESS
-# define TRACKBALL_ADDRESS 0x0A
-#endif
-#define TRACKBALL_WRITE ((TRACKBALL_ADDRESS << 1) | I2C_WRITE)
-#define TRACKBALL_READ ((TRACKBALL_ADDRESS << 1) | I2C_READ)
-
-void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
-void trackball_check_click(bool pressed, report_mouse_t *mouse);
-void trackball_register_button(bool pressed, enum mouse_buttons button);
-
-float trackball_get_precision(void);
-void trackball_set_precision(float precision);
-bool trackball_is_scrolling(void);
-void trackball_set_scrolling(bool scroll);
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index b79051508b..fa4fb2420d 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -74,7 +74,7 @@ endif
ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
POINTING_DEVICE_ENABLE := yes
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
- SRC += pimoroni_trackball.c
+ SRC += drivers/sensors/pimoroni_trackball.c
QUANTUM_LIB_SRC += i2c_master.c
endif
diff --git a/users/dshields/rules.mk b/users/dshields/rules.mk
index 462649289b..00e18521be 100644
--- a/users/dshields/rules.mk
+++ b/users/dshields/rules.mk
@@ -5,7 +5,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration
CONSOLE_ENABLE = no # Console for debug(+400)
EXTRAKEY_ENABLE = no
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-API_SYSEX_ENABLE = no
SPACE_CADET_ENABLE = no
LEADER_ENABLE = no
DYNAMIC_MACRO_ENABLE = yes
diff --git a/users/ericgebhart/rules.mk b/users/ericgebhart/rules.mk
index 70017a5950..360abed948 100755
--- a/users/ericgebhart/rules.mk
+++ b/users/ericgebhart/rules.mk
@@ -12,4 +12,3 @@ CONSOLE_ENABLE = no # Console for debug
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
UNICODE_ENABLE = no
SLEEP_LED_ENABLE = no
-API_SYSEX_ENABLE = no
diff --git a/users/romus/rules.mk b/users/romus/rules.mk
index 12bbabb020..58f7ccf9c8 100644
--- a/users/romus/rules.mk
+++ b/users/romus/rules.mk
@@ -16,8 +16,6 @@ SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested.
NKRO_ENABLE = no # Default is 6KRO which is plenty
MIDI_ENABLE = no # Untested feature
KEY_LOCK_ENABLE = no # Allows locking any key. Not used
-API_SYSEX_ENABLE = no # Allows OS to send signals.
-
# Disabling this makes it compile, i dont know why
# VARIABLE_TRACE = no # Allows debugging variables
diff --git a/users/spidey3/config.h b/users/spidey3/config.h
index 7062fde030..f5f5e07f0f 100644
--- a/users/spidey3/config.h
+++ b/users/spidey3/config.h
@@ -1,7 +1,7 @@
#pragma once
-#define LED_DISABLE_WHEN_USB_SUSPENDED true
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define LED_DISABLE_WHEN_USB_SUSPENDED
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGBLIGHT_LAYERS
#define RGBLIGHT_MAX_LAYERS 17
#define RGBLIGHT_LAYER_BLINK
diff --git a/users/tominabox1/config.h b/users/tominabox1/config.h
index 2a8c1e943d..004f58ab53 100644
--- a/users/tominabox1/config.h
+++ b/users/tominabox1/config.h
@@ -31,7 +31,7 @@
// RGB_Matrix settings
#ifdef RGB_MATRIX_ENABLE
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
- #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+ #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
#define RGB_MATRIX_HUE_STEP 8