aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-18 12:19:31 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-18 12:19:31 +0000
commit78fdea689982ec0d4fe991e61a0a2e93ce31c32c (patch)
treea78252a69d5e269038dd8106434f7142fcbf3a28
parent3aa821af1a657f41cfb284f2ca60a695aa4b08c3 (diff)
downloadChibiOS-78fdea689982ec0d4fe991e61a0a2e93ce31c32c.tar.gz
ChibiOS-78fdea689982ec0d4fe991e61a0a2e93ce31c32c.tar.bz2
ChibiOS-78fdea689982ec0d4fe991e61a0a2e93ce31c32c.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3638 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--testhal/STM32F4xx/IRQ_STORM_FPU/extfunc.c4
-rw-r--r--testhal/STM32F4xx/IRQ_STORM_FPU/main.c36
2 files changed, 20 insertions, 20 deletions
diff --git a/testhal/STM32F4xx/IRQ_STORM_FPU/extfunc.c b/testhal/STM32F4xx/IRQ_STORM_FPU/extfunc.c
index 500e378de..c7c4f382c 100644
--- a/testhal/STM32F4xx/IRQ_STORM_FPU/extfunc.c
+++ b/testhal/STM32F4xx/IRQ_STORM_FPU/extfunc.c
@@ -18,10 +18,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-float getfloat(float par) {
+float ff1(float par) {
return par;
}
-float setfloat(float par1, float par2, float par3, float par4) {
+float ff2(float par1, float par2, float par3, float par4) {
return (par1 + par2) * (par3 + par4);
}
diff --git a/testhal/STM32F4xx/IRQ_STORM_FPU/main.c b/testhal/STM32F4xx/IRQ_STORM_FPU/main.c
index 3e6ac940c..3cd0a1ade 100644
--- a/testhal/STM32F4xx/IRQ_STORM_FPU/main.c
+++ b/testhal/STM32F4xx/IRQ_STORM_FPU/main.c
@@ -23,9 +23,9 @@
#include "ch.h"
#include "hal.h"
-float getfloat(float par);
+float ff1(float par);
-float setfloat(float par1, float par2, float par3, float par4);
+float ff2(float par1, float par2, float par3, float par4);
/*===========================================================================*/
/* Configurable settings. */
@@ -64,17 +64,17 @@ static msg_t WorkerThread(void *arg) {
* GPT2 callback.
*/
static void gpt2cb(GPTDriver *gptp) {
- float f1, f2, f3, f4, sum;
+ float f1, f2, f3, f4, f5;
(void)gptp;
- f1 = getfloat(2);
- f2 = getfloat(3);
- f3 = getfloat(4);
- sum = f1 + f2 + f3;
- f4 = getfloat(5);
- sum = setfloat(sum, f4, sum, f4);
- if (sum != 196)
+ f1 = ff1(2);
+ f2 = ff1(3);
+ f3 = ff1(4);
+ f5 = f1 + f2 + f3;
+ f4 = ff1(5);
+ f5 = ff2(f5, f4, f5, f4);
+ if (f5 != 196)
chSysHalt();
}
@@ -82,17 +82,17 @@ static void gpt2cb(GPTDriver *gptp) {
* GPT3 callback.
*/
static void gpt3cb(GPTDriver *gptp) {
- float f1, f2, f3, f4, sum;
+ float f1, f2, f3, f4, f5;
(void)gptp;
- f1 = getfloat(1);
- f2 = getfloat(2);
- f3 = getfloat(3);
- sum = f1 + f2 + f3;
- f4 = getfloat(4);
- sum = setfloat(sum, f4, sum, f4);
- if (sum != 100)
+ f1 = ff1(1);
+ f2 = ff1(2);
+ f3 = ff1(3);
+ f5 = f1 + f2 + f3;
+ f4 = ff1(4);
+ f5 = ff2(f5, f4, f5, f4);
+ if (f5 != 100)
chSysHalt();
}