diff options
author | Drashna Jaelre <[email protected]> | 2022-08-12 16:22:34 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2022-08-12 16:22:34 -0700 |
commit | ccdba43e59fc42c9a91373c65eaa4a026539dc80 (patch) | |
tree | b6d977bcc6f86906f9c80b0cb98ea919877abca3 /drivers/sensors/pmw33xx_common.h | |
parent | 83f6aedd93da04a7bccaa649df6092889b099c04 (diff) | |
download | qmk_firmware-ccdba43e59fc42c9a91373c65eaa4a026539dc80.tar.gz qmk_firmware-ccdba43e59fc42c9a91373c65eaa4a026539dc80.zip |
Create generic Pointing Device Pin defines (#17776)
Diffstat (limited to 'drivers/sensors/pmw33xx_common.h')
-rw-r--r-- | drivers/sensors/pmw33xx_common.h | 8 |
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 } |