summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/sensors/adns5050.h18
-rw-r--r--drivers/sensors/adns9800.h6
-rw-r--r--drivers/sensors/cirque_pinnacle.h6
-rw-r--r--drivers/sensors/paw3204.h12
-rw-r--r--drivers/sensors/pmw33xx_common.h8
5 files changed, 42 insertions, 8 deletions
diff --git a/drivers/sensors/adns5050.h b/drivers/sensors/adns5050.h
index e45a250196..f20c2f74bc 100644
--- a/drivers/sensors/adns5050.h
+++ b/drivers/sensors/adns5050.h
@@ -40,15 +40,27 @@
// Definitions for the ADNS serial line.
#ifndef ADNS5050_SCLK_PIN
-# error "No clock pin defined -- missing ADNS5050_SCLK_PIN"
+# ifdef POINTING_DEVICE_SCLK_PIN
+# define ADNS5050_SCLK_PIN POINTING_DEVICE_SCLK_PIN
+# else
+# error "No clock pin defined -- missing POINTING_DEVICE_SCLK_PIN or ADNS5050_SCLK_PIN"
+# endif
#endif
#ifndef ADNS5050_SDIO_PIN
-# error "No data pin defined -- missing ADNS5050_SDIO_PIN"
+# ifdef POINTING_DEVICE_SDIO_PIN
+# define ADNS5050_SDIO_PIN POINTING_DEVICE_SDIO_PIN
+# else
+# error "No data pin defined -- missing POINTING_DEVICE_SDIO_PIN or ADNS5050_SDIO_PIN"
+# endif
#endif
#ifndef ADNS5050_CS_PIN
-# error "No chip select pin defined -- missing ADNS5050_CS_PIN"
+# ifdef POINTING_DEVICE_CS_PIN
+# define ADNS5050_CS_PIN POINTING_DEVICE_CS_PIN
+# else
+# error "No chip select pin defined -- missing POINTING_DEVICE_CS_PIN or ADNS5050_CS_PIN define"
+# endif
#endif
typedef struct {
diff --git a/drivers/sensors/adns9800.h b/drivers/sensors/adns9800.h
index e75a869c03..3f1a005789 100644
--- a/drivers/sensors/adns9800.h
+++ b/drivers/sensors/adns9800.h
@@ -43,7 +43,11 @@
#endif
#ifndef ADNS9800_CS_PIN
-# error "No chip select pin defined -- missing ADNS9800_CS_PIN"
+# ifdef POINTING_DEVICE_CS_PIN
+# define ADNS9800_CS_PIN POINTING_DEVICE_CS_PIN
+# else
+# error "No chip select pin defined -- missing POINTING_DEVICE_CS_PIN or ADNS9800_CS_PIN"
+# endif
#endif
typedef struct {
diff --git a/drivers/sensors/cirque_pinnacle.h b/drivers/sensors/cirque_pinnacle.h
index 320e7d936e..fa06e047f2 100644
--- a/drivers/sensors/cirque_pinnacle.h
+++ b/drivers/sensors/cirque_pinnacle.h
@@ -78,7 +78,11 @@
# define CIRQUE_PINNACLE_SPI_DIVISOR 64
# endif
# ifndef CIRQUE_PINNACLE_SPI_CS_PIN
-# error "No Chip Select pin has been defined -- missing CIRQUE_PINNACLE_SPI_CS_PIN define"
+# ifdef POINTING_DEVICE_CS_PIN
+# define CIRQUE_PINNACLE_SPI_CS_PIN POINTING_DEVICE_CS_PIN
+# else
+# error "No Chip Select pin has been defined -- missing POINTING_DEVICE_CS_PIN or CIRQUE_PINNACLE_SPI_CS_PIN define"
+# endif
# endif
# endif
#endif
diff --git a/drivers/sensors/paw3204.h b/drivers/sensors/paw3204.h
index bf6dbd04a0..7f487d90dc 100644
--- a/drivers/sensors/paw3204.h
+++ b/drivers/sensors/paw3204.h
@@ -20,10 +20,18 @@
#include <stdbool.h>
#ifndef PAW3204_SCLK_PIN
-# error "No clock pin defined -- missing PAW3204_SCLK_PIN"
+# ifdef POINTING_DEVICE_SCLK_PIN
+# define PAW3204_SCLK_PIN POINTING_DEVICE_SCLK_PIN
+# else
+# error "No clock pin defined -- missing POINTING_DEVICE_SCLK_PIN or PAW3204_SCLK_PIN"
+# endif
#endif
#ifndef PAW3204_SDIO_PIN
-# error "No data pin defined -- missing PAW3204_SDIO_PIN"
+# ifdef POINTING_DEVICE_SDIO_PIN
+# define PAW3204_SDIO_PIN POINTING_DEVICE_SDIO_PIN
+# else
+# error "No data pin defined -- missing POINTING_DEVICE_SDIO_PIN or PAW3204_SDIO_PIN"
+# endif
#endif
typedef struct {
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 }