00001 00011 /* 00012 * ============================================================================ 00013 * 00014 * Copyright (c) 2008-2009, Texas Instruments Incorporated 00015 * 00016 * Redistribution and use in source and binary forms, with or without 00017 * modification, are permitted provided that the following conditions 00018 * are met: 00019 * 00020 * * Redistributions of source code must retain the above copyright 00021 * notice, this list of conditions and the following disclaimer. 00022 * 00023 * * Redistributions in binary form must reproduce the above copyright 00024 * notice, this list of conditions and the following disclaimer in the 00025 * documentation and/or other materials provided with the distribution. 00026 * 00027 * * Neither the name of Texas Instruments Incorporated nor the names of 00028 * its contributors may be used to endorse or promote products derived 00029 * from this software without specific prior written permission. 00030 * 00031 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00032 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00033 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00034 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00035 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00036 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00037 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00038 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00039 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00040 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00041 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00042 * Contact information for paper mail: 00043 * Texas Instruments 00044 * Post Office Box 655303 00045 * Dallas, Texas 75265 00046 * Contact information: 00047 * http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm? 00048 * DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact 00049 * ============================================================================ 00050 * 00051 */ 00052 00053 00054 00055 #ifndef MEMORYOS_H_0x97D2 00056 #define MEMORYOS_H_0x97D2 00057 00058 #include <ti/syslink/utils/MemoryDefs.h> 00059 /* OSAL and utils */ 00060 #include <ti/syslink/utils/_MemoryOS.h> 00061 00062 #if defined (__cplusplus) 00063 extern "C" { 00064 #endif 00065 00066 00067 /* ============================================================================= 00068 * Macros and types 00069 * See MemoryDefs.h 00070 * ============================================================================= 00071 */ 00072 /* ============================================================================= 00073 * APIs 00074 * ============================================================================= 00075 */ 00076 /* Initialize the memory os module. */ 00077 Int32 MemoryOS_setup (void); 00078 00079 /* Finalize the memory os module. */ 00080 Int32 MemoryOS_destroy (void); 00081 00082 /* Allocates the specified number of bytes of type specified through flags. */ 00083 Ptr MemoryOS_alloc (UInt32 size, UInt32 align, UInt32 flags); 00084 00085 /* Allocates the specified number of bytes and memory is set to zero. */ 00086 Ptr MemoryOS_calloc (UInt32 size, UInt32 align, UInt32 flags); 00087 00088 /* Frees local memory */ 00089 Void MemoryOS_free (Ptr ptr, UInt32 size, UInt32 flags); 00090 00091 /* Copies the data between memory areas. Returns the number of bytes copied. */ 00092 Ptr MemoryOS_copy (Ptr dst, Ptr src, UInt32 len); 00093 00094 /* Set the specified values to the allocated memory area */ 00095 Ptr MemoryOS_set (Ptr buf, Int value, UInt32 len); 00096 00097 /* Translate API */ 00098 Ptr MemoryOS_translate (Ptr srcAddr, Memory_XltFlags flags); 00099 00100 /* TBD: Add APIs for Memory_move, Scatter-Gather & translateAddr. */ 00101 00102 00103 #if defined (__cplusplus) 00104 } 00105 #endif /* defined (__cplusplus) */ 00106 00107 #endif /* ifndef MEMORYOS_H_0x97D2 */