AM243x Motor Control SDK  09.02.00

Introduction

Defines all the auxiliary macros for DCL.

Go to the source code of this file.

Macros

#define NULL   0
 
#define CONST_PI   3.14159265358979323846f
 Local definitions of the mathematical constant pi. More...
 
#define CONST_2PI   2.0f * CONST_PI
 
#define CONST_PI_F64   3.1415926535897932384626433832795028841971693993751058209749445923078164062L
 
#define CONST_2PI_F64   2.0L * CONST_PI_F64
 
#define DCL_FPU32_TOL   1.0e-06f
 Define the acceptable FPU numerical tolerances. More...
 
#define DCL_FPU64_TOL   1.0e-10L
 
#define DCL_DEFAULT_PERIOD_S   100.0e-06f
 Define the default control period in seconds. More...
 
#define DCL_DEFAULT_PERIODF64_S   100.0e-06L
 
#define DCL_isValue(x, y)   (((x < (y + DCL_FPU32_TOL)) && (x > (y - DCL_FPU32_TOL))) ? 1U : 0U)
 Determines numerical proximity to specified value. More...
 
#define DCL_isValueF64(x, y)   (((x < (y + DCL_FPU64_TOL)) && (x > (y - DCL_FPU64_TOL))) ? 1U : 0U)
 
#define DCL_isZero(x)   DCL_isValue(x,0.0f)
 Determines floating point numerical proximity to zero. More...
 
#define DCL_isZeroF64(x)   DCL_isValueF64(x,0.0L)
 
#define DCL_rand(a)   (a * ((float32_t) rand() / (float32_t) (RAND_MAX >> 1) - 1.0f))
 Returns a random floating point result between -1.0 and +1.0 where 'a' is the multiplier in single or double precision. Useful for initialization of arrays and matrices during test. More...
 
#define DCL_randF64(a)   (a * ((float64_t) rand() / (float64_t) (RAND_MAX >> 1) - 1.0L))
 
#define DCL_c2Limit   ((2.0f - CONST_PI) / (2.0f + CONST_PI))
 Defines the lower limit on derivative filter coefficient c2 in order for fc to lie below the Nyquist frequency. More...
 
#define DCL_c2LimitF64   ((2.0L - CONST_PI_F64) / (2.0L + CONST_PI_F64))