sinelut.h 9.43 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/*
 * sinelut.h
 *
 * Created: 7/30/2018 5:47:35 PM
 *  Author: Jake
 */ 


#ifndef SINELUT_H_
#define SINELUT_H_

const static int16_t sinelut[2340] = {
	512,513,515,516,517,519,520,522,523,524,526,527,528,530,531,533,
	534,535,537,538,539,541,542,544,545,546,548,549,550,552,553,555,
	556,557,559,560,561,563,564,566,567,568,570,571,572,574,575,576,
	578,579,581,582,583,585,586,587,589,590,591,593,594,595,597,598,
	600,601,602,604,605,606,608,609,610,612,613,614,616,617,618,620,
	621,622,624,625,627,628,629,631,632,633,635,636,637,639,640,641,
	643,644,645,647,648,649,650,652,653,654,656,657,658,660,661,662,
	664,665,666,668,669,670,672,673,674,675,677,678,679,681,682,683,
	685,686,687,688,690,691,692,694,695,696,697,699,700,701,703,704,
	705,706,708,709,710,711,713,714,715,716,718,719,720,722,723,724,
	725,727,728,729,730,731,733,734,735,736,738,739,740,741,743,744,
	745,746,748,749,750,751,752,754,755,756,757,758,760,761,762,763,
	764,766,767,768,769,770,772,773,774,775,776,777,779,780,781,782,
	783,784,786,787,788,789,790,791,793,794,795,796,797,798,799,801,
	802,803,804,805,806,807,808,810,811,812,813,814,815,816,817,818,
	820,821,822,823,824,825,826,827,828,829,830,832,833,834,835,836,
	837,838,839,840,841,842,843,844,845,846,847,848,849,850,852,853,
	854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,
	870,871,872,873,874,875,875,876,877,878,879,880,881,882,883,884,
	885,886,887,888,889,890,891,892,892,893,894,895,896,897,898,899,
	900,901,902,902,903,904,905,906,907,908,909,909,910,911,912,913,
	914,915,915,916,917,918,919,920,920,921,922,923,924,925,925,926,
	927,928,929,929,930,931,932,933,933,934,935,936,936,937,938,939,
	940,940,941,942,943,943,944,945,945,946,947,948,948,949,950,951,
	951,952,953,953,954,955,955,956,957,957,958,959,959,960,961,961,
	962,963,963,964,965,965,966,967,967,968,969,969,970,970,971,972,
	972,973,973,974,975,975,976,976,977,977,978,979,979,980,980,981,
	981,982,982,983,984,984,985,985,986,986,987,987,988,988,989,989,
	990,990,991,991,992,992,993,993,994,994,995,995,995,996,996,997,
	997,998,998,999,999,999,1000,1000,1001,1001,1001,1002,1002,1003,1003,1003,
	1004,1004,1005,1005,1005,1006,1006,1006,1007,1007,1007,1008,1008,1008,1009,1009,
	1009,1010,1010,1010,1011,1011,1011,1012,1012,1012,1013,1013,1013,1013,1014,1014,
	1014,1014,1015,1015,1015,1015,1016,1016,1016,1016,1017,1017,1017,1017,1018,1018,
	1018,1018,1018,1019,1019,1019,1019,1019,1020,1020,1020,1020,1020,1020,1021,1021,
	1021,1021,1021,1021,1021,1022,1022,1022,1022,1022,1022,1022,1022,1023,1023,1023,
	1023,1023,1023,1023,1023,1023,1023,1023,1023,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1023,1023,1023,1023,1023,1023,
	1023,1023,1023,1023,1023,1023,1022,1022,1022,1022,1022,1022,1022,1022,1021,1021,
	1021,1021,1021,1021,1021,1020,1020,1020,1020,1020,1020,1019,1019,1019,1019,1019,
	1018,1018,1018,1018,1018,1017,1017,1017,1017,1016,1016,1016,1016,1015,1015,1015,
	1015,1014,1014,1014,1014,1013,1013,1013,1013,1012,1012,1012,1011,1011,1011,1010,
	1010,1010,1009,1009,1009,1008,1008,1008,1007,1007,1007,1006,1006,1006,1005,1005,
	1005,1004,1004,1003,1003,1003,1002,1002,1001,1001,1001,1000,1000,999,999,999,
	998,998,997,997,996,996,995,995,995,994,994,993,993,992,992,991,
	991,990,990,989,989,988,988,987,987,986,986,985,985,984,984,983,
	982,982,981,981,980,980,979,979,978,977,977,976,976,975,975,974,
	973,973,972,972,971,970,970,969,969,968,967,967,966,965,965,964,
	963,963,962,961,961,960,959,959,958,957,957,956,955,955,954,953,
	953,952,951,951,950,949,948,948,947,946,945,945,944,943,943,942,
	941,940,940,939,938,937,936,936,935,934,933,933,932,931,930,929,
	929,928,927,926,925,925,924,923,922,921,920,920,919,918,917,916,
	915,915,914,913,912,911,910,909,909,908,907,906,905,904,903,902,
	902,901,900,899,898,897,896,895,894,893,892,892,891,890,889,888,
	887,886,885,884,883,882,881,880,879,878,877,876,875,875,874,873,
	872,871,870,869,868,867,866,865,864,863,862,861,860,859,858,857,
	856,855,854,853,852,850,849,848,847,846,845,844,843,842,841,840,
	839,838,837,836,835,834,833,832,830,829,828,827,826,825,824,823,
	822,821,820,818,817,816,815,814,813,812,811,810,808,807,806,805,
	804,803,802,801,799,798,797,796,795,794,793,791,790,789,788,787,
	786,784,783,782,781,780,779,777,776,775,774,773,772,770,769,768,
	767,766,764,763,762,761,760,758,757,756,755,754,752,751,750,749,
	748,746,745,744,743,741,740,739,738,736,735,734,733,731,730,729,
	728,727,725,724,723,722,720,719,718,716,715,714,713,711,710,709,
	708,706,705,704,703,701,700,699,697,696,695,694,692,691,690,688,
	687,686,685,683,682,681,679,678,677,675,674,673,672,670,669,668,
	666,665,664,662,661,660,658,657,656,654,653,652,650,649,648,647,
	645,644,643,641,640,639,637,636,635,633,632,631,629,628,627,625,
	624,622,621,620,618,617,616,614,613,612,610,609,608,606,605,604,
	602,601,600,598,597,595,594,593,591,590,589,587,586,585,583,582,
	581,579,578,576,575,574,572,571,570,568,567,566,564,563,561,560,
	559,557,556,555,553,552,550,549,548,546,545,544,542,541,539,538,
	537,535,534,533,531,530,528,527,526,524,523,522,520,519,517,516,
	515,513,512,511,509,508,507,505,504,502,501,500,498,497,496,494,
	493,491,490,489,487,486,485,483,482,480,479,478,476,475,474,472,
	471,469,468,467,465,464,463,461,460,458,457,456,454,453,452,450,
	449,448,446,445,443,442,441,439,438,437,435,434,433,431,430,429,
	427,426,424,423,422,420,419,418,416,415,414,412,411,410,408,407,
	406,404,403,402,400,399,397,396,395,393,392,391,389,388,387,385,
	384,383,381,380,379,377,376,375,374,372,371,370,368,367,366,364,
	363,362,360,359,358,356,355,354,352,351,350,349,347,346,345,343,
	342,341,339,338,337,336,334,333,332,330,329,328,327,325,324,323,
	321,320,319,318,316,315,314,313,311,310,309,308,306,305,304,302,
	301,300,299,297,296,295,294,293,291,290,289,288,286,285,284,283,
	281,280,279,278,276,275,274,273,272,270,269,268,267,266,264,263,
	262,261,260,258,257,256,255,254,252,251,250,249,248,247,245,244,
	243,242,241,240,238,237,236,235,234,233,231,230,229,228,227,226,
	225,223,222,221,220,219,218,217,216,214,213,212,211,210,209,208,
	207,206,204,203,202,201,200,199,198,197,196,195,194,192,191,190,
	189,188,187,186,185,184,183,182,181,180,179,178,177,176,175,174,
	172,171,170,169,168,167,166,165,164,163,162,161,160,159,158,157,
	156,155,154,153,152,151,150,149,149,148,147,146,145,144,143,142,
	141,140,139,138,137,136,135,134,133,132,132,131,130,129,128,127,
	126,125,124,123,122,122,121,120,119,118,117,116,115,115,114,113,
	112,111,110,109,109,108,107,106,105,104,104,103,102,101,100,99,
	99,98,97,96,95,95,94,93,92,91,91,90,89,88,88,87,
	86,85,84,84,83,82,81,81,80,79,79,78,77,76,76,75,
	74,73,73,72,71,71,70,69,69,68,67,67,66,65,65,64,
	63,63,62,61,61,60,59,59,58,57,57,56,55,55,54,54,
	53,52,52,51,51,50,49,49,48,48,47,47,46,45,45,44,
	44,43,43,42,42,41,40,40,39,39,38,38,37,37,36,36,
	35,35,34,34,33,33,32,32,31,31,30,30,29,29,29,28,
	28,27,27,26,26,25,25,25,24,24,23,23,23,22,22,21,
	21,21,20,20,19,19,19,18,18,18,17,17,17,16,16,16,
	15,15,15,14,14,14,13,13,13,12,12,12,11,11,11,11,
	10,10,10,10,9,9,9,9,8,8,8,8,7,7,7,7,
	6,6,6,6,6,5,5,5,5,5,4,4,4,4,4,4,
	3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,1,
	1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
	0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,
	1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,
	3,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,
	5,5,6,6,6,6,6,7,7,7,7,8,8,8,8,9,
	9,9,9,10,10,10,10,11,11,11,11,12,12,12,13,13,
	13,14,14,14,15,15,15,16,16,16,17,17,17,18,18,18,
	19,19,19,20,20,21,21,21,22,22,23,23,23,24,24,25,
	25,25,26,26,27,27,28,28,29,29,29,30,30,31,31,32,
	32,33,33,34,34,35,35,36,36,37,37,38,38,39,39,40,
	40,41,42,42,43,43,44,44,45,45,46,47,47,48,48,49,
	49,50,51,51,52,52,53,54,54,55,55,56,57,57,58,59,
	59,60,61,61,62,63,63,64,65,65,66,67,67,68,69,69,
	70,71,71,72,73,73,74,75,76,76,77,78,79,79,80,81,
	81,82,83,84,84,85,86,87,88,88,89,90,91,91,92,93,
	94,95,95,96,97,98,99,99,100,101,102,103,104,104,105,106,
	107,108,109,109,110,111,112,113,114,115,115,116,117,118,119,120,
	121,122,122,123,124,125,126,127,128,129,130,131,132,132,133,134,
	135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,149,
	150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,
	166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,
	183,184,185,186,187,188,189,190,191,192,194,195,196,197,198,199,
	200,201,202,203,204,206,207,208,209,210,211,212,213,214,216,217,
	218,219,220,221,222,223,225,226,227,228,229,230,231,233,234,235,
	236,237,238,240,241,242,243,244,245,247,248,249,250,251,252,254,
	255,256,257,258,260,261,262,263,264,266,267,268,269,270,272,273,
	274,275,276,278,279,280,281,283,284,285,286,288,289,290,291,293,
	294,295,296,297,299,300,301,302,304,305,306,308,309,310,311,313,
	314,315,316,318,319,320,321,323,324,325,327,328,329,330,332,333,
	334,336,337,338,339,341,342,343,345,346,347,349,350,351,352,354,
	355,356,358,359,360,362,363,364,366,367,368,370,371,372,374,375,
	376,377,379,380,381,383,384,385,387,388,389,391,392,393,395,396,
	397,399,400,402,403,404,406,407,408,410,411,412,414,415,416,418,
	419,420,422,423,424,426,427,429,430,431,433,434,435,437,438,439,
	441,442,443,445,446,448,449,450,452,453,454,456,457,458,460,461,
	463,464,465,467,468,469,471,472,474,475,476,478,479,480,482,483,
	485,486,487,489,490,491,493,494,496,497,498,500,501,502,504,505,
	507,508,509,511
};


163
164
165
166
167
168
169
const static int8_t ct[6][6] = {
	{0,1,1,0,0,0}, // hi1, lo2
	{0,1,0,0,1,0}, // hi1, lo3
	{0,0,0,1,1,0}, // hi2, lo3
	{1,0,0,1,0,0}, // hi2, lo1
	{1,0,0,0,0,1}, // hi3, lo1
	{0,0,1,0,0,1}, // hi3, lo2
170
171
172
};

#endif /* SINELUT_H_ */