Lines Matching refs:bmg160

24 static void print_gyro_data(const struct device *bmg160)  in print_gyro_data()  argument
28 if (sensor_channel_get(bmg160, SENSOR_CHAN_GYRO_XYZ, val) < 0) { in print_gyro_data()
39 static void print_temp_data(const struct device *bmg160) in print_temp_data() argument
43 if (sensor_channel_get(bmg160, SENSOR_CHAN_DIE_TEMP, &val) < 0) { in print_temp_data()
52 static void test_polling_mode(const struct device *bmg160) in test_polling_mode() argument
57 if (sensor_sample_fetch(bmg160) < 0) { in test_polling_mode()
61 print_gyro_data(bmg160); in test_polling_mode()
63 print_temp_data(bmg160); in test_polling_mode()
72 static void trigger_handler(const struct device *bmg160, in trigger_handler() argument
81 if (sensor_sample_fetch(bmg160) < 0) { in trigger_handler()
85 print_gyro_data(bmg160); in trigger_handler()
88 static void test_trigger_mode(const struct device *bmg160) in test_trigger_mode() argument
105 if (sensor_attr_set(bmg160, SENSOR_CHAN_GYRO_XYZ, in test_trigger_mode()
115 if (sensor_attr_set(bmg160, SENSOR_CHAN_GYRO_XYZ, in test_trigger_mode()
121 if (sensor_trigger_set(bmg160, &trig, trigger_handler) < 0) { in test_trigger_mode()
132 if (sensor_trigger_set(bmg160, &trig, NULL) < 0) { in test_trigger_mode()
144 if (sensor_attr_set(bmg160, SENSOR_CHAN_GYRO_XYZ, in test_trigger_mode()
153 if (sensor_trigger_set(bmg160, &trig, trigger_handler) < 0) { in test_trigger_mode()
165 if (sensor_trigger_set(bmg160, &trig, NULL) < 0) { in test_trigger_mode()
175 const struct device *const bmg160 = DEVICE_DT_GET_ANY(bosch_bmg160); in main() local
180 if (!device_is_ready(bmg160)) { in main()
181 printf("Device %s is not ready.\n", bmg160->name); in main()
192 if (sensor_attr_set(bmg160, SENSOR_CHAN_GYRO_XYZ, in main()
200 test_polling_mode(bmg160); in main()
204 test_trigger_mode(bmg160); in main()