Lines Matching refs:mpu
80 } mpu;
184 dptr = (char**)&mpu;
194 // get proper (in absolute/relative) IIO path & build MPU's sysfs paths
197 sprintf(mpu.name, "%s%s", sysfs_path, "/name");
198 sprintf(mpu.enable, "%s%s", sysfs_path, "/buffer/enable");
199 sprintf(mpu.power_state, "%s%s", sysfs_path, "/power_state");
200 sprintf(mpu.dmp_on,"%s%s", sysfs_path, "/dmp_on");
201 sprintf(mpu.dmp_int_on, "%s%s", sysfs_path, "/dmp_int_on");
202 sprintf(mpu.dmp_firmware, "%s%s", sysfs_path, "/dmp_firmware");
203 sprintf(mpu.firmware_loaded, "%s%s", sysfs_path, "/firmware_loaded");
206 sprintf(mpu.event_display_orientation, "%s%s",
208 sprintf(mpu.display_orientation_on, "%s%s",
212 sprintf(mpu.event_orientation, "%s%s", sysfs_path, "/event_orientation");
213 sprintf(mpu.orientation_on, "%s%s", sysfs_path, "/orientation_on");
216 sprintf(mpu.event_tap, "%s%s", sysfs_path, "/event_tap");
217 sprintf(mpu.tap_min_count, "%s%s", sysfs_path, "/tap_min_count");
218 sprintf(mpu.tap_on, "%s%s", sysfs_path, "/tap_on");
219 sprintf(mpu.tap_threshold, "%s%s", sysfs_path, "/tap_threshold");
220 sprintf(mpu.tap_time, "%s%s", sysfs_path, "/tap_time");
223 sprintf(mpu.pedometer_on, "%s%s", sysfs_path, "/dmp_on");
224 sprintf(mpu.pedometer_steps, "%s%s", sysfs_path, "/pedometer_steps");
225 sprintf(mpu.pedometer_time, "%s%s", sysfs_path, "/pedometer_time");
228 sprintf(mpu.event_smd, "%s%s", sysfs_path, "/event_smd");
229 sprintf(mpu.smd_enable, "%s%s", sysfs_path, "/smd_enable");
230 sprintf(mpu.smd_threshold, "%s%s", sysfs_path, "/smd_threshold");
231 sprintf(mpu.smd_delay_threshold, "%s%s",
233 sprintf(mpu.smd_delay_threshold2, "%s%s",
239 dptr = (char**)&mpu;
250 if (read_sysfs_int(mpu.firmware_loaded, &fw_loaded) < 0)
260 fp= fopen(mpu.name, "r");
279 if (write_sysfs_int(mpu.enable, en) < 0) {
289 if (write_sysfs_int(mpu.tap_on, en) < 0) {
302 if (write_sysfs_int(mpu.pedometer_on, en) < 0) {
315 if (write_sysfs_int(mpu.display_orientation_on, en) < 0) {
327 if (write_sysfs_int(mpu.orientation_on, en) < 0) {
339 if (write_sysfs_int(mpu.smd_enable, en) < 0) {
356 fp = fopen(mpu.event_tap, "rt");
412 fp = fopen(mpu.pedometer_steps, "rt");
416 fp = fopen(mpu.pedometer_time, "rt");
451 fp = fopen(mpu.event_display_orientation, "rt");
453 printf("GT:Cannot open '%s'\n", mpu.event_display_orientation);
471 fp = fopen(mpu.event_orientation, "rt");
504 fp = fopen(mpu.event_smd, "rt");
571 pfd[i].fd = open(mpu.event_tap, O_RDONLY | O_NONBLOCK);
576 pfd[i].fd = open(mpu.event_display_orientation,
582 pfd[i].fd = open(mpu.event_orientation, O_RDONLY | O_NONBLOCK);
587 pfd[i].fd = open(mpu.event_smd, O_RDONLY | O_NONBLOCK);