www.pudn.com > PMSM.zip > DSP281x_MemCopy.c, change:2003-09-11,size:1375b


//########################################################################### 
// 
// FILE:	DSP281x_MemCopy.c 
// 
// TITLE:	Memory Copy Utility 
// 
// ASSUMPTIONS: 
// 
//           
// 
// DESCRIPTION: 
// 
//          This function will copy the specified memory contents from 
//          one location to another.  
//  
//          Uint16 *SourceAddr        Pointer to the first word to be moved 
//                                    SourceAddr < SourceEndAddr 
//          Uint16* SourceEndAddr     Pointer to the last word to be moved 
//          Uint16* DestAddr          Pointer to the first destination word 
// 
//          No checks are made for invalid memory locations or that the 
//          end address is > then the first start address. 
//  
//           
//########################################################################### 
// 
//  Ver | dd mmm yyyy | Who  | Description of changes 
// =====|=============|======|=============================================== 
//  1.00| 11 Sep 2003 | L.H. | No changes since previous version (v.58 Alpha) 
// 
//########################################################################### 
 
#include "DSP281x_Device.h" 
 
void MemCopy(Uint16 *SourceAddr, Uint16* SourceEndAddr, Uint16* DestAddr) 
{ 
    while(SourceAddr < SourceEndAddr) 
    {  
       *DestAddr++ = *SourceAddr++; 
    } 
    return; 
}