00001 00011 /* 00012 * ============================================================================ 00013 * 00014 * Copyright (c) 2008-2012, 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 /* OSAL and utils */ 00059 #include <ti/syslink/utils/_MemoryDefs.h> 00060 00061 #if defined (__cplusplus) 00062 extern "C" { 00063 #endif 00064 00069 #define MEMORYOS_MODULEID (UInt16) 0x97D2 00070 00071 /* ============================================================================= 00072 * All success and failure codes for the module 00073 * ============================================================================= 00074 */ 00079 #define MEMORYOS_STATUSCODEBASE (MEMORYOS_MODULEID << 12u) 00080 00085 #define MEMORYOS_MAKE_FAILURE(x) ((Int) (0x80000000 \ 00086 + (MEMORYOS_STATUSCODEBASE + (x)))) 00087 00091 #define MEMORYOS_MAKE_SUCCESS(x) (MEMORYOS_STATUSCODEBASE + (x)) 00092 00097 #define MEMORYOS_E_MEMORY MEMORYOS_MAKE_FAILURE(1) 00098 00103 #define MEMORYOS_E_INVALIDARG MEMORYOS_MAKE_FAILURE(2) 00104 00109 #define MEMORYOS_E_MAP MEMORYOS_MAKE_FAILURE(3) 00110 00115 #define MEMORYOS_E_UNMAP MEMORYOS_MAKE_FAILURE(4) 00116 00121 #define MEMORYOS_E_INVALIDSTATE MEMORYOS_MAKE_FAILURE(5) 00122 00127 #define MEMORYOS_E_FAIL MEMORYOS_MAKE_FAILURE(6) 00128 00133 #define MEMORYOS_S_SUCCESS MEMORYOS_MAKE_SUCCESS(0) 00134 00139 #define MEMORYOS_S_ALREADYSETUP MEMORYOS_MAKE_SUCCESS(1) 00140 00141 00142 /* ============================================================================= 00143 * Macros and types 00144 * See MemoryDefs.h 00145 * ============================================================================= 00146 */ 00147 /* ============================================================================= 00148 * APIs 00149 * ============================================================================= 00150 */ 00151 /* Maps a memory area into virtual space. */ 00152 Int MemoryOS_map (Memory_MapInfo * mapInfo); 00153 00154 /* UnMaps a memory area into virtual space. */ 00155 Int MemoryOS_unmap (Memory_UnmapInfo * unmapInfo); 00156 00157 #if defined (__cplusplus) 00158 } 00159 #endif /* defined (__cplusplus) */ 00160 00161 #endif /* ifndef _MEMORYOS_H_0x97D2 */