opl_cpuif_test.c
浏览该文件的文档。00001 00014 #include <stdlib.h> 00015 #include <unistd.h> 00016 00017 #include <opl_typedef.h> 00021 /*--------------------------Macro definition------------------------- */ 00022 #define OPL_CPUIF_DEVICE "/dev/opl_cpuif" 00023 00024 00025 00026 00032 /*--------------------------type definition------------------------- */ 00033 00034 00035 00036 00037 00043 /*-----------------global varible/function declaration--------------- */ 00044 00050 /*-------------------local function declaration---------------------- */ 00051 00052 00053 00054 00055 00062 /*--------------local variable declaration and definition------------- */ 00063 00064 00071 /*------------------global variable and function exported-------------- */ 00072 int opl_cpuif_test_init(int *initialized); 00073 void opl_cpuif_test_main(int argc,char **argv); 00074 int opl_cpuif_test_exit(int *initialized); 00075 00076 00077 00085 /*----------------------local function definition--------------------- */ 00086 00087 00088 00089 int opl_cpuif_test_init(int *initialized) 00090 { 00091 u32 value = 0; 00092 *initialized = 1; 00093 return 0; 00094 } 00095 00096 int opl_cpuif_test_exit(int *initialized) 00097 { 00098 int ret = 0; 00099 if(*initialized){ 00100 *initialized = 0; 00101 } 00102 return ret; 00103 } 00104 00105 void opl_cpuif_test_main(int argc,char **argv) 00106 { 00107 } 00108 00109 int main(int argc,char **argv) 00110 { 00111 int initialized = 0; 00112 opl_cpuif_test_init(&initialized); 00113 if(initialized){ 00114 opl_cpuif_test_main(argc,argv); 00115 } 00116 opl_cpuif_test_exit(&initialized); 00117 } 00118 00119
Generated at Mon Jul 30 16:43:48 2007 for IPMUX1IPMUX2IPMUX3 by 1.3.9.1