====[[KMotionDef - Basic Maths Standard Math Functions|standard math funtionsStandard Math Funtions]]====<span style="color: extern float [[KMotionDef - Standard Math Functions#0000ff;">extern float sqrtf |sqrtf]] (float x);</span><br /><span style="color: #0000ff;">extern float expf (float x);</span><br /><span style="color: #0000ff;">extern float logf (float x);</span><br /><span style="color: #0000ff;">extern float log10f(float x);</span><br /><span style="color: #0000ff;">extern float powf (float x, float y);</span><br /><span style="color: #0000ff;">extern float sinf (float x);</span><br /><span style="color: #0000ff;">extern float cosf (float x);</span><br /><span style="color: #0000ff;">extern float tanf (float x);</span><br /><span style="color: #0000ff;">extern float asinf (float x);</span><br /><span style="color: #0000ff;">extern float acosf (float x);</span><br /><span style="color: #0000ff;">extern float atanf (float x);</span><br /><span style="color: #0000ff;">extern float atan2f(float y, float x); </span><br /><span style="color: #0000ff;">extern float fast_fabsf (float y);</span>
<span style="color: #0000ff;">extern double sqrt (double x);</span><br /><span style="color: #0000ff;">extern double exp (double x);</span><br /><span style="color: #0000ff;">extern double log (double x);</span><br /><span style="color: #0000ff;">extern double log10(double x);</span><br /><span style="color: #0000ff;">extern double pow (double x, double y);</span><br /><span style="color: #0000ff;">extern double sin (double x);</span><br /><span style="color: #0000ff;">extern double cos (double x);</span><br /><span style="color: #0000ff;">extern double tan (double x);</span><br /><span style="color: #0000ff;">extern double asin (double x);</span><br /><span style="color: #0000ff;">extern double acos (double x);</span><br /><span style="color: #0000ff;">extern double atan (double x);</span><br /><span style="color: #0000ff;">extern double atan2(double y, double x); </span><br /><span style="color: #0000ff;">extern double fast_fabs (double y);</span>
<br /><span style="color: #0000ff;">#define FPGA_ADDR ((volatile unsigned char *)0x91000000) // Base of FPGA addresses</span><br /><span style="color: #0000ff;">#define FPGA(X) (FPGA_ADDR[(X)*4+2])</span><br /><span style="color: #0000ff;">#define FPGA_ADDRW ((volatile unsigned short int *)0x91000000) // Base of FPGA addresses</span><br /><span style="color: #0000ff;">#define FPGAW(X) (FPGA_ADDRW[(X)*2+1])</span><br /><span style="color: #0000ff;"> </span><br /><span style="color: #0000ff;">// This structure is set to default every time the program runs UNTIL</span><br /><span style="color: #0000ff;">// the program image has been FLASHED using the FLASH command</span><br /><span style="color: #0000ff;">// from then on it will not be cleared, so data that was present at the</span><br /><span style="color: #0000ff;">// time it was flashed will persist </span>