summaryrefslogtreecommitdiff
path: root/drivers/sensors/pmw33xx_common.h
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2022-08-12 16:22:34 -0700
committerGitHub <noreply@github.com>2022-08-12 16:22:34 -0700
commitccdba43e59fc42c9a91373c65eaa4a026539dc80 (patch)
treeb6d977bcc6f86906f9c80b0cb98ea919877abca3 /drivers/sensors/pmw33xx_common.h
parent83f6aedd93da04a7bccaa649df6092889b099c04 (diff)
Create generic Pointing Device Pin defines (#17776)
Diffstat (limited to 'drivers/sensors/pmw33xx_common.h')
-rw-r--r--drivers/sensors/pmw33xx_common.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/sensors/pmw33xx_common.h b/drivers/sensors/pmw33xx_common.h
index 87e8b34d5c..c725e80f24 100644
--- a/drivers/sensors/pmw33xx_common.h
+++ b/drivers/sensors/pmw33xx_common.h
@@ -66,7 +66,13 @@ _Static_assert(sizeof((pmw33xx_report_t){0}.motion) == 1, "pmw33xx_report_t.moti
// Support single and plural spellings
#ifndef PMW33XX_CS_PINS
# ifndef PMW33XX_CS_PIN
-# error "No chip select pin defined -- missing PMW33XX_CS_PIN or PMW33XX_CS_PINS"
+# ifdef POINTING_DEVICE_CS_PIN
+# define PMW33XX_CS_PIN POINTING_DEVICE_CS_PIN
+# define PMW33XX_CS_PINS \
+ { PMW33XX_CS_PIN }
+# else
+# error "No chip select pin defined -- missing PMW33XX_CS_PIN or PMW33XX_CS_PINS"
+# endif
# else
# define PMW33XX_CS_PINS \
{ PMW33XX_CS_PIN }