mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-20 10:31:35 +08:00
Linux: Added config and stubs to compile I2C device for Linux
Not yet functional. Full implementation will provide an IOCTL interface to do bi-directional transfer. will model the interface after Linux. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -53,14 +53,14 @@ int HRTTest::main()
|
||||
hrt_abstime t = hrt_absolute_time();
|
||||
usleep(1000000);
|
||||
hrt_abstime elt = hrt_elapsed_time(&t);
|
||||
printf("Elapsed time %llu in 1 sec (usleep)\n", elt);
|
||||
printf("Start time %llu\n", t);
|
||||
printf("Elapsed time %lu in 1 sec (usleep)\n", elt);
|
||||
printf("Start time %lu\n", t);
|
||||
|
||||
t = hrt_absolute_time();
|
||||
sleep(1);
|
||||
elt = hrt_elapsed_time(&t);
|
||||
printf("Elapsed time %llu in 1 sec (sleep)\n", elt);
|
||||
printf("Start time %llu\n", t);
|
||||
printf("Elapsed time %lu in 1 sec (sleep)\n", elt);
|
||||
printf("Start time %lu\n", t);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user