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

📄 mem1.h

📁 基于56F8346的异步电机VVVF控制程序。
💻 H
📖 第 1 页 / 共 3 页
字号:
/** ###################################################################
**     THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename  : MEM1.H
**     Project   : vvvf_56F8346
**     Processor : 56F8346
**     Beantype  : DSP_MEM
**     Version   : Bean 01.033, Driver 01.10, CPU db: 2.87.097
**     Compiler  : Metrowerks DSP C Compiler
**     Date/Time : 2008-3-7, 9:38
**     Abstract  :
**          General-purpose ANSI C-compliant memory pool manager
**
**          These routines manage a memory buffer that you specify, internally
**          called the pool. Blocks of memory are allocated from and returned
**          to this pool. The first UInt32 of every block is the size of the block
**          in bytes, inclusive. This value is positive if the block is free,
**          negative if the block is in use, and zero if this is the last block
**          of the pool.
**     Settings  :
**          Bean Name:               MEM1
**          No others properties defined.
**     Contents  :
**         memCallocEM        - void* MEM1_memCallocEM(size_t num,size_t size);
**         memCallocIM        - void* MEM1_memCallocIM(size_t num,size_t size);
**         memFreeEM          - void MEM1_memFreeEM(void* memblock);
**         memFreeIM          - void MEM1_memFreeIM(void* memblock);
**         memIsAligned       - bool MEM1_memIsAligned(void* memblock,size_t size);
**         memIsEM            - bool MEM1_memIsEM(void* memblock);
**         memIsIM            - bool MEM1_memIsIM(void* memblock);
**         memMallocAlignedEM - void* MEM1_memMallocAlignedEM(size_t size);
**         memMallocAlignedIM - void* MEM1_memMallocAlignedIM(size_t size);
**         memMallocEM        - void* MEM1_memMallocEM(size_t size);
**         memMallocIM        - void* MEM1_memMallocIM(size_t size);
**         memReallocEM       - void* MEM1_memReallocEM(void* memblock,size_t size);
**         memReallocIM       - void* MEM1_memReallocIM(void* memblock,size_t size);
**         memMemcpy          - void* MEM1_memMemcpy(void* dest,void* src,ssize_t count);
**         memMemset          - void* MEM1_memMemset(void* dest,int c,ssize_t count);
**         memMemsetP         - void* MEM1_memMemsetP(void* dest,int c,ssize_t count);
**         memCopyPtoX        - void* MEM1_memCopyPtoX(void* pDest,void* pSrc,ssize_t Count);
**         memCopyXtoP        - void* MEM1_memCopyXtoP(void* pDest,void* pSrc,ssize_t Count);
**         memCopyPtoP        - void* MEM1_memCopyPtoP(void* pDest,void* pSrc,ssize_t Count);
**         memReadP16         - UWord16 MEM1_memReadP16(UWord16 *pSrc);
**         memReadP32         - UWord32 MEM1_memReadP32(UWord32 *pSrc);
**         memWriteP16        - void MEM1_memWriteP16(UWord16 Data,Word16 *pDest);
**         memWriteP32        - void MEM1_memWriteP32(Word32 Data,Word32 *pDest);
**
**     (c) Freescale Semiconductor
**     2004 All Rights Reserved
**
**     (c) Copyright UNIS, spol. s r.o. 1997-2005
**     UNIS, spol. s r.o.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/

#ifndef __MEM1
#define __MEM1

/*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 "mem.h"
/* Include inherited beans */

#include "Cpu.h"
/* MODULE MEM1. */



                                       /* Internal memory management routines */
#define MEM1_memMallocIM(size) memMallocIM(size)
/*
** ===================================================================
**     Method      :  MEM1_memMallocIM (bean DSP_MEM)
**
**     Description :
**         The memMallocIM function allocates dynamic memory of the
**         specified size from the memory partitions. The function
**         memMallocIM first tries to allocate the memory from the
**         internal memory partition. However, if not enough space
**         exists in the internal memory partition to satisfy the
**         dynamic memory allocation, memMallocIM then tries the
**         allocation from the external memory partition. For
**         example see <Typical Usage > page.
**     Parameters  :
**         NAME            - DESCRIPTION
**         size            - The size of the memory buffer to be
**                           allocated in internal memory
**     Returns     :
**         ---             - If memory is insufficient to satisfy
**                           the request from either partition,
**                           memMallocIM returns NULL
** ===================================================================
*/

#define MEM1_memReallocIM(memblock, size) memReallocIM(memblock, size)
/*
** ===================================================================
**     Method      :  MEM1_memReallocIM (bean DSP_MEM)
**
**     Description :
**         The memReallocIM function dynamically reallocates and
**         resizes a memory buffer to the specified size from the
**         memory partitions. The function memReallocIM first tries
**         to reallocate the memory from the internal memory
**         partition. However, if not enough space exists in the
**         internal memory partition to satisfy the dynamic memory
**         allocation, memReallocIM then tries the allocation from
**         the external memory partition For example see <Typical
**         Usage > page.
**     Parameters  :
**         NAME            - DESCRIPTION
**       * memblock        - The address of the existing
**                           memory block to reallocate
**         size            - The new size to allocate
**     Returns     :
**         ---             - If memory is insufficient to satisfy
**                           the request from either partition,
**                           memReallocIM returns "NULL"
** ===================================================================
*/

#define MEM1_memCallocIM(num, size) memCallocIM(num, size)
/*
** ===================================================================
**     Method      :  MEM1_memCallocIM (bean DSP_MEM)
**
**     Description :
**         The memCallocIM function dynamically allocates an array
**         with elements initialized to zero. The memCallocIM
**         function first tries to reallocate the memory from the
**         internal memory partition. For example see <Typical Usage
**         > page.
**     Parameters  :
**         NAME            - DESCRIPTION
**         num             - Number of elements
**         size            - Length in bytes of each element
**     Returns     :
**         ---             - If memory is insufficient to satisfy
**                           the request from either partition,
**                           memCallocIM returns NULL.
** ===================================================================
*/

#define MEM1_memMallocAlignedIM(size) memMallocAlignedIM(size)
/*
** ===================================================================
**     Method      :  MEM1_memMallocAlignedIM (bean DSP_MEM)
**
**     Description :
**         The memMallocAlignedIM function allocates dynamic memory
**         of the specified size from the memory partitions and
**         aligns the memory properly to use modulo addressing. The
**         function memMallocAlignedIM first tries to allocate the
**         memory, properly aligned, from the internal memory
**         partition. However, if not enough space exists in the
**         internal memory partition to satisfy the dynamic memory
**         allocation, or if the memory request cannot be properly
**         aligned, memMallocAlignedIM then tries the allocation
**         from the external memory partition. If memMallocAlignedIM
**         cannot allocate an aligned buffer from either partition,
**         it calls memMallocIM to try to allocate a buffer of the
**         correct size without the proper alignment. For example
**         see <Typical Usage > page.
**     Parameters  :
**         NAME            - DESCRIPTION
**         size            - The size of the memory buffer to be
**                           allocated in internal memory and aligned
**                           for modulo addressing
**     Returns     :
**         ---             - If memory cannot be allocated in
**                           sufficient size to satisfy the request
**                           from either partition,
**                           memMallocAlignedIM returns NULL.
** ===================================================================
*/

#define MEM1_memFreeIM(memblock) memFreeIM(memblock)
/*
** ===================================================================
**     Method      :  MEM1_memFreeIM (bean DSP_MEM)
**
**     Description :
**         The memFreeIM function deallocates a memory block in
**         internal memory that previously had been dynamically
**         allocated with the routine memMallocIM. For example see
**         <Typical Usage > page.
**     Parameters  :
**         NAME            - DESCRIPTION
**       * memblock        - Pointer to previously
**                           allocated array
**     Returns     : Nothing
** ===================================================================
*/

#define MEM1_memIsIM(memblock) memIsIM(memblock)
/*
** ===================================================================
**     Method      :  MEM1_memIsIM (bean DSP_MEM)
**
**     Description :
**         The memIsIM function checks the address of a memory block
**         to determine whether it is in internal memory or external
**         memory. For example see <Typical Usage > page.
**     Parameters  :
**         NAME            - DESCRIPTION
**       * memblock        - The address of the memory
**                           block to be confirmed in internal memory
**     Returns     :
**         ---             - The function memIsIM returns true if
**                           the address is in internal memory;
**                           otherwise, it returns false.
** ===================================================================
*/

                                       /* External memory management routines */
#define MEM1_memMallocEM(size) memMallocEM(size);
/*
** ===================================================================
**     Method      :  MEM1_memMallocEM (bean DSP_MEM)
**
**     Description :
**         The memMallocEM function allocates dynamic memory of the
**         specified size from the memory partitions. The function
**         memMallocEM first tries to allocate the memory from the
**         external memory partition. However, if not enough space
**         exists in the external memory partition to satisfy the
**         dynamic memory allocation, memMallocEM then tries the
**         allocation from the internal memory partition. For
**         example see <Typical Usage > page.
**     Parameters  :
**         NAME            - DESCRIPTION
**         size            - The size of the memory buffer to be
**                           allocated in external memory
**     Returns     :
**         ---             - If memory is insufficient to satisfy
**                           the request from either partition,
**                           memMallocEM returns NULL
** ===================================================================
*/

#define MEM1_memReallocEM(memblock, size) memReallocEM(memblock, size)
/*
** ===================================================================
**     Method      :  MEM1_memReallocEM (bean DSP_MEM)
**
**     Description :
**         The memReallocEM function dynamically reallocates and
**         resizes a memory buffer to the specified size from the
**         memory partitions. The function memReallocEM first tries
**         to reallocate the memory from the external memory
**         partition. However, if not enough space exists in the
**         external memory partition to satisfy the dynamic memory
**         allocation, memReallocEM then tries the allocation from
**         the internal memory partition. For example see <Typical
**         Usage > page.
**     Parameters  :
**         NAME            - DESCRIPTION
**       * memblock        - The address of the existing
**                           memory block to reallocate
**         size            - The new size to allocate
**     Returns     :
**         ---             - If memory is insufficient to satisfy
**                           the request from either partition,
**                           memReallocEM returns "NULL"
** ===================================================================
*/

#define MEM1_memCallocEM(num, size) memCallocEM(num, size)
/*
** ===================================================================
**     Method      :  MEM1_memCallocEM (bean DSP_MEM)
**
**     Description :
**         The memCallocEM function dynamically allocates an array
**         with elements initialized to zero. The memCallocEM

⌨️ 快捷键说明

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