Skip to content

Commit 504006c

Browse files
committed
samples/x_nucleo_iks4a1: add lsm6dso16is ISPU example
Add lsm6dso16is ISPU example. Signed-off-by: Armando Visconti <[email protected]>
1 parent d7fa1ed commit 504006c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

samples/shields/x_nucleo_iks4a1/standard/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CONFIG_LIS2MDL_TRIGGER_OWN_THREAD=y
77
CONFIG_LPS2XDF_TRIGGER_OWN_THREAD=y
88
CONFIG_LSM6DSO16IS_TRIGGER_NONE=y
99
CONFIG_LSM6DSO16IS_ENABLE_TEMP=y
10+
CONFIG_LSM6DSO16IS_ISPU_ENABLE=y
1011
CONFIG_LSM6DSV16X_TRIGGER_OWN_THREAD=y
1112
CONFIG_LSM6DSV16X_ENABLE_TEMP=y
1213
CONFIG_LIS2DUX12_TRIGGER_OWN_THREAD=y

samples/shields/x_nucleo_iks4a1/standard/src/main.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,19 @@ static void lis2mdl_config(const struct device *lis2mdl)
8888
#endif
8989
}
9090

91+
#include "norm.h"
92+
9193
static void lsm6dso16is_config(const struct device *lsm6dso16is)
9294
{
9395
struct sensor_value odr_attr, fs_attr, mode_attr;
9496

97+
/* upload norm ISPU example */
98+
if (sensor_upload_fw(lsm6dso16is, ispu_conf_conf_0,
99+
(sizeof(ispu_conf_conf_0) / sizeof(struct mems_conf_op))) < 0) {
100+
printk("Cannot upload ISPU\n");
101+
return;
102+
}
103+
95104
mode_attr.val1 = 0; /* HP */
96105

97106
if (sensor_attr_set(lsm6dso16is, SENSOR_CHAN_ACCEL_XYZ,

0 commit comments

Comments
 (0)