⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mfr.h

📁 用freescale公司的DSP56F8013芯片实现的PMSM的SVPWM 驱动
💻 H
📖 第 1 页 / 共 3 页
字号:
/** ###################################################################
**     THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename  : MFR.H
**     Project   : PMSM
**     Processor : 56F8013VFAE
**     Beantype  : DSP_Func_MFR
**     Version   : Bean 01.043, Driver 01.09, CPU db: 2.87.089
**     Compiler  : Metrowerks DSP C Compiler
**     Date/Time : 2008-1-24, 下午 01:45
**     Abstract  :
**          This bean encapsulates the basic math functions for both
**          16-bit and 32-bit fractional types.
**     Settings  :
**          Bean Name                      : MFR
**          Use Assembler Files            : no
**     Contents  :
**         abs_s            - Frac16 abs_s(Frac16 x);
**         add              - Frac16 add(Frac16 x,Frac16 y);
**         div_s            - Frac16 div_s(Frac16 x,Frac16 y);
**         mac_r            - Frac16 mac_r(Frac32 w,Frac16 x,Frac16 y);
**         msu_r            - Frac16 msu_r(Frac32 w,Frac16 x,Frac16 y);
**         mult             - Frac16 mult(Frac16 x,Frac16 y);
**         mult_r           - Frac16 mult_r(Frac16 x,Frac16 y);
**         negate           - Frac16 negate(Frac16 x);
**         round            - Frac16 round(Frac32 x);
**         shl              - Frac16 shl(Frac16 x,Int16 n);
**         shr              - Frac16 shr(Frac16 x,Int16 n);
**         shr_r            - Frac16 shr_r(Frac16 x,Int16 n);
**         sub              - Frac16 sub(Frac16 x,Frac16 y);
**         L_abs            - Frac32 L_abs(Frac32 x);
**         L_add            - Frac32 L_add(Frac32 x,Word32 y);
**         div_ls           - Frac16 div_ls(Frac32 x,Frac16 y);
**         L_mac            - Frac32 L_mac(Frac32 w,Frac16 x,Frac16 y);
**         L_msu            - Frac32 L_msu(Frac32 w,Frac16 x,Frac16 y);
**         L_mult           - Frac32 L_mult(Frac16 x,Frac16 y);
**         L_mult_ls        - Frac32 L_mult_ls(Frac32 x,Frac16 y);
**         L_negate         - Frac32 L_negate(Frac32 x);
**         L_shl            - Frac32 L_shl(Frac32 x,Int16 n);
**         L_shr            - Frac32 L_shr(Frac32 x,Int16 n);
**         L_shr_r          - Frac32 L_shr_r(Frac32 x,Int16 n);
**         L_deposit_h      - Frac32 L_deposit_h(Frac16 x);
**         L_deposit_l      - Frac32 L_deposit_l(Frac16 x);
**         L_sub            - Frac32 L_sub(Frac32 x,Frac32 y);
**         extract_h        - Frac16 extract_h(Frac32 x);
**         extract_l        - Frac16 extract_l(Frac32 x);
**         norm_s           - Int16 norm_s(Frac16 x);
**         norm_l           - Int16 norm_l(Frac32 x);
**         mfr16Rand        - Frac16 mfr16Rand(void);
**         mfr16SetRandSeed - void mfr16SetRandSeed(Frac16 x);
**         mfr16Sqrt        - Frac16 mfr16Sqrt(Frac16 x);
**         mfr32Sqrt        - Frac16 mfr32Sqrt(Frac32 x);
**
**     (c) Freescale Semiconductor
**     2004 All Rights Reserved
**
**     (c) Copyright UNIS, spol. s r.o. 1997-2006
**     UNIS, spol. s r.o.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/

#ifndef __MFR
#define __MFR

/* MODULE MFR. */

/*Include shared modules, which are used for whole project*/
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
/* Include inherited beans */
#include "Port.h"
#include "Prototype.h"
#include "dspfunc.h"
#define MFR_mfr16Rand mfr16Rand
#define mfr16SetRandSeed MFR_mfr16SetRandSeed
#define MFR_mfr16Sqrt mfr16Sqrt
#define MFR_mfr32Sqrt mfr32Sqrt
#include "Cpu.h"



Frac16 mfr16Rand(void);
/*
** ===================================================================
**     Method      :  MFR_mfr16Rand (bean DSP_Func_MFR)
**
**     Description :
**         The rand function calculates a pseudo-random number. 
**     Parameters  : None
**     Returns     :
**         ---             - The rand function returns the
**                           pseudo-random number calculated.
** ===================================================================
*/

void MFR_mfr16SetRandSeed(Frac16 x);
/*
** ===================================================================
**     Method      :  MFR_mfr16SetRandSeed (bean DSP_Func_MFR)
**
**     Description :
**         The randseed function sets the random number seed used by
**         the pseudo-random number generation algorithm.
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - The input data value to be used as the
**                           random number seed.
**     Returns     : Nothing
** ===================================================================
*/

Frac16 mfr16Sqrt(Frac16 x);
/*
** ===================================================================
**     Method      :  MFR_mfr16Sqrt (bean DSP_Func_MFR)
**
**     Description :
**         The sqrt function calculates the square root of the
**         fractional input data value.
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - The input data value.
**     Returns     :
**         ---             - The sqrt function returns the result of
**                           the square root calculation.
** ===================================================================
*/

Frac16 mfr32Sqrt(Frac32 x);
/*
** ===================================================================
**     Method      :  MFR_mfr32Sqrt (bean DSP_Func_MFR)
**
**     Description :
**         The sqrt function calculates the square root of the
**         fractional input data value.
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - The input data value.
**     Returns     :
**         ---             - The sqrt function returns the result of
**                           the square root calculation.
** ===================================================================
*/

//Frac16 MFR_abs_s(Frac16 x);
/*
** ===================================================================
**     Method      :  MFR_abs_s (bean DSP_Func_MFR)
**
**     This method can be used also under name "abs_s"
**
**     Description :
**         The abs_s function calculates the 16-bit absolute value
**         of the input value.
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - The input data value.
**     Returns     :
**         ---             - The abs function returns the result of
**                           the 16-bit absolute value calculation.
** ===================================================================
*/

//Frac32 MFR_L_abs(Frac32 x);
/*
** ===================================================================
**     Method      :  MFR_L_abs (bean DSP_Func_MFR)
**
**     This method can be used also under name "L_abs"
**
**     Description :
**         The L_abs function calculates the 32-bit absolute value
**         of the input value.
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - The input data value.
**     Returns     :
**         ---             - The L_abs function returns the result
**                           of the 32-bit absolute value calculation.
** ===================================================================
*/

//Frac16 MFR_add(Frac16 x,Frac16 y);
/*
** ===================================================================
**     Method      :  MFR_add (bean DSP_Func_MFR)
**
**     This method can be used also under name "add"
**
**     Description :
**         The add function adds two 16-bit fractional numbers (x +
**         y).
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - The first input value.
**         y               - The second input value.
**     Returns     :
**         ---             - The add function returns the 16-bit
**                           results of the addition.
** ===================================================================
*/

//Frac32 MFR_L_add(Frac32 x,Word32 y);
/*
** ===================================================================
**     Method      :  MFR_L_add (bean DSP_Func_MFR)
**
**     This method can be used also under name "L_add"
**
**     Description :
**         The add function adds two 32-bit fractional numbers (x +
**         y).
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - The first input value.
**         y               - The second input value.
**     Returns     :
**         ---             - The add function returns the 32-bit
**                           results of the addition.
** ===================================================================
*/

//Frac16 MFR_div_s(Frac16 x,Frac16 y);
/*
** ===================================================================
**     Method      :  MFR_div_s (bean DSP_Func_MFR)
**
**     This method can be used also under name "div_s"
**
**     Description :
**         The div_s function divides two fractional numbers (x / y);
**         x and y must be positive and y must be greater than or
**         equal to x.
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - The dividend of the division.
**         y               - The divisor for the division.
**     Returns     :
**         ---             - The div_s function returns the quotient
**                           of the division calculation.
** ===================================================================
*/

//Frac16 MFR_div_ls(Frac32 x,Frac16 y);
/*
** ===================================================================
**     Method      :  MFR_div_ls (bean DSP_Func_MFR)
**
**     This method can be used also under name "div_ls"
**
**     Description :
**         The div_ls function divides two fractional numbers (x / y);
**         x and y must be positive and y must be greater than or
**         equal to x.
**     Parameters  :
**         NAME            - DESCRIPTION
**         x               - The dividend of the division.
**         y               - The divisor for the division.
**     Returns     :
**         ---             - The div_ls function returns the
**                           quotient of the division calculation.
** ===================================================================
*/

//Frac32 MFR_L_shr_r(Frac32 x,Int16 n);
/*
** ===================================================================
**     Method      :  MFR_L_shr_r (bean DSP_Func_MFR)
**
**     This method can be used also under name "L_shr_r"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -