ires.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2011, Texas Instruments Incorporated
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * *  Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  *
00012  * *  Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  *
00016  * *  Neither the name of Texas Instruments Incorporated nor the names of
00017  *    its contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00022  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00023  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00024  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00027  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00028  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00029  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00030  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031  * 
00032  */
00047 #ifndef IRES_
00048 #define IRES_
00049 
00052 
00053 
00054 #ifdef __cplusplus
00055 extern "C" {
00056 #endif
00057 
00058 #include "ires_common.h"
00059 
00060 typedef enum IRES_YieldResourceType {
00061     IRES_ALL = 0,                       
00064     IRES_SCRATCHMEMORY,                 
00067     IRES_SCRATCHDMA,                    
00070     IRES_RESOURCEHANDLE                 
00073 } IRES_YieldResourceType;
00074 
00075 typedef Void (*IRES_ContextSaveFxn)(IALG_Handle algHandle, Void *contextArgs);
00076 typedef Void (*IRES_ContextRestoreFxn)
00077         (IALG_Handle algHandle, Void *contextArgs);
00078 
00084 typedef struct IRES_YieldContext {
00085 
00089     IALG_Handle                algHandle;
00090 
00097     IRES_Handle                resourceHandle;
00098 
00110     IRES_ContextSaveFxn        contextSave;
00111 
00125     IRES_ContextRestoreFxn      contextRestore;
00126 
00134     Void                        *contextArgs;
00135 
00136 } IRES_YieldContext ;
00137 
00138 
00139 typedef IRES_YieldContext *IRES_YieldContextHandle;
00140 typedef Void *IRES_YieldArgs;
00141 
00159 typedef Void (*IRES_YieldFxn)(IRES_YieldResourceType resourceType,
00160     IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
00161 
00168 typedef struct IRES_Fxns {
00169 
00174     Void *implementationId;
00175 
00180     IRES_Status (*getResourceDescriptors)(IALG_Handle handle,
00181         IRES_ResourceDescriptor *resourceDescriptors);
00182 
00190     Int32 (*numResourceDescriptors)(IALG_Handle handle);
00191 
00203     IRES_Status (*initResources)(IALG_Handle handle,
00204             IRES_ResourceDescriptor * resourceDescriptor,
00205             IRES_YieldFxn yieldFxn, IRES_YieldArgs yieldArgs);
00206 
00217     IRES_Status (*reinitResources)(IALG_Handle handle,
00218             IRES_ResourceDescriptor * resourceDescriptor,
00219             IRES_YieldFxn yieldFxn, IRES_YieldArgs yieldArgs);
00220 
00225     IRES_Status (*deinitResources)(IALG_Handle handle,
00226             IRES_ResourceDescriptor * resourceDescriptor);
00227 
00237     IRES_Status (*activateResource)(IALG_Handle handle,
00238             IRES_Handle resourceHandle);
00239 
00246     IRES_Status (*activateAllResources)(IALG_Handle handle);
00247 
00254     IRES_Status (*deactivateResource)(IALG_Handle handle,
00255             IRES_Handle resourceHandle);
00256 
00263      IRES_Status (*deactivateAllResources)(IALG_Handle handle);
00264 
00265 } IRES_Fxns;
00266 
00270 #ifdef __cplusplus
00271 }
00272 #endif /* extern "C" */
00273 
00274 
00275 #endif  /* IRES_ */
00276 /*
00277  *  @(#) ti.xdais; 1, 2.0, 1,1; 12-8-2011 11:54:45; /db/wtree/library/trees/dais/dais-v03/src/ xlibrary
00278 
00279  */
00280 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2012, Texas Instruments Incorporated