summaryrefslogtreecommitdiff
path: root/n/avr/modules/math/fixed/test/test_fixed.c
diff options
context:
space:
mode:
Diffstat (limited to 'n/avr/modules/math/fixed/test/test_fixed.c')
-rw-r--r--n/avr/modules/math/fixed/test/test_fixed.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/n/avr/modules/math/fixed/test/test_fixed.c b/n/avr/modules/math/fixed/test/test_fixed.c
index d19f63a..9f04880 100644
--- a/n/avr/modules/math/fixed/test/test_fixed.c
+++ b/n/avr/modules/math/fixed/test/test_fixed.c
@@ -98,6 +98,23 @@ proto_callback (uint8_t cmd, uint8_t size, uint8_t *args)
proto_send4d ('r', rl[0], rl[1], rl[2], rl[3]);
}
break;
+ case c ('c', 0):
+ for (al = 0; al < (1L << 24); al += 1 << 8)
+ {
+ proto_send1d ('a', al);
+ rl[0] = fixed_cos_f824 (al);
+ rl[1] = fixed_sin_f824 (al);
+ proto_send2d ('r', rl[0], rl[1]);
+ }
+ for (i = 0; i < 64000; i++)
+ {
+ al = random_u32 () & 0xffffff;
+ proto_send1d ('a', al);
+ rl[0] = fixed_cos_f824 (al);
+ rl[1] = fixed_sin_f824 (al);
+ proto_send2d ('r', rl[0], rl[1]);
+ }
+ break;
default:
proto_send0 ('?');
return;