summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-12-15 21:41:42 +0000
committerQMK Bot <hello@qmk.fm>2021-12-15 21:41:42 +0000
commitb33ecce3928d9ce2b845132e121ec2cc30d293ff (patch)
treec2989d20edd8efd66356a7328c66d89502727896 /drivers
parent9d0b14500754eb8cb60a347f16f854f9d277604f (diff)
parentaed64aaef4724c01a30b1815c0c910ca8b1a5e43 (diff)
downloadqmk_firmware-b33ecce3928d9ce2b845132e121ec2cc30d293ff.tar.gz
qmk_firmware-b33ecce3928d9ce2b845132e121ec2cc30d293ff.zip
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'drivers')
-rw-r--r--drivers/sensors/cirque_pinnacle_spi.c5
-rw-r--r--drivers/sensors/pmw3360.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/sensors/cirque_pinnacle_spi.c b/drivers/sensors/cirque_pinnacle_spi.c
index f3eee88758..ed40abd9fa 100644
--- a/drivers/sensors/cirque_pinnacle_spi.c
+++ b/drivers/sensors/cirque_pinnacle_spi.c
@@ -15,7 +15,7 @@ extern bool touchpad_init;
void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) {
uint8_t cmdByte = READ_MASK | address; // Form the READ command byte
if (touchpad_init) {
- if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_TRACKPAD_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) {
+ if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_PINNACLE_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) {
spi_write(cmdByte);
spi_read(); // filler
spi_read(); // filler
@@ -27,7 +27,6 @@ void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) {
dprintf("error right touchpad\n");
#endif
touchpad_init = false;
- j
}
spi_stop();
}
@@ -38,7 +37,7 @@ void RAP_Write(uint8_t address, uint8_t data) {
uint8_t cmdByte = WRITE_MASK | address; // Form the WRITE command byte
if (touchpad_init) {
- if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_TRACKPAD_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) {
+ if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_PINNACLE_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) {
spi_write(cmdByte);
spi_write(data);
} else {
diff --git a/drivers/sensors/pmw3360.c b/drivers/sensors/pmw3360.c
index c378bdf750..78d9c3bc8b 100644
--- a/drivers/sensors/pmw3360.c
+++ b/drivers/sensors/pmw3360.c
@@ -143,7 +143,7 @@ void pmw3360_set_cpi(uint16_t cpi) {
uint16_t pmw3360_get_cpi(void) {
uint8_t cpival = spi_read_adv(REG_Config1);
- return (uint16_t)(cpival & 0xFF) * 100;
+ return (uint16_t)((cpival + 1) & 0xFF) * 100;
}
bool pmw3360_init(void) {