From ccdba43e59fc42c9a91373c65eaa4a026539dc80 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 12 Aug 2022 16:22:34 -0700 Subject: Create generic Pointing Device Pin defines (#17776) --- drivers/sensors/pmw33xx_common.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers/sensors/pmw33xx_common.h') 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 } -- cgit v1.2.3