Macros | |
| #define | HPM_MOTOR_MATH_MOD_Q_SW (1) |
| Motor library using mathematical format. More... | |
| #define | HPM_MOTOR_MATH_MOD_Q_HW (2) |
| #define | HPM_MOTOR_MATH_MOD_DSP_FP (3) |
| #define | HPM_MOTOR_MATH_MOD_Q_ALL (4) |
| #define | HPM_MOTOR_MATH_MOD_FP (5) |
| #define | HPM_QMATH_MOD_Q15 (15) |
| Q-format. More... | |
| #define | HPM_QMATH_MOD_Q31 (31) |
| #define | HPM_MOTOR_MATH_MOD HPM_MOTOR_MATH_MOD_FP |
| User-defined profiles. More... | |
| #define | HPM_QMATH_N HPM_QMATH_MOD_Q31 |
| #define | HPM_SOFT_Q_N (15) |
| #define | HPM_MOTOR_MATH_FL_MDF(from_f32) (from_f32) |
| #define | HPM_MOTOR_MATH_MDF_FL(from_mdf) (from_mdf) |
| #define | HPM_MOTOR_MATH_MUL(x, y) (x*y) |
| #define | HPM_MOTOR_MATH_DIV(x, y) (x/y) |
| #define | HPM_MOTOR_MATH_ATAN2(x, y) atan2(x, y) |
| #define | HPM_MOTOR_MATH_ATAN(x) atan(x) |
| #define | HPM_MOTOR_MATH_FABS(x) abs(x) |
Typedefs | |
| typedef float | HPM_MOTOR_MATH_TYPE |
| #define HPM_MOTOR_MATH_ATAN | ( | x | ) | atan(x) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
| #define HPM_MOTOR_MATH_ATAN2 | ( | x, | |
| y | |||
| ) | atan2(x, y) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
| #define HPM_MOTOR_MATH_DIV | ( | x, | |
| y | |||
| ) | (x/y) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
| #define HPM_MOTOR_MATH_FABS | ( | x | ) | abs(x) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
| #define HPM_MOTOR_MATH_FL_MDF | ( | from_f32 | ) | (from_f32) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
| #define HPM_MOTOR_MATH_MDF_FL | ( | from_mdf | ) | (from_mdf) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
| #define HPM_MOTOR_MATH_MOD HPM_MOTOR_MATH_MOD_FP |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
User-defined profiles.
| #define HPM_MOTOR_MATH_MOD_DSP_FP (3) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
dsp hardware floating point unit
| #define HPM_MOTOR_MATH_MOD_FP (5) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
hardware floating point unit
| #define HPM_MOTOR_MATH_MOD_Q_ALL (4) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Qmath soft ware and hardware
| #define HPM_MOTOR_MATH_MOD_Q_HW (2) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Qmath hardware
| #define HPM_MOTOR_MATH_MOD_Q_SW (1) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Motor library using mathematical format.
Qmath software
| #define HPM_MOTOR_MATH_MUL | ( | x, | |
| y | |||
| ) | (x*y) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
| #define HPM_QMATH_MOD_Q15 (15) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Q-format.
| #define HPM_QMATH_MOD_Q31 (31) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
| #define HPM_QMATH_N HPM_QMATH_MOD_Q31 |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
| #define HPM_SOFT_Q_N (15) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
| typedef float HPM_MOTOR_MATH_TYPE |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
| HPM_MOTOR_MATH_TYPE hpm_dsp_hw_abs_fp | ( | HPM_MOTOR_MATH_TYPE | x | ) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Floating-point absolute.
| [in] | x | data |
| HPM_MOTOR_MATH_TYPE hpm_dsp_hw_abs_q | ( | HPM_MOTOR_MATH_TYPE | x | ) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Q-format absolute.
| [in] | x | data |
| HPM_MOTOR_MATH_TYPE hpm_dsp_hw_atan2_fp | ( | HPM_MOTOR_MATH_TYPE | x, |
| HPM_MOTOR_MATH_TYPE | y | ||
| ) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Floating-point atan2.
| [in] | x | data |
| [in] | y | data |
| HPM_MOTOR_MATH_TYPE hpm_dsp_hw_atan2_q | ( | HPM_MOTOR_MATH_TYPE | x, |
| HPM_MOTOR_MATH_TYPE | y | ||
| ) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Q-format atan2.
| [in] | x | data |
| [in] | y | data |
| HPM_MOTOR_MATH_TYPE hpm_dsp_hw_atan_fp | ( | HPM_MOTOR_MATH_TYPE | x | ) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Floating-point atan.
| [in] | x | data |
| HPM_MOTOR_MATH_TYPE hpm_dsp_hw_atan_q | ( | HPM_MOTOR_MATH_TYPE | x | ) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Q-format atan.
| [in] | x | data |
| HPM_MOTOR_MATH_TYPE hpm_dsp_hw_div_fp | ( | HPM_MOTOR_MATH_TYPE | x, |
| HPM_MOTOR_MATH_TYPE | y | ||
| ) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Floating-point division.
| [in] | x | data |
| [in] | y | data |
| HPM_MOTOR_MATH_TYPE hpm_dsp_hw_div_q | ( | HPM_MOTOR_MATH_TYPE | x, |
| HPM_MOTOR_MATH_TYPE | y | ||
| ) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Q-format division.
| [in] | x | data |
| [in] | y | data |
| HPM_MOTOR_MATH_TYPE hpm_dsp_hw_f32_q | ( | float | from_f32 | ) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Floating point to Q format conversion.
| [in] | from_f32 | Floating point |
| HPM_MOTOR_MATH_TYPE hpm_dsp_hw_mul_fp | ( | HPM_MOTOR_MATH_TYPE | x, |
| HPM_MOTOR_MATH_TYPE | y | ||
| ) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Floating-point multiplication.
| [in] | x | data |
| [in] | y | data |
| HPM_MOTOR_MATH_TYPE hpm_dsp_hw_mul_q | ( | HPM_MOTOR_MATH_TYPE | x, |
| HPM_MOTOR_MATH_TYPE | y | ||
| ) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Q-format multiplication.
| [in] | x | data |
| [in] | y | data |
| float hpm_dsp_hw_q_f32 | ( | HPM_MOTOR_MATH_TYPE | from_mdf | ) |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
Q format to floating point conversion.
| [in] | from_mdf | Q format |
|
inlinestatic |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>
|
inlinestatic |
#include <middleware/hpm_mcl/inc/hpm_motor_math.h>