![]() |
![]() |
00001 00012 /* 00013 * ============================================================================ 00014 * 00015 * Copyright (c) 2008-2012, Texas Instruments Incorporated 00016 * 00017 * Redistribution and use in source and binary forms, with or without 00018 * modification, are permitted provided that the following conditions 00019 * are met: 00020 * 00021 * * Redistributions of source code must retain the above copyright 00022 * notice, this list of conditions and the following disclaimer. 00023 * 00024 * * Redistributions in binary form must reproduce the above copyright 00025 * notice, this list of conditions and the following disclaimer in the 00026 * documentation and/or other materials provided with the distribution. 00027 * 00028 * * Neither the name of Texas Instruments Incorporated nor the names of 00029 * its contributors may be used to endorse or promote products derived 00030 * from this software without specific prior written permission. 00031 * 00032 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00033 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00034 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00035 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00036 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00037 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00038 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00039 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00040 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00041 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00042 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00043 * Contact information for paper mail: 00044 * Texas Instruments 00045 * Post Office Box 655303 00046 * Dallas, Texas 75265 00047 * Contact information: 00048 * http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm? 00049 * DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact 00050 * ============================================================================ 00051 * 00052 */ 00053 00054 00055 00056 #ifndef RINGIOSHM_H_ 00057 #define RINGIOSHM_H_ 00058 00059 #include <ti/ipc/GateMP.h> 00060 #include <ti/syslink/RingIO.h> 00061 00062 #if defined (__cplusplus) 00063 extern "C" { 00064 #endif 00065 /* ============================================================================= 00066 * All success and failure codes for the module 00067 * ============================================================================= 00068 */ 00069 00074 #define RingIOShm_MODULEID (0x3bff) 00075 00076 /* ============================================================================= 00077 * All success and failure codes for the module 00078 * ============================================================================= 00079 */ 00080 00085 #define RingIOShm_E_INVALIDARG RingIO_E_INVALIDARG 00086 00091 #define RingIOShm_E_INVALIDSTATE RingIO_E_INVALIDSTATE 00092 00097 #define RingIOShm_E_BADVERSION RingIO_E_BADVERSION 00098 00103 #define RingIOShm_E_FAIL RingIO_E_FAIL 00104 00109 #define RingIOShm_E_MEMORY RingIO_E_MEMORY 00110 00115 #define RingIOShm_E_OSFAILURE RingIO_E_OSFAILURE 00116 00122 #define RingIOShm_E_BUFWRAP RingIO_E_BUFWRAP 00123 00128 #define RingIOShm_E_BUFEMPTY RingIO_E_BUFEMPTY 00129 00134 #define RingIOShm_E_BUFFULL RingIO_E_BUFFULL 00135 00141 #define RingIOShm_E_PENDINGDATA RingIO_E_PENDINGDATA 00142 00148 #define RingIOShm_E_VARIABLEATTRIBUTE RingIO_E_VARIABLEATTRIBUTE 00149 00154 #define RingIOShm_E_WRONGSTATE RingIO_E_WRONGSTATE 00155 00160 #define RingIOShm_E_INVALIDPROCID RingIO_E_INVALIDPROCID 00161 00165 #define RingIOShm_E_INVALIDCONTEXT RingIO_E_INVALIDCONTEXT 00166 00171 #define RingIOShm_S_SUCCESS RingIO_S_SUCCESS 00172 00177 #define RingIOShm_S_ALREADYSETUP RingIO_S_ALREADYSETUP 00178 00187 #define RingIOShm_S_PENDINGATTRIBUTE RingIO_S_PENDINGATTRIBUTE 00188 00189 00190 /* ============================================================================= 00191 * Structures & Enums 00192 * ============================================================================= 00193 */ 00198 typedef struct RingIOShm_Params_Tag { 00199 RingIO_Params commonParams; 00201 UInt16 ctrlRegionId; 00208 UInt16 dataRegionId; 00215 UInt16 attrRegionId; 00222 Ptr ctrlSharedAddr; 00228 Ptr dataSharedAddr; 00234 UInt32 dataSharedAddrSize; 00236 UInt32 footBufSize; 00238 Ptr attrSharedAddr; 00243 UInt32 attrSharedAddrSize; 00245 GateMP_Handle gateHandle; 00250 GateMP_LocalProtect localProtect; 00252 GateMP_RemoteProtect remoteProtect; 00254 UInt16 remoteProcId; 00256 } RingIOShm_Params; 00257 00258 /* ============================================================================= 00259 * APIs 00260 * ============================================================================= 00261 */ 00278 Void RingIOShm_Params_init (Void * params); 00279 00280 #if defined (__cplusplus) 00281 } 00282 #endif /* defined (__cplusplus) */ 00283 00284 00285 #endif /* RINGIOSHM_H_ */