00001 /* 00002 * Copyright (c) 2009, 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 */ 00033 /* 00034 * ======== ladclient.h ======== 00035 */ 00036 00050 #ifndef ti_dsplink_utils_ladclient_ 00051 #define ti_dsplink_utils_ladclient_ 00052 00053 #ifdef __cplusplus 00054 extern "C" { 00055 #endif 00056 00059 00060 /* limits */ 00061 #define LAD_MAXLENGTHIMAGENAME 512 00062 #define LAD_MAXLENGTHCONFIGNAME 32 00064 /* LAD return codes */ 00065 typedef enum { 00066 LAD_SUCCESS = 0, 00067 LAD_FAILURE, 00068 LAD_INVALIDARG, 00069 LAD_ACCESSDENIED, 00070 LAD_ALREADYRUNNING, 00071 LAD_STILLRUNNING, 00072 LAD_IOFAILURE, 00073 LAD_NOTCONNECTED, 00074 LAD_INVALIDVERSION 00075 } LAD_Status; 00076 00077 /* DSP states */ 00078 typedef enum { 00079 LAD_UNKNOWN = 0, 00080 LAD_SETUP, 00081 LAD_LOADED, 00082 LAD_STARTED, 00083 LAD_STOPPED, 00084 LAD_IDLE, 00085 LAD_RESET, 00086 LAD_UNAVAILABLE 00087 } LAD_DspState; 00088 00089 typedef Uns LAD_ClientHandle; 00091 typedef struct LAD_DspStatus { 00092 LAD_DspState dspState; 00093 Char linkConfigName[LAD_MAXLENGTHCONFIGNAME]; 00094 Int numClientsStarted; 00095 Char imageName[LAD_MAXLENGTHIMAGENAME]; 00096 } LAD_DspStatus; 00097 00098 00099 /* 00100 * ======== LAD_connect ======== 00101 */ 00122 extern LAD_Status LAD_connect(LAD_ClientHandle * handle); 00123 00124 /* 00125 * ======== LAD_disconnect ======== 00126 */ 00145 extern LAD_Status LAD_disconnect(LAD_ClientHandle handle); 00146 00147 /* 00148 * ======== LAD_getDspStatus ======== 00149 */ 00169 extern LAD_Status LAD_getDspStatus(LAD_ClientHandle handle, Int cpuId, 00170 LAD_DspStatus * statusInfo); 00171 00172 /* 00173 * ======== LAD_releaseDsp ======== 00174 */ 00195 extern LAD_Status LAD_releaseDsp(LAD_ClientHandle handle); 00196 00197 /* 00198 * ======== LAD_startupDsp ======== 00199 */ 00230 extern LAD_Status LAD_startupDsp(LAD_ClientHandle handle, Int cpuId, 00231 String linkConfigName, String imageName); 00232 /* ingroup */ 00234 00235 #ifdef __cplusplus 00236 } 00237 #endif 00238 00239 #endif 00240 /* 00241 * @(#) ti.dsplink.utils.ladclient; 1, 0, 0,194; 11-18-2009 14:10:36; /db/atree/library/trees/ce/ce-o05x/src/ 00242 */ 00243