aboutsummaryrefslogtreecommitdiff
path: root/users/drashna/pimoroni_trackball.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/drashna/pimoroni_trackball.c')
-rw-r--r--users/drashna/pimoroni_trackball.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/users/drashna/pimoroni_trackball.c b/users/drashna/pimoroni_trackball.c
index 9ae094c05..a6ca6c996 100644
--- a/users/drashna/pimoroni_trackball.c
+++ b/users/drashna/pimoroni_trackball.c
@@ -33,7 +33,7 @@ static float precisionSpeed = 1;
33 33
34void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) { 34void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) {
35 uint8_t data[] = {0x00, red, green, blue, white}; 35 uint8_t data[] = {0x00, red, green, blue, white};
36 i2c_transmit(TRACKBALL_WRITE, data, sizeof(data), I2C_TIMEOUT); 36 i2c_transmit(TRACKBALL_ADDRESS << 1, data, sizeof(data), I2C_TIMEOUT);
37} 37}
38 38
39int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) { 39int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) {
@@ -94,7 +94,7 @@ void pointing_device_task(void) {
94 static bool debounce; 94 static bool debounce;
95 static uint16_t debounce_timer; 95 static uint16_t debounce_timer;
96 uint8_t state[5] = {}; 96 uint8_t state[5] = {};
97 if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) { 97 if (i2c_readReg(TRACKBALL_ADDRESS << 1, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) {
98 if (!state[4] && !debounce) { 98 if (!state[4] && !debounce) {
99 if (scrolling) { 99 if (scrolling) {
100#ifdef PIMORONI_TRACKBALL_INVERT_X 100#ifdef PIMORONI_TRACKBALL_INVERT_X