Rev Author Line No. Line
2573 povik 1 #include <stdio.h>
2 #include <stdint.h>
3 #include <math.h>
4  
5 #define DEG2RAD M_PI/180
6  
7 int main(int argc, char** argv)
8 {
9 printf("int8_t sinewave[360] = {");
10  
11 int i;
12 for (i = 0; i < 360; i++) {
13 printf("%d", (int8_t) (sin(((float) i) * DEG2RAD) * 127));
14  
15 if (i != 359)
16 printf(", ");
17 }
18  
19 printf("};\n");
20 }