Functions | |
__STATIC_INLINE void | Cy_CORDIC_Enable (MXCORDIC_Type *base) |
Enables CORDIC IP. More... | |
__STATIC_INLINE void | Cy_CORDIC_Disable (MXCORDIC_Type *base) |
Disables CORDIC IP. More... | |
__STATIC_INLINE bool | Cy_CORDIC_IsBusy (MXCORDIC_Type *base) |
Checks if there is any computation is currently in progress. More... | |
__STATIC_INLINE void | Cy_CORDIC_CosNB (MXCORDIC_Type *base, CY_CORDIC_Q31_t angle_in_radians) |
Computes the Cosine for the given angle in radians. More... | |
__STATIC_INLINE void | Cy_CORDIC_SinNB (MXCORDIC_Type *base, CY_CORDIC_Q31_t angle_in_radians) |
Computes the Sine for the given angle in radians. More... | |
__STATIC_INLINE void | Cy_CORDIC_TanNB (MXCORDIC_Type *base, CY_CORDIC_Q31_t angle_in_radians) |
Computes the Tangent for the given angle in radians. More... | |
__STATIC_INLINE void | Cy_CORDIC_ArcTanNB (MXCORDIC_Type *base, CY_CORDIC_8Q23_t x, CY_CORDIC_8Q23_t y) |
Computes the Arc Tangent for the given value (y/x). More... | |
__STATIC_INLINE void | Cy_CORDIC_CoshNB (MXCORDIC_Type *base, CY_CORDIC_Q31_t angle_in_radians) |
Computes the Hyperbolic Cosine for the given angle in radians. More... | |
__STATIC_INLINE void | Cy_CORDIC_SinhNB (MXCORDIC_Type *base, CY_CORDIC_Q31_t angle_in_radians) |
Computes the Hyperbolic Sine for the given angle in radians. More... | |
__STATIC_INLINE void | Cy_CORDIC_TanhNB (MXCORDIC_Type *base, CY_CORDIC_Q31_t angle_in_radians) |
Computes the Hyperbolic Tangent for the given angle in radians. More... | |
__STATIC_INLINE void | Cy_CORDIC_ArcTanhNB (MXCORDIC_Type *base, CY_CORDIC_8Q23_t x, CY_CORDIC_8Q23_t y) |
Computes the Hyperbolic Arc Tangent for the given value (y/x). More... | |
__STATIC_INLINE CY_CORDIC_Q31_t | Cy_CORDIC_GetCosResult (MXCORDIC_Type *base) |
Returns the result of Cosine operation. More... | |
__STATIC_INLINE CY_CORDIC_Q31_t | Cy_CORDIC_GetSinResult (MXCORDIC_Type *base) |
Returns the result of Sine operation. More... | |
__STATIC_INLINE CY_CORDIC_20Q11_t | Cy_CORDIC_GetTanResult (MXCORDIC_Type *base) |
Returns the result of Tangent operation. More... | |
__STATIC_INLINE CY_CORDIC_Q31_t | Cy_CORDIC_GetArcTanResult (MXCORDIC_Type *base) |
Returns the result of Arc Tangent operation. More... | |
__STATIC_INLINE CY_CORDIC_1Q30_t | Cy_CORDIC_GetCoshResult (MXCORDIC_Type *base) |
Returns the result of Hyperbolic Cosine operation. More... | |
__STATIC_INLINE CY_CORDIC_1Q30_t | Cy_CORDIC_GetSinhResult (MXCORDIC_Type *base) |
Returns the result of Hyperbolic Sine operation. More... | |
__STATIC_INLINE CY_CORDIC_20Q11_t | Cy_CORDIC_GetTanhResult (MXCORDIC_Type *base) |
Returns the result of Hyperbolic Tangent operation. More... | |
__STATIC_INLINE CY_CORDIC_Q31_t | Cy_CORDIC_GetArcTanhResult (MXCORDIC_Type *base) |
Returns the result of Hyperbolic Arc Tangent operation. More... | |
__STATIC_INLINE void | Cy_CORDIC_ParkTransformNB (MXCORDIC_Type *base, CY_CORDIC_Q31_t Vref_AngleQ31, CY_CORDIC_Q31_t I_Alpha_1Q31, CY_CORDIC_Q31_t I_Beta_1Q31) |
Computes the Park Transform. More... | |
__STATIC_INLINE void | Cy_CORDIC_GetParkResult (MXCORDIC_Type *base, cy_stc_cordic_parkTransform_result_t *ptr) |
Returns Park Transform results. More... | |
__STATIC_INLINE void | Cy_CORDIC_ClearZ (MXCORDIC_Type *base) |
Clears the CORDIC Z Data register. More... | |
__STATIC_INLINE void | Cy_CORDIC_SetMode (MXCORDIC_Type *base, cy_en_cordic_operating_mode_t opmode, cy_en_cordic_rotvec_mode_t rotvec) |
Configures the operating modes. More... | |
__STATIC_INLINE CY_CORDIC_Q31_t | Cy_CORDIC_Cos (MXCORDIC_Type *base, CY_CORDIC_Q31_t angle_in_radians) |
Computes the Cosine for the given angle in radians. More... | |
__STATIC_INLINE CY_CORDIC_Q31_t | Cy_CORDIC_Sin (MXCORDIC_Type *base, CY_CORDIC_Q31_t angle_in_radians) |
Computes the Sine for the given angle in radians. More... | |
CY_CORDIC_20Q11_t | Cy_CORDIC_Tan (MXCORDIC_Type *base, CY_CORDIC_Q31_t angle_in_radians) |
Computes the Tangent for the given angle in radians. More... | |
__STATIC_INLINE CY_CORDIC_Q31_t | Cy_CORDIC_ArcTan (MXCORDIC_Type *base, CY_CORDIC_8Q23_t x, CY_CORDIC_8Q23_t y) |
Computes the Arc Tangent for the given value (y/x). More... | |
__STATIC_INLINE CY_CORDIC_1Q30_t | Cy_CORDIC_Cosh (MXCORDIC_Type *base, CY_CORDIC_Q31_t angle_in_radians) |
Computes the Hyperbolic Cosine for the given angle in radians. More... | |
__STATIC_INLINE CY_CORDIC_1Q30_t | Cy_CORDIC_Sinh (MXCORDIC_Type *base, CY_CORDIC_Q31_t angle_in_radians) |
Computes the Hyperbolic Hyperbolic Sine for the given angle in radians. More... | |
CY_CORDIC_20Q11_t | Cy_CORDIC_Tanh (MXCORDIC_Type *base, CY_CORDIC_Q31_t angle_in_radians) |
Computes the Hyperbolic Tangent for the given angle in radians. More... | |
__STATIC_INLINE CY_CORDIC_Q31_t | Cy_CORDIC_ArcTanh (MXCORDIC_Type *base, CY_CORDIC_8Q23_t x, CY_CORDIC_8Q23_t y) |
Computes the Hyperbolic Arc Tangent for the given value (y/x). More... | |
uint32_t | Cy_CORDIC_Sqrt (MXCORDIC_Type *base, uint32_t x) |
Computes the Square root of the given value. More... | |
__STATIC_INLINE uint32_t | Cy_CORDIC_GetInterruptStatus (MXCORDIC_Type *base) |
Returns the interrupt cause register. More... | |
__STATIC_INLINE void | Cy_CORDIC_ClearInterrupt (MXCORDIC_Type *base, uint32_t interruptMask) |
Clears the interrupt sources in the interrupt cause register. More... | |
__STATIC_INLINE void | Cy_CORDIC_SetInterrupt (MXCORDIC_Type *base, uint32_t interruptMask) |
Sets the interrupt sources in the interrupt set register. More... | |
__STATIC_INLINE uint32_t | Cy_CORDIC_GetInterruptMask (MXCORDIC_Type *base) |
Returns the interrupt mask register. More... | |
__STATIC_INLINE void | Cy_CORDIC_SetInterruptMask (MXCORDIC_Type *base, uint32_t interruptMask) |
Writes interrupt mask register. More... | |
__STATIC_INLINE uint32_t | Cy_CORDIC_GetInterruptStatusMasked (MXCORDIC_Type *base) |
Returns the interrupt masked register. More... | |
void | Cy_CORDIC_Interrupt (MXCORDIC_Type *base, cy_stc_cordic_context_t *context) |
CORDIC Interrupt Service Routine. More... | |
__STATIC_INLINE void | Cy_CORDIC_RegisterCallback (MXCORDIC_Type *base, cy_cb_cordic_handle_events_t callback, cy_stc_cordic_context_t *context) |
Registers a callback function that notifies that CORDIC Callback Events occurred in the Cy_CORDIC_Interrupt. More... | |
__STATIC_INLINE void Cy_CORDIC_Enable | ( | MXCORDIC_Type * | base | ) |
Enables CORDIC IP.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE void Cy_CORDIC_Disable | ( | MXCORDIC_Type * | base | ) |
Disables CORDIC IP.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE bool Cy_CORDIC_IsBusy | ( | MXCORDIC_Type * | base | ) |
Checks if there is any computation is currently in progress.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE void Cy_CORDIC_CosNB | ( | MXCORDIC_Type * | base, |
CY_CORDIC_Q31_t | angle_in_radians | ||
) |
Computes the Cosine for the given angle in radians.
base | The pointer to the CORDIC instance. |
angle_in_radians | The angle in radians. |
__STATIC_INLINE void Cy_CORDIC_SinNB | ( | MXCORDIC_Type * | base, |
CY_CORDIC_Q31_t | angle_in_radians | ||
) |
Computes the Sine for the given angle in radians.
base | The pointer to the CORDIC instance. |
angle_in_radians | The angle in radians. |
__STATIC_INLINE void Cy_CORDIC_TanNB | ( | MXCORDIC_Type * | base, |
CY_CORDIC_Q31_t | angle_in_radians | ||
) |
Computes the Tangent for the given angle in radians.
base | The pointer to the CORDIC instance. |
angle_in_radians | The angle in radians. |
__STATIC_INLINE void Cy_CORDIC_ArcTanNB | ( | MXCORDIC_Type * | base, |
CY_CORDIC_8Q23_t | x, | ||
CY_CORDIC_8Q23_t | y | ||
) |
Computes the Arc Tangent for the given value (y/x).
base | The pointer to the CORDIC instance. |
y | The numerator value. |
x | The denominator value. |
__STATIC_INLINE void Cy_CORDIC_CoshNB | ( | MXCORDIC_Type * | base, |
CY_CORDIC_Q31_t | angle_in_radians | ||
) |
Computes the Hyperbolic Cosine for the given angle in radians.
base | The pointer to the CORDIC instance. |
angle_in_radians | The angle in radians. |
__STATIC_INLINE void Cy_CORDIC_SinhNB | ( | MXCORDIC_Type * | base, |
CY_CORDIC_Q31_t | angle_in_radians | ||
) |
Computes the Hyperbolic Sine for the given angle in radians.
base | The pointer to the CORDIC instance. |
angle_in_radians | The angle in radians. |
__STATIC_INLINE void Cy_CORDIC_TanhNB | ( | MXCORDIC_Type * | base, |
CY_CORDIC_Q31_t | angle_in_radians | ||
) |
Computes the Hyperbolic Tangent for the given angle in radians.
base | The pointer to the CORDIC instance. |
angle_in_radians | The angle in radians. |
__STATIC_INLINE void Cy_CORDIC_ArcTanhNB | ( | MXCORDIC_Type * | base, |
CY_CORDIC_8Q23_t | x, | ||
CY_CORDIC_8Q23_t | y | ||
) |
Computes the Hyperbolic Arc Tangent for the given value (y/x).
base | The pointer to the CORDIC instance. |
y | The numerator value. |
x | The denominator value. |
__STATIC_INLINE CY_CORDIC_Q31_t Cy_CORDIC_GetCosResult | ( | MXCORDIC_Type * | base | ) |
Returns the result of Cosine operation.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE CY_CORDIC_Q31_t Cy_CORDIC_GetSinResult | ( | MXCORDIC_Type * | base | ) |
Returns the result of Sine operation.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE CY_CORDIC_20Q11_t Cy_CORDIC_GetTanResult | ( | MXCORDIC_Type * | base | ) |
Returns the result of Tangent operation.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE CY_CORDIC_Q31_t Cy_CORDIC_GetArcTanResult | ( | MXCORDIC_Type * | base | ) |
Returns the result of Arc Tangent operation.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE CY_CORDIC_1Q30_t Cy_CORDIC_GetCoshResult | ( | MXCORDIC_Type * | base | ) |
Returns the result of Hyperbolic Cosine operation.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE CY_CORDIC_1Q30_t Cy_CORDIC_GetSinhResult | ( | MXCORDIC_Type * | base | ) |
Returns the result of Hyperbolic Sine operation.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE CY_CORDIC_20Q11_t Cy_CORDIC_GetTanhResult | ( | MXCORDIC_Type * | base | ) |
Returns the result of Hyperbolic Tangent operation.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE CY_CORDIC_Q31_t Cy_CORDIC_GetArcTanhResult | ( | MXCORDIC_Type * | base | ) |
Returns the result of Hyperbolic Arc Tangent operation.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE void Cy_CORDIC_ParkTransformNB | ( | MXCORDIC_Type * | base, |
CY_CORDIC_Q31_t | Vref_AngleQ31, | ||
CY_CORDIC_Q31_t | I_Alpha_1Q31, | ||
CY_CORDIC_Q31_t | I_Beta_1Q31 | ||
) |
Computes the Park Transform.
base | The pointer to the CORDIC instance. |
Vref_AngleQ31 | The rotor angle value in radians. |
I_Alpha_1Q31 | The current I_Alpha value. |
I_Beta_1Q31 | The current I_Beta value. |
__STATIC_INLINE void Cy_CORDIC_GetParkResult | ( | MXCORDIC_Type * | base, |
cy_stc_cordic_parkTransform_result_t * | ptr | ||
) |
Returns Park Transform results.
base | The pointer to the CORDIC instance. |
ptr | The pointer to the computed values of Park Transform. |
__STATIC_INLINE void Cy_CORDIC_ClearZ | ( | MXCORDIC_Type * | base | ) |
Clears the CORDIC Z Data register.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE void Cy_CORDIC_SetMode | ( | MXCORDIC_Type * | base, |
cy_en_cordic_operating_mode_t | opmode, | ||
cy_en_cordic_rotvec_mode_t | rotvec | ||
) |
Configures the operating modes.
base | The pointer to the CORDIC instance. |
opmode | Specifies the Circular/Hyperbolic/Linear mode. |
rotvec | Specifies the Rotation/Vectoring mode. |
__STATIC_INLINE CY_CORDIC_Q31_t Cy_CORDIC_Cos | ( | MXCORDIC_Type * | base, |
CY_CORDIC_Q31_t | angle_in_radians | ||
) |
Computes the Cosine for the given angle in radians.
base | The pointer to the CORDIC instance. |
angle_in_radians | The angle in radians. |
__STATIC_INLINE CY_CORDIC_Q31_t Cy_CORDIC_Sin | ( | MXCORDIC_Type * | base, |
CY_CORDIC_Q31_t | angle_in_radians | ||
) |
Computes the Sine for the given angle in radians.
base | The pointer to the CORDIC instance. |
angle_in_radians | The angle in radians. |
CY_CORDIC_20Q11_t Cy_CORDIC_Tan | ( | MXCORDIC_Type * | base, |
CY_CORDIC_Q31_t | angle_in_radians | ||
) |
Computes the Tangent for the given angle in radians.
base | The pointer to the CORDIC instance. |
angle_in_radians | The angle in radians. |
__STATIC_INLINE CY_CORDIC_Q31_t Cy_CORDIC_ArcTan | ( | MXCORDIC_Type * | base, |
CY_CORDIC_8Q23_t | x, | ||
CY_CORDIC_8Q23_t | y | ||
) |
Computes the Arc Tangent for the given value (y/x).
base | The pointer to the CORDIC instance. |
y | The numerator value. |
x | The denominator value. |
__STATIC_INLINE CY_CORDIC_1Q30_t Cy_CORDIC_Cosh | ( | MXCORDIC_Type * | base, |
CY_CORDIC_Q31_t | angle_in_radians | ||
) |
Computes the Hyperbolic Cosine for the given angle in radians.
base | The pointer to the CORDIC instance. |
angle_in_radians | The angle in radians. |
__STATIC_INLINE CY_CORDIC_1Q30_t Cy_CORDIC_Sinh | ( | MXCORDIC_Type * | base, |
CY_CORDIC_Q31_t | angle_in_radians | ||
) |
Computes the Hyperbolic Hyperbolic Sine for the given angle in radians.
base | The pointer to the CORDIC instance. |
angle_in_radians | The angle in radians. |
CY_CORDIC_20Q11_t Cy_CORDIC_Tanh | ( | MXCORDIC_Type * | base, |
CY_CORDIC_Q31_t | angle_in_radians | ||
) |
Computes the Hyperbolic Tangent for the given angle in radians.
base | The pointer to the CORDIC instance. |
angle_in_radians | The angle in radians. |
__STATIC_INLINE CY_CORDIC_Q31_t Cy_CORDIC_ArcTanh | ( | MXCORDIC_Type * | base, |
CY_CORDIC_8Q23_t | x, | ||
CY_CORDIC_8Q23_t | y | ||
) |
Computes the Hyperbolic Arc Tangent for the given value (y/x).
base | The pointer to the CORDIC instance. |
y | The numerator value. |
x | The denominator value. |
uint32_t Cy_CORDIC_Sqrt | ( | MXCORDIC_Type * | base, |
uint32_t | x | ||
) |
Computes the Square root of the given value.
base | The pointer to the CORDIC instance. |
x | The input value. |
Computes the Square root of the given value.
__STATIC_INLINE uint32_t Cy_CORDIC_GetInterruptStatus | ( | MXCORDIC_Type * | base | ) |
Returns the interrupt cause register.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE void Cy_CORDIC_ClearInterrupt | ( | MXCORDIC_Type * | base, |
uint32_t | interruptMask | ||
) |
Clears the interrupt sources in the interrupt cause register.
base | The pointer to the CORDIC instance. |
interruptMask | The interrupt sources to be cleared. |
__STATIC_INLINE void Cy_CORDIC_SetInterrupt | ( | MXCORDIC_Type * | base, |
uint32_t | interruptMask | ||
) |
Sets the interrupt sources in the interrupt set register.
base | The pointer to the CORDIC instance. |
interruptMask | The interrupt sources to set in the interrupt set register. |
__STATIC_INLINE uint32_t Cy_CORDIC_GetInterruptMask | ( | MXCORDIC_Type * | base | ) |
Returns the interrupt mask register.
This register specifies which bits from the interrupt cause register can trigger an interrupt event.
base | The pointer to the CORDIC instance. |
__STATIC_INLINE void Cy_CORDIC_SetInterruptMask | ( | MXCORDIC_Type * | base, |
uint32_t | interruptMask | ||
) |
Writes interrupt mask register.
This register specifies which bits from the interrupt cause register can trigger an interrupt event.
base | The pointer to the CORDIC instance. |
interruptMask | The interrupt sources to set in the interrupt set register. |
__STATIC_INLINE uint32_t Cy_CORDIC_GetInterruptStatusMasked | ( | MXCORDIC_Type * | base | ) |
Returns the interrupt masked register.
This register contains a logical AND of corresponding bits from the interrupt cause and mask registers. This function is intended to be used in the interrupt service routine to identify which of enabled interrupt sources caused the interrupt event.
base | The pointer to the CORDIC instance. |
void Cy_CORDIC_Interrupt | ( | MXCORDIC_Type * | base, |
cy_stc_cordic_context_t * | context | ||
) |
CORDIC Interrupt Service Routine.
*base | The pointer to a CAN FD instance. |
context | The pointer to the context structure cy_stc_cordic_context_t allocated by the user. The structure is used during the CORDIC operation for internal configuration. The user must not modify anything in this structure. |
__STATIC_INLINE void Cy_CORDIC_RegisterCallback | ( | MXCORDIC_Type * | base, |
cy_cb_cordic_handle_events_t | callback, | ||
cy_stc_cordic_context_t * | context | ||
) |
Registers a callback function that notifies that CORDIC Callback Events occurred in the Cy_CORDIC_Interrupt.
base | The pointer to the CORDIC instance. |
callback | The pointer to a callback function. See cy_cb_cordic_handle_events_t for the function prototype. |
context | The pointer to context structure cy_stc_cordic_context_t allocated by the user. The structure is used during the CORDIC operation for internal configuration. The user should not modify anything in this structure. |