From 1a7d45b9130251119874df8b15424ec41306d8f2 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Wed, 10 Mar 2021 19:42:18 -0500 Subject: support H7 and L4; use second ADC for input --- source/cordic.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'source/cordic.cpp') diff --git a/source/cordic.cpp b/source/cordic.cpp index 4852563..d2997f2 100644 --- a/source/cordic.cpp +++ b/source/cordic.cpp @@ -1,7 +1,8 @@ #include "cordic.hpp" #include "hal.h" -namespace math { +namespace cordic { +#if !defined(TARGET_PLATFORM_L4) void init() { @@ -92,11 +93,16 @@ double tan(double x) { return tanx; } -__attribute__((naked)) -double sqrt(double) { - asm("vsqrt.f64 d0, d0; bx lr"); - return 0.; -} +#else // L4 + +void init() {} + +double mod(double, double) { return 0; } + +double cos(double) { return 0; } +double sin(double) { return 0; } +double tan(double) { return 0; } +#endif } -- cgit v1.2.3