summaryrefslogtreecommitdiffstats
path: root/drivers/sensors/pmw3360.h
diff options
context:
space:
mode:
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);