forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request qmk#1 from wigingtont2/master
Add basic support for Pimoroni trackball and PMW33XX pointing devices.
- Loading branch information
Showing
4 changed files
with
101 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
#include_next <halconf.h> | ||
|
||
#if defined(POINTING_DEVICE_DRIVER) | ||
|
||
#if defined(POINTING_DEVICE_IS_PIMORONI) | ||
|
||
#undef HAL_USE_I2C | ||
#define HAL_USE_I2C TRUE | ||
|
||
#endif | ||
|
||
#if (defined(POINTING_DEVICE_IS_PMW3360) || defined(POINTING_DEVICE_IS_PMW3389)) | ||
|
||
#undef HAL_USE_SPI | ||
#define HAL_USE_SPI TRUE | ||
|
||
#undef SPI_USE_WAIT | ||
#define SPI_USE_WAIT TRUE | ||
|
||
#undef SPI_SELECT_MODE | ||
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD | ||
|
||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
|
||
#include_next "mcuconf.h" | ||
|
||
#if defined(POINTING_DEVICE_DRIVER) | ||
|
||
#if defined(POINTING_DEVICE_IS_PIMORONI) | ||
// TODO I2C0 does not work, for some reason. | ||
#undef RP_I2C_USE_I2C1 | ||
#define RP_I2C_USE_I2C1 TRUE | ||
|
||
#endif | ||
|
||
#if (defined(POINTING_DEVICE_IS_PMW3360) || defined(POINTING_DEVICE_IS_PMW3389)) | ||
|
||
#undef RP_SPI_USE_SPI0 | ||
#define RP_SPI_USE_SPI0 TRUE | ||
|
||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters