ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts  1.0
ESP8266ILI9341DisplayProject
cordic2c_inc.h
Go to the documentation of this file.
1 #ifndef _CORDIC_INC_H
2 #define _CORDIC_INC_H
3 
9 typedef int Cordic_T; /* 32 */
10 typedef unsigned int UCordic_T; /* 32 */
11 typedef double FCordic_T; /* 64 */
12 #define Cordic_T_Bits 32
13 #define Cordic_T_FractionBits 28
14 #define Cordic_One 0x10000000 /* 1.000000000000000e+00 */
15 #define Cordic_K 0x9b74eda /* 6.072529350088812e-01 */
16 #define Cordic_INVK 0x1a592148 /* 1.646760258121066e+00 */
17 #define Cordic_KP 0x1351e872 /* 1.207497067763072e+00 */
18 #define Cordic_INVKP 0xd402407 /* 8.281593609602157e-01 */
19 #define Cordic_HalfPI 0x1921fb54 /* 1.570796325802803e+00 */
20 #define Cordic2FP(a) ( (double) (a) / (double) (Cordic_One))
21 #define FP2Cordic(a) ((Cordic_T) (Cordic_One * (a)))
22 #ifdef CORDIC_TABLE
23 static const Cordic_T v_atangrad[] = {
24  0x8000000, /* 5.00000000e-01 */
25  0x4b90147, /* 2.95167234e-01 */
26  0x27ece16, /* 1.55958258e-01 */
27  0x1444475, /* 7.91668482e-02 */
28  0xa2c350, /* 3.97370458e-02 */
29  0x5175f8, /* 1.98878944e-02 */
30  0x28bd87, /* 9.94637236e-03 */
31  0x145f15, /* 4.97348979e-03 */
32  0xa2f94, /* 2.48678029e-03 */
33  0x517cb, /* 1.24339387e-03 */
34  0x28be6, /* 6.21698797e-04 */
35  0x145f3, /* 3.10849398e-04 */
36  0xa2f9, /* 1.55422837e-04 */
37  0x517c, /* 7.77095556e-05 */
38  0x28be, /* 3.88547778e-05 */
39  0x145f, /* 1.94273889e-05 */
40  0xa2f, /* 9.71183181e-06 */
41  0x517, /* 4.85405326e-06 */
42  0x28b, /* 2.42516398e-06 */
43  0x145, /* 1.21071935e-06 */
44  0xa2, /* 6.03497028e-07 */
45  0x51, /* 3.01748514e-07 */
46  0x28, /* 1.49011612e-07 */
47  0x14, /* 7.45058060e-08 */
48  0xa, /* 3.72529030e-08 */
49  0x5, /* 1.86264515e-08 */
50  0x2, /* 7.45058060e-09 */
51  0x1, /* 3.72529030e-09 */
52  0x0, /* 0.00000000e+00 */
53  0
54 };
55 #else // CORDIC_TABLE
56 extern const Cordic_T v_atangrad[];
57 #endif // CORDIC_TABLE
58 #endif // _CORDIC_INC_H
double FCordic_T
Definition: cordic2c_inc.h:11
int Cordic_T
Definition: cordic2c_inc.h:9
const Cordic_T v_atangrad[]
unsigned int UCordic_T
Definition: cordic2c_inc.h:10