fixed trackball, switched from SPI1 to SPI0, as it works with shift register and trackball

This commit is contained in:
Sadek Baroudi 2022-09-21 21:49:29 -07:00
parent c9ed1f7c8b
commit 6b0c70ebe2
3 changed files with 17 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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