diff --git a/drivers/sensors/Kconfig b/drivers/sensors/Kconfig index f61fd54810..365f2a8a99 100644 --- a/drivers/sensors/Kconfig +++ b/drivers/sensors/Kconfig @@ -1659,6 +1659,13 @@ config SENSORS_LIS2MDL_THREAD_STACKSIZE ---help--- The stack size for the worker thread that performs measurements +config SENSORS_LIS2MDL_ORB_BUFSIZE + int "LIS2MDL uORB buffer size" + default 10 + range 0 100 + ---help--- + The size of the uORB circular buffer for storing measurements. + config SENSORS_LIS2MDL_FETCH bool "Enable LIS2MDL fetch capability" default n diff --git a/drivers/sensors/lis2mdl_uorb.c b/drivers/sensors/lis2mdl_uorb.c index 7d22719c71..98c9407f36 100644 --- a/drivers/sensors/lis2mdl_uorb.c +++ b/drivers/sensors/lis2mdl_uorb.c @@ -1307,6 +1307,7 @@ int lis2mdl_register(FAR struct i2c_master_s *i2c, int devno, uint8_t addr, priv->lower.ops = &g_sensor_ops; priv->lower.type = SENSOR_TYPE_MAGNETIC_FIELD; + priv->lower.nbuffer = CONFIG_SENSORS_LIS2MDL_ORB_BUFSIZE; priv->enabled = false; priv->lowpower = false; priv->offsets = false;