Updated PX4 use / API of low level GPIO and other hardware-centric system facilities

This commit is contained in:
Lorenz Meier
2016-05-28 14:56:17 +02:00
parent c2e2645c82
commit 7398164fcc
89 changed files with 1294 additions and 1087 deletions
+4 -4
View File
@@ -121,12 +121,12 @@ int test_time(int argc, char *argv[])
delta = 0;
for (unsigned i = 0; i < 100; i++) {
uint32_t flags = irqsave();
uint32_t flags = px4_enter_critical_section();
h = hrt_absolute_time();
c = cycletime();
irqrestore(flags);
px4_leave_critical_section(flags);
delta += h - c;
}
@@ -138,12 +138,12 @@ int test_time(int argc, char *argv[])
usleep(rand());
uint32_t flags = irqsave();
uint32_t flags = px4_enter_critical_section();
c = cycletime();
h = hrt_absolute_time();
irqrestore(flags);
px4_leave_critical_section(flags);
delta = abs(h - c);
deltadelta = abs(delta - lowdelta);