summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-03 21:16:37 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-03 21:16:37 +0100
commitaba9f51fef647046c7da46309b19e2315fb5b8d4 (patch)
treea777dcac110f77bb67e8289ec10f8671dfa9ceb5
parent6693e6c506522568857e26e70c2013d9fafa5f0f (diff)
downloadmicropython-aba9f51fef647046c7da46309b19e2315fb5b8d4.tar.gz
micropython-aba9f51fef647046c7da46309b19e2315fb5b8d4.zip
stmhal: #undef log2f if it's defined.
-rw-r--r--stmhal/math.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stmhal/math.c b/stmhal/math.c
index 534389df51..61ba7280ea 100644
--- a/stmhal/math.c
+++ b/stmhal/math.c
@@ -64,6 +64,10 @@ float sqrtf(float x) {
// TODO we need import these functions from some library (eg musl or newlib)
float powf(float x, float y) { return 0.0; }
float logf(float x) { return 0.0; }
+// some compilers define log2f in terms of logf
+#ifdef log2f
+#undef log2f
+#endif
float log2f(float x) { return 0.0; }
float log10f(float x) { return 0.0; }
float tanhf(float x) { return 0.0; }