|
|
@ -1770,6 +1770,8 @@ start() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
close(fd); |
|
|
|
|
|
|
|
close(fd_mag); |
|
|
|
|
|
|
|
|
|
|
|
exit(0); |
|
|
|
exit(0); |
|
|
|
fail: |
|
|
|
fail: |
|
|
@ -1851,6 +1853,9 @@ test() |
|
|
|
|
|
|
|
|
|
|
|
/* XXX add poll-rate tests here too */ |
|
|
|
/* XXX add poll-rate tests here too */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
close(fd_accel); |
|
|
|
|
|
|
|
close(fd_mag); |
|
|
|
|
|
|
|
|
|
|
|
reset(); |
|
|
|
reset(); |
|
|
|
errx(0, "PASS"); |
|
|
|
errx(0, "PASS"); |
|
|
|
} |
|
|
|
} |
|
|
@ -1872,6 +1877,8 @@ reset() |
|
|
|
if (ioctl(fd, SENSORIOCSPOLLRATE, SENSOR_POLLRATE_DEFAULT) < 0) |
|
|
|
if (ioctl(fd, SENSORIOCSPOLLRATE, SENSOR_POLLRATE_DEFAULT) < 0) |
|
|
|
err(1, "accel pollrate reset failed"); |
|
|
|
err(1, "accel pollrate reset failed"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
close(fd); |
|
|
|
|
|
|
|
|
|
|
|
fd = open(LSM303D_DEVICE_PATH_MAG, O_RDONLY); |
|
|
|
fd = open(LSM303D_DEVICE_PATH_MAG, O_RDONLY); |
|
|
|
|
|
|
|
|
|
|
|
if (fd < 0) { |
|
|
|
if (fd < 0) { |
|
|
@ -1882,6 +1889,8 @@ reset() |
|
|
|
err(1, "mag pollrate reset failed"); |
|
|
|
err(1, "mag pollrate reset failed"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
close(fd); |
|
|
|
|
|
|
|
|
|
|
|
exit(0); |
|
|
|
exit(0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|