summaryrefslogtreecommitdiff
path: root/drivers/sensors/pmw33xx_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sensors/pmw33xx_common.h')
-rw-r--r--drivers/sensors/pmw33xx_common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/sensors/pmw33xx_common.h b/drivers/sensors/pmw33xx_common.h
index 181bea3d43..eab8518baa 100644
--- a/drivers/sensors/pmw33xx_common.h
+++ b/drivers/sensors/pmw33xx_common.h
@@ -1,3 +1,4 @@
+// Copyright 2022 Daniel Kao (dkao)
// Copyright 2022 Stefan Kerkmann (KarlK90)
// Copyright 2022 Ulrich Spörlein (@uqs)
// Copyright 2021 Alabastard (@Alabastard-64)
@@ -58,6 +59,10 @@ _Static_assert(sizeof((pmw33xx_report_t){0}.motion) == 1, "pmw33xx_report_t.moti
# define ROTATIONAL_TRANSFORM_ANGLE 0x00
#endif
+#if ROTATIONAL_TRANSFORM_ANGLE > 30 || ROTATIONAL_TRANSFORM_ANGLE < (-30)
+# error ROTATIONAL_TRANSFORM_ANGLE has to be in the range of +/- 30 for all PMW33XX sensors.
+#endif
+
// Support single and plural spellings
#ifndef PMW33XX_CS_PINS
# ifndef PMW33XX_CS_PIN