Redefine pmw3360_MAXCPI (as KEYBALL_PMW3360_MAXCPI)

This was previously defined in the custom driver. The
`keyball_set_cpi()` needs it (indirectly), so it has been redefined.
This commit is contained in:
James Young 2024-06-13 03:50:53 -07:00
parent 6451272edb
commit 6d9c10235f
No known key found for this signature in database
GPG Key ID: 87CBD151019773A8
2 changed files with 9 additions and 1 deletions

View File

@ -25,7 +25,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <string.h>
const uint8_t CPI_DEFAULT = KEYBALL_CPI_DEFAULT / 100;
const uint8_t CPI_MAX = pmw3360_MAXCPI + 1;
/**
* The Keyball library uses a range of 0 <= cpi <= 119 internally, and the true
* CPI value is ( cpi + 1 ) * 100.
*/
const uint8_t CPI_MAX = KEYBALL_PMW3360_MAXCPI + 1; // 119 + 1 = 12000 CPI actual
const uint8_t SCROLL_DIV_MAX = 7;
const uint16_t AML_TIMEOUT_MIN = 100;

View File

@ -49,6 +49,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define KEYBALL_SCROLLSNAP_TENSION_THRESHOLD 12
#endif
#ifndef KEYBALL_PMW3360_MAXCPI
# define KEYBALL_PMW3360_MAXCPI 119 // 12000 CPI actual
#endif
/// Specify SROM ID to be uploaded PMW3360DW (optical sensor). It will be
/// enabled high CPI setting or so. Valid valus are 0x04 or 0x81. Define this
/// in your config.h to be enable. Please note that using this option will