![]() |
![]() |
|
MSPM0G3519SensorlessFOCMotorControlLibrary
1.0
|
Library of IQMath operations.
#include <limits.h>#include <stdlib.h>#include <stdint.h>#include <ti/devices/msp/msp.h>

Go to the source code of this file.
Macros | |
| #define | GLOBAL_IQ 24 |
| The IQ format to be used when the IQ format is not explicitly specified (such as _IQcos instead of _IQ16cos). This value must be between 1 and 30, inclusive. | |
| #define | _IQmpy_mathacl(A, B) _IQ24mpy_mathacl(A, B) |
| Multiplies two global IQ format numbers. More... | |
| #define | _IQdiv_mathacl(A, B) _IQ24div_mathacl(A, B) |
| Divides two global IQ format numbers. More... | |
| #define | _IQsqrt_mathacl(A) _IQ24sqrt_mathacl(A) |
| Calculate square root of a global IQ format input. More... | |
Functions | |
| __STATIC_INLINE int_fast32_t | _IQNmpy_mathacl_inline (int_fast32_t iqNInput1, int_fast32_t iqNInput2, const int8_t q_value) |
| MATHACL inline multiplication. More... | |
| #define _IQmpy_mathacl | ( | A, | |
| B | |||
| ) | _IQ24mpy_mathacl(A, B) |
Multiplies two global IQ format numbers.
| A | Global IQ format number to be multiplied. |
| B | Global IQ format number to be multiplied. |
Referenced by HAL_EnableLowSideBrake(), HAL_GetPhasesFloatingStatus(), HAL_ReadCurrents(), HAL_ReadPhaseVoltages(), MC_ClarkeTransform(), MC_ClarkeTransformNoZeroSeq(), MC_InverseClarkeTransform(), MC_InverseParkTransform(), MC_ParkTransform(), MC_SpaceVectorGen(), and MC_SVM_ClarkeTransform().
| #define _IQdiv_mathacl | ( | A, | |
| B | |||
| ) | _IQ24div_mathacl(A, B) |
Divides two global IQ format numbers.
| A | Global IQ format numerator to be divided. |
| B | Global IQ format denominator to divide by. |
Referenced by arcTan2().
| #define _IQsqrt_mathacl | ( | A | ) | _IQ24sqrt_mathacl(A) |
Calculate square root of a global IQ format input.
| A | Global IQ format input. |
| __STATIC_INLINE int_fast32_t _IQNmpy_mathacl_inline | ( | int_fast32_t | iqNInput1, |
| int_fast32_t | iqNInput2, | ||
| const int8_t | q_value | ||
| ) |
MATHACL inline multiplication.
| iqNInput1 | IQN type value numerator to be divided. |
| iqNInput2 | IQN type value denominator to divide by. |
| q_value | IQ format. |