This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[binaries] | |
c = 'riscv32-buildroot-linux-gnu-gcc' | |
strip = 'riscv32-buildroot-linux-gnu-strip' | |
pkgconfig = 'pkg-config' | |
[properties] | |
pkg_config_libdir = '@GLOBAL_SOURCE_ROOT@' / '../buildroot/output/host/riscv32-buildroot-linux-gnu/sysroot/usr/local/lib/pkgconfig' | |
sys_root = '@GLOBAL_SOURCE_ROOT@' / '../buildroot/output/host/riscv32-buildroot-linux-gnu/sysroot' | |
[host_machine] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/direct/os/linux/system.c b/lib/direct/os/linux/system.c | |
index fffc495b2..9d871da74 100644 | |
--- a/lib/direct/os/linux/system.c | |
+++ b/lib/direct/os/linux/system.c | |
@@ -1,3 +1,6 @@ | |
+#ifndef __NR_futex | |
+#define __NR_futex __NR_futex_time64 | |
+#endif | |
/* | |
This file is part of DirectFB. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stm32f4xx.h> | |
#include "sys_time.h" | |
#include "sys_time.h" | |
#include "i2c.h" | |
#define I2C_TIMEOUT_MS 50 | |
enum { | |
I2C_READ_MODE, | |
I2C_WRITE_MODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool ahrs_compass_quality_test(float *mag_new) | |
{ | |
//once the compass is detected as unstable, this flag will be trigger on for 1 seconds | |
static bool compass_is_stable = true; | |
static float last_failed_time = 0; | |
if(compass_is_stable == false) { | |
if((get_sys_time_s() - last_failed_time) > 0.5f) { | |
compass_is_stable = true; | |
} |