summaryrefslogtreecommitdiff
path: root/driver/als_opt3001.h
diff options
context:
space:
mode:
Diffstat (limited to 'driver/als_opt3001.h')
-rw-r--r--driver/als_opt3001.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/driver/als_opt3001.h b/driver/als_opt3001.h
index eeb05f3a10..d2d2737e20 100644
--- a/driver/als_opt3001.h
+++ b/driver/als_opt3001.h
@@ -39,6 +39,9 @@ enum opt3001_mode {
/* Min and Max sampling frequency in mHz */
#define OPT3001_LIGHT_MIN_FREQ 1250
#define OPT3001_LIGHT_MAX_FREQ 10000
+#if (CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ <= OPT3001_LIGHT_MAX_FREQ)
+#error "EC too slow for light sensor"
+#endif
#ifdef HAS_TASK_ALS
int opt3001_init(void);