summaryrefslogtreecommitdiffstats
path: root/drivers/sensors/pmw3360.h
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2022-05-29 07:57:11 +1000
committerNick Brassel <nick@tzarc.org>2022-05-29 07:57:11 +1000
commitb835171008eaeaa992a1b8e390af8bce6f5f0b8f (patch)
treede22c239cc47556f8be7538f95f48ad75b86d110 /drivers/sensors/pmw3360.h
parentf5d091a9d58c8349437e9d52de87294258cbd256 (diff)
parent0c8f78020d01ee5c45481d7d93b9b0d9f7b95103 (diff)
Merge branch 'develop' -- breaking changes 2022-05-28.
Diffstat (limited to 'drivers/sensors/pmw3360.h')
-rw-r--r--drivers/sensors/pmw3360.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/sensors/pmw3360.h b/drivers/sensors/pmw3360.h
index eec7295871..3aa8ed0ed8 100644
--- a/drivers/sensors/pmw3360.h
+++ b/drivers/sensors/pmw3360.h
@@ -52,8 +52,14 @@
# define ROTATIONAL_TRANSFORM_ANGLE 0x00
#endif
-#ifndef PMW3360_CS_PIN
-# error "No chip select pin defined -- missing PMW3360_CS_PIN"
+// Support single and plural spellings
+#ifndef PMW3360_CS_PINS
+# ifndef PMW3360_CS_PIN
+# error "No chip select pin defined -- missing PMW3360_CS_PIN or PMW3360_CS_PINS"
+# else
+# define PMW3360_CS_PINS \
+ { PMW3360_CS_PIN }
+# endif
#endif
typedef struct {
@@ -66,10 +72,8 @@ typedef struct {
int8_t mdy;
} report_pmw3360_t;
-bool pmw3360_init(void);
-void pmw3360_upload_firmware(void);
-bool pmw3360_check_signature(void);
+bool pmw3360_init(int8_t index);
uint16_t pmw3360_get_cpi(void);
void pmw3360_set_cpi(uint16_t cpi);
/* Reads and clears the current delta values on the sensor */
-report_pmw3360_t pmw3360_read_burst(void);
+report_pmw3360_t pmw3360_read_burst(int8_t index);