Lines Matching full:iis2mdc
85 static void iis2mdc_config(const struct device *iis2mdc) in iis2mdc_config() argument
89 /* set IIS2MDC sampling frequency to 100 Hz */ in iis2mdc_config()
93 if (sensor_attr_set(iis2mdc, SENSOR_CHAN_ALL, in iis2mdc_config()
95 printk("Cannot set sampling frequency for IIS2MDC\n"); in iis2mdc_config()
104 sensor_trigger_set(iis2mdc, &trig, iis2mdc_trigger_handler); in iis2mdc_config()
171 const struct device *const iis2mdc = DEVICE_DT_GET_ONE(st_iis2mdc); in main() local
179 if (!device_is_ready(iis2mdc)) { in main()
180 printk("%s: device not ready.\n", iis2mdc->name); in main()
189 iis2mdc_config(iis2mdc); in main()
202 if (sensor_sample_fetch(iis2mdc) < 0) { in main()
203 printf("IIS2MDC Magn Sensor sample update error\n"); in main()
217 sensor_channel_get(iis2mdc, SENSOR_CHAN_MAGN_XYZ, magn); in main()
218 sensor_channel_get(iis2mdc, SENSOR_CHAN_DIE_TEMP, &die_temp2); in main()
234 /* iis2mdc */ in main()
235 printf("IIS2MDC: Magn (gauss): x: %.3f, y: %.3f, z: %.3f\n", in main()
240 printf("IIS2MDC: Temperature: %.1f C\n", in main()
257 printk("%d:: iis2mdc trig %d\n", cnt, iis2mdc_trig_cnt); in main()