aboutsummaryrefslogtreecommitdiff
path: root/kernel/factor10000.h
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2011-11-02 02:54:40 +0000
committerDimitri Sokolyuk <demon@dim13.org>2011-11-02 02:54:40 +0000
commit87dd379c89dbe9b63dd3ab0f20f002a20d789c47 (patch)
treeafc0c66c7641377fd5228fd5a6aee5b35dc99a24 /kernel/factor10000.h
parente754d6f8f1288fa3ae5032ef675f35268a484c79 (diff)
major update: lot of bugfixes, lot of changes
- let compiler handle stack pointer arithmetic: switch to 16bit - improve update(): deadline depends on incremental release - resolve timing issues, new time convertion macros - major simplification of scheduler, most of garbage removed - new overflow interrupt for cycle counter, resolves also timing problems - simplify pwm generation, lookup tables are deferred, switch to 4bit - add blocking on shared values - remove garbage in lcd module and some bugfixes - add alternative reboot command to uart command interpreter - KISS
Diffstat (limited to 'kernel/factor10000.h')
-rw-r--r--kernel/factor10000.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/kernel/factor10000.h b/kernel/factor10000.h
new file mode 100644
index 0000000..2985026
--- /dev/null
+++ b/kernel/factor10000.h
@@ -0,0 +1,35 @@
+#ifndef __FACTOR_H
+#define __FACTOR_H
+
+/* octave: round(sqrt(2).^(0:(1/16):16) * 10000 / 256)(2:end) */
+
+uint16_t factor[256] PROGMEM = {
+ 40, 41, 42, 43, 44, 44, 45, 46, 47, 49,
+ 50, 51, 52, 53, 54, 55, 56, 58, 59, 60,
+ 62, 63, 64, 66, 67, 69, 70, 72, 73, 75,
+ 76, 78, 80, 82, 83, 85, 87, 89, 91, 93,
+ 95, 97, 99, 101, 104, 106, 108, 110, 113, 115,
+ 118, 120, 123, 126, 129, 131, 134, 137, 140, 143,
+ 146, 150, 153, 156, 160, 163, 167, 170, 174, 178,
+ 182, 186, 190, 194, 198, 203, 207, 212, 216, 221,
+ 226, 231, 236, 241, 246, 252, 257, 263, 269, 274,
+ 280, 287, 293, 299, 306, 313, 319, 326, 333, 341,
+ 348, 356, 364, 372, 380, 388, 397, 405, 414, 423,
+ 432, 442, 452, 462, 472, 482, 492, 503, 514, 526,
+ 537, 549, 561, 573, 586, 599, 612, 625, 639, 653,
+ 667, 682, 696, 712, 727, 743, 760, 776, 793, 811,
+ 828, 846, 865, 884, 903, 923, 943, 964, 985, 1007,
+ 1029, 1051, 1074, 1098, 1122, 1146, 1171, 1197, 1223, 1250,
+ 1277, 1305, 1334, 1363, 1393, 1423, 1455, 1487, 1519, 1552,
+ 1586, 1621, 1657, 1693, 1730, 1768, 1806, 1846, 1886, 1928,
+ 1970, 2013, 2057, 2102, 2148, 2195, 2243, 2293, 2343, 2394,
+ 2446, 2500, 2555, 2611, 2668, 2726, 2786, 2847, 2909, 2973,
+ 3038, 3105, 3173, 3242, 3313, 3386, 3460, 3536, 3613, 3692,
+ 3773, 3856, 3940, 4026, 4114, 4204, 4297, 4391, 4487, 4585,
+ 4685, 4788, 4893, 5000, 5109, 5221, 5336, 5453, 5572, 5694,
+ 5819, 5946, 6076, 6209, 6345, 6484, 6626, 6771, 6920, 7071,
+ 7226, 7384, 7546, 7711, 7880, 8052, 8229, 8409, 8593, 8781,
+ 8974, 9170, 9371, 9576, 9786, 10000
+};
+
+#endif