Lines Matching full:ism330dhcx

108 static void ism330dhcx_config(const struct device *ism330dhcx)  in ism330dhcx_config()  argument
112 /* set ISM330DHCX sampling frequency to 416 Hz */ in ism330dhcx_config()
116 if (sensor_attr_set(ism330dhcx, SENSOR_CHAN_ACCEL_XYZ, in ism330dhcx_config()
118 printk("Cannot set sampling frequency for ISM330DHCX accel\n"); in ism330dhcx_config()
124 if (sensor_attr_set(ism330dhcx, SENSOR_CHAN_ACCEL_XYZ, in ism330dhcx_config()
126 printk("Cannot set sampling frequency for ISM330DHCX accel\n"); in ism330dhcx_config()
130 /* set ISM330DHCX gyro sampling frequency to 208 Hz */ in ism330dhcx_config()
134 if (sensor_attr_set(ism330dhcx, SENSOR_CHAN_GYRO_XYZ, in ism330dhcx_config()
136 printk("Cannot set sampling frequency for ISM330DHCX gyro\n"); in ism330dhcx_config()
142 if (sensor_attr_set(ism330dhcx, SENSOR_CHAN_GYRO_XYZ, in ism330dhcx_config()
144 printk("Cannot set fs for ISM330DHCX gyro\n"); in ism330dhcx_config()
153 sensor_trigger_set(ism330dhcx, &trig, ism330dhcx_acc_trigger_handler); in ism330dhcx_config()
157 sensor_trigger_set(ism330dhcx, &trig, ism330dhcx_gyr_trigger_handler); in ism330dhcx_config()
172 const struct device *const ism330dhcx = DEVICE_DT_GET_ONE(st_ism330dhcx); in main() local
183 if (!device_is_ready(ism330dhcx)) { in main()
184 printk("%s: device not ready.\n", ism330dhcx->name); in main()
190 ism330dhcx_config(ism330dhcx); in main()
208 if (sensor_sample_fetch(ism330dhcx) < 0) { in main()
209 printf("ISM330DHCX IMU Sensor sample update error\n"); in main()
219 sensor_channel_get(ism330dhcx, SENSOR_CHAN_ACCEL_XYZ, accel1); in main()
220 sensor_channel_get(ism330dhcx, SENSOR_CHAN_GYRO_XYZ, gyro); in main()
243 printf("ISM330DHCX: Accel (m.s-2): x: %.3f, y: %.3f, z: %.3f\n", in main()
248 printf("ISM330DHCX: GYro (dps): x: %.3f, y: %.3f, z: %.3f\n", in main()
261 printk("%d:: ism330dhcx acc trig %d\n", cnt, ism330dhcx_acc_trig_cnt); in main()
262 printk("%d:: ism330dhcx gyr trig %d\n", cnt, ism330dhcx_gyr_trig_cnt); in main()