Skip to content

Commit

Permalink
fixed trackball, switched from SPI1 to SPI0, as it works with shift r…
Browse files Browse the repository at this point in the history
…egister and trackball
  • Loading branch information
sadekbaroudi committed Sep 22, 2022
1 parent c9ed1f7 commit 6b0c70e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
19 changes: 14 additions & 5 deletions keyboards/fingerpunch/ximi/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PMW33XX_CS_PIN GP26
#define PMW33XX_CPI 800
#define PMW33XX_CS_DIVISOR 8 // needs to be the same as the SHIFTREG_DIVISOR above
// #define POINTING_DEVICE_INVERT_Y // move to trackball specific config
#define POINTING_DEVICE_INVERT_X // move to trackball specific config

/* SPI config for pmw3360 sensor. */
#define SPI_DRIVER SPID1
#define SPI_SCK_PAL_MODE 5
#define SPI_MOSI_PAL_MODE 5
#define SPI_DRIVER SPID0
// #define SPI_SCK_PAL_MODE 5 // already defined in chibios
// #define SPI_MOSI_PAL_MODE 5 // already defined in chibios
#define SPI_MISO_PIN GP4
#define SPI_MISO_PAL_MODE 5
// #define SPI_MISO_PAL_MODE 5 // already defined in chibios
#ifdef FP_TRACKBALL_BOTH
#define POINTING_DEVICE_COMBINED
#endif
#ifdef FP_TRACKBALL_LEFT
#define POINTING_DEVICE_LEFT
#endif
#ifdef FP_TRACKBALL_RIGHT
#define POINTING_DEVICE_RIGHT
#endif
#endif
4 changes: 2 additions & 2 deletions keyboards/fingerpunch/ximi/mcuconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#include_next "mcuconf.h"

#undef RP_SPI_USE_SPI1
#define RP_SPI_USE_SPI1 TRUE
#undef RP_SPI_USE_SPI0
#define RP_SPI_USE_SPI0 TRUE

#undef RP_I2C_USE_I2C1
#define RP_I2C_USE_I2C1 TRUE
2 changes: 1 addition & 1 deletion users/sadekbaroudi/pointing_stuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ void pointing_device_set_cpi_combined_defaults(void) {
pointing_device_set_cpi_on_side(true, 50); //Set cpi on left side to a low value for slower scrolling.
pointing_device_set_cpi_on_side(false, 2000); //Set cpi on right side to a reasonable value for mousing.
}
#endif
#endif

0 comments on commit 6b0c70e

Please sign in to comment.