summaryrefslogtreecommitdiff
path: root/drivers/sensors/adns5050.c
diff options
context:
space:
mode:
authorzvecr <git@zvecr.com>2022-02-25 23:45:40 +0000
committerzvecr <git@zvecr.com>2022-02-25 23:45:40 +0000
commite7931289918221081cbe2a7ea5df27a5d86324db (patch)
tree0b06145520f8aaf5ff5cb928aa5176fc2dd23619 /drivers/sensors/adns5050.c
parentc0ee3d2c79388187883b1b1b1d1a0b6842acf741 (diff)
parentcf31355f08dca311a013168eb3eb995e2fc6a3d1 (diff)
Merge remote-tracking branch 'origin/develop'
Diffstat (limited to 'drivers/sensors/adns5050.c')
-rw-r--r--drivers/sensors/adns5050.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/sensors/adns5050.c b/drivers/sensors/adns5050.c
index c23d24d5af..b76268fba2 100644
--- a/drivers/sensors/adns5050.c
+++ b/drivers/sensors/adns5050.c
@@ -74,9 +74,13 @@ void adns5050_sync(void) {
writePinHigh(ADNS5050_CS_PIN);
}
-void adns5050_cs_select(void) { writePinLow(ADNS5050_CS_PIN); }
+void adns5050_cs_select(void) {
+ writePinLow(ADNS5050_CS_PIN);
+}
-void adns5050_cs_deselect(void) { writePinHigh(ADNS5050_CS_PIN); }
+void adns5050_cs_deselect(void) {
+ writePinHigh(ADNS5050_CS_PIN);
+}
uint8_t adns5050_serial_read(void) {
setPinInput(ADNS5050_SDIO_PIN);
@@ -190,7 +194,7 @@ int8_t convert_twoscomp(uint8_t data) {
// Don't forget to use the definitions for CPI in the header file.
void adns5050_set_cpi(uint16_t cpi) {
- uint8_t cpival = constrain((cpi / 125), 0x1, 0xD); // limits to 0--119
+ uint8_t cpival = constrain((cpi / 125), 0x1, 0xD); // limits to 0--119
adns5050_write_reg(REG_MOUSE_CONTROL2, 0b10000 | cpival);
}