00001 #include <stdio.h> 00002 #include "CommonWithDsp/registerIndices.h" 00003 00004 #define func(name) printf(" {0x%x,\t\"%s\"},\n", name, #name) 00005 00006 int main() { 00007 printf("struct regIds { int id; char *name; };\n"); 00008 printf("struct regIds regNames[] = {\n"); 00009 func(RRIF_CODE_VERSION); 00010 func(RRIF_CMND_0); 00011 func(RRIF_CMND_1); 00012 func(RRIF_STATUS_0); 00013 func(RRIF_STATUS_1); 00014 func(FE_CMND_MASK_0_LO); 00015 func(FE_CMND_MASK_0_HI); 00016 func(FE_CMND_MASK_1_LO); 00017 func(FE_CMND_MASK_1_HI); 00018 for(int fmt=0; fmt<8; fmt++) { 00019 for(int link=0; link<12; link++) { 00020 func(FMT_LINK_OCC_CNT(fmt, link)); 00021 } 00022 } 00023 printf(" // End of registers\n"); 00024 printf(" {-1,\t\"\"}\n};\n"); 00025 00026 return 0; 00027 } 00028