typedef char *va_list; typedef unsigned size_t; typedef struct { int fd; unsigned char* buf; unsigned char* pos; unsigned char* bufend; unsigned char* buff_stop; unsigned int flags; } FILE; typedef long fpos_t; extern FILE _ftable[10]; extern char _tmpnams[10][16]; extern int remove(const char *_file); extern int rename(const char *_old, const char *_new); extern FILE *tmpfile(void); extern char *tmpnam(char *_s); extern int fclose(FILE *_fp); extern FILE *fopen(const char *_fname, const char *_mode); extern FILE *freopen(const char *_fname, const char *_mode, register FILE *_fp); extern void setbuf(register FILE *_fp, char *_buf); extern int setvbuf(register FILE *_fp, register char *_buf, register int _type, register size_t _size); extern int fflush(register FILE *_fp); extern int fprintf(FILE *_fp, const char *_format, ...) ; extern int fscanf(FILE *_fp, const char *_fmt, ...) ; extern int printf(const char *_format, ...) ; extern int scanf(const char *_fmt, ...) ; extern int sprintf(char *_string, const char *_format, ...) ; extern int snprintf(char *_string, size_t _n, const char *_format, ...) ; extern int sscanf(const char *_str, const char *_fmt, ...) ; extern int vfprintf(FILE *_fp, const char *_format, va_list _ap) ; extern int vprintf(const char *_format, va_list _ap) ; extern int vsprintf(char *_string, const char *_format, va_list _ap) ; extern int vsnprintf(char *_string, size_t _n, const char *_format, va_list _ap) ; extern int fgetc(register FILE *_fp); extern char *fgets(char *_ptr, register int _size, register FILE *_fp); extern int fputc(int _c, register FILE *_fp); extern int fputs(const char *_ptr, register FILE *_fp); extern int getc(FILE *_p); extern int getchar(void); extern char *gets(char *_ptr); extern int putc(int _x, FILE *_fp); extern int putchar(int _x); extern int puts(const char *_ptr); extern int ungetc(int _c, register FILE *_fp); extern size_t fread(void *_ptr, size_t _size, size_t _count, FILE *_fp); extern size_t fwrite(const void *_ptr, size_t _size, size_t _count, register FILE *_fp); extern int fgetpos(FILE *_fp, fpos_t *_pos); extern int fseek(register FILE *_fp, long _offset, int _ptrname); extern int fsetpos(FILE *_fp, const fpos_t *_pos); extern long ftell(FILE *_fp); extern void rewind(register FILE *_fp); extern void clearerr(FILE *_fp); extern int feof(FILE *_fp); extern int ferror(FILE *_fp); extern void perror(const char *_s); typedef int Bool; typedef int Int; typedef unsigned int Uns; typedef char Char; typedef char * String; typedef void * Ptr; typedef unsigned long Uint32; typedef unsigned short Uint16; typedef unsigned char Uint8; typedef long Int32; typedef short Int16; typedef char Int8; typedef struct { volatile Uint16 EBSR; volatile Uint16 RSVD0; volatile Uint16 PCGCR1; volatile Uint16 PCGCR2; volatile Uint16 PSRCR; volatile Uint16 PRCR; volatile Uint16 RSVD1[14]; volatile Uint16 TIAFR; volatile Uint16 RSVD2; volatile Uint16 ODSCR; volatile Uint16 PDINHIBR1; volatile Uint16 PDINHIBR2; volatile Uint16 PDINHIBR3; volatile Uint16 DMA0CESR1; volatile Uint16 DMA0CESR2; volatile Uint16 DMA1CESR1; volatile Uint16 DMA1CESR2; volatile Uint16 SDRAMCCR; volatile Uint16 CCR2; volatile Uint16 CGCR1; volatile Uint16 CGICR; volatile Uint16 CGCR2; volatile Uint16 CGOCR; volatile Uint16 CCSSR; volatile Uint16 RSVD3; volatile Uint16 ECDR; volatile Uint16 RSVD4; volatile Uint16 RAMSLPMDCNTLR1; volatile Uint16 RSVD5; volatile Uint16 RAMSLPMDCNTLR2; volatile Uint16 RAMSLPMDCNTLR3; volatile Uint16 RAMSLPMDCNTLR4; volatile Uint16 RAMSLPMDCNTLR5; volatile Uint16 RSVD6[2]; volatile Uint16 DMAIFR; volatile Uint16 DMAIER; volatile Uint16 USBSCR; volatile Uint16 ESCR; volatile Uint16 RSVD7[2]; volatile Uint16 DMA2CESR1; volatile Uint16 DMA2CESR2; volatile Uint16 DMA3CESR1; volatile Uint16 DMA3CESR2; volatile Uint16 CLKSTOP; volatile Uint16 RSVD8[5]; volatile Uint16 DIEIDR0; volatile Uint16 DIEIDR1; volatile Uint16 DIEIDR2; volatile Uint16 DIEIDR3; volatile Uint16 DIEIDR4; volatile Uint16 DIEIDR5; volatile Uint16 DIEIDR6; volatile Uint16 DIEIDR7; } CSL_SysRegs; typedef struct { volatile Uint16 IER0; volatile Uint16 IFR0; volatile Uint16 ST0_55; volatile Uint16 ST1_55; volatile Uint16 ST3_55; volatile Uint16 RSVD0[64]; volatile Uint16 IER1; volatile Uint16 IFR1; volatile Uint16 RSVD1[2]; volatile Uint16 IVPD; volatile Uint16 IVPH; volatile Uint16 ST2_55; } CSL_CpuRegs; typedef struct { volatile Uint16 ICOAR; volatile Uint16 RSVD0[3]; volatile Uint16 ICIMR; volatile Uint16 RSVD1[3]; volatile Uint16 ICSTR; volatile Uint16 RSVD2[3]; volatile Uint16 ICCLKL; volatile Uint16 RSVD3[3]; volatile Uint16 ICCLKH; volatile Uint16 RSVD4[3]; volatile Uint16 ICCNT; volatile Uint16 RSVD5[3]; volatile Uint16 ICDRR; volatile Uint16 RSVD6[3]; volatile Uint16 ICSAR; volatile Uint16 RSVD7[3]; volatile Uint16 ICDXR; volatile Uint16 RSVD8[3]; volatile Uint16 ICMDR; volatile Uint16 RSVD9[3]; volatile Uint16 ICIVR; volatile Uint16 RSVD10[3]; volatile Uint16 ICEMDR; volatile Uint16 RSVD11[3]; volatile Uint16 ICPSC; volatile Uint16 RSVD12[3]; volatile Uint16 ICPID1; volatile Uint16 RSVD13[3]; volatile Uint16 ICPID2; } CSL_I2cRegs; typedef struct { volatile Uint16 I2SSCTRL; volatile Uint16 RSVD0[3]; volatile Uint16 I2SSRATE; volatile Uint16 RSVD1[3]; volatile Uint16 I2STXLT0; volatile Uint16 I2STXLT1; volatile Uint16 RSVD2[2]; volatile Uint16 I2STXRT0; volatile Uint16 I2STXRT1; volatile Uint16 RSVD3[2]; volatile Uint16 I2SINTFL; volatile Uint16 RSVD4[3]; volatile Uint16 I2SINTMASK; volatile Uint16 RSVD5[19]; volatile Uint16 I2SRXLT0; volatile Uint16 I2SRXLT1; volatile Uint16 RSVD6[2]; volatile Uint16 I2SRXRT0; volatile Uint16 I2SRXRT1; } CSL_I2sRegs; typedef struct { volatile Uint16 REV; volatile Uint16 STATUS; volatile Uint16 RSVD0[2]; volatile Uint16 AWCCR1; volatile Uint16 AWCCR2; volatile Uint16 RSVD1[2]; volatile Uint16 SDCR1; volatile Uint16 SDCR2; volatile Uint16 RSVD2[2]; volatile Uint16 SDRCR; volatile Uint16 RSVD3[3]; volatile Uint16 ACS2CR1; volatile Uint16 ACS2CR2; volatile Uint16 RSVD4[2]; volatile Uint16 ACS3CR1; volatile Uint16 ACS3CR2; volatile Uint16 RSVD5[2]; volatile Uint16 ACS4CR1; volatile Uint16 ACS4CR2; volatile Uint16 RSVD6[2]; volatile Uint16 ACS5CR1; volatile Uint16 ACS5CR2; volatile Uint16 RSVD7[2]; volatile Uint16 SDTIMR1; volatile Uint16 RSVD8[27]; volatile Uint16 SDSRETR; volatile Uint16 RSVD9[3]; volatile Uint16 EIRR; volatile Uint16 RSVD10[3]; volatile Uint16 EIMR; volatile Uint16 RSVD11[3]; volatile Uint16 EIMSR; volatile Uint16 RSVD12[3]; volatile Uint16 EIMCR; volatile Uint16 RSVD13[19]; volatile Uint16 NANDFCR; volatile Uint16 RSVD14[3]; volatile Uint16 NANDFSR1; volatile Uint16 NANDFSR2; volatile Uint16 RSVD15[2]; volatile Uint16 PAGEMODCTRL1; volatile Uint16 PAGEMODCTRL2; volatile Uint16 RSVD16[6]; volatile Uint16 NCS2ECC1; volatile Uint16 NCS2ECC2; volatile Uint16 RSVD17[2]; volatile Uint16 NCS3ECC1; volatile Uint16 NCS3ECC2; volatile Uint16 RSVD18[2]; volatile Uint16 NCS4ECC1; volatile Uint16 NCS4ECC2; volatile Uint16 RSVD19[2]; volatile Uint16 NCS5ECC1; volatile Uint16 NCS5ECC2; volatile Uint16 RSVD20[62]; volatile Uint16 NAND4BITECCLOAD; volatile Uint16 RSVD21[3]; volatile Uint16 NAND4BITECC1; volatile Uint16 NAND4BITECC2; volatile Uint16 RSVD22[2]; volatile Uint16 NAND4BITECC3; volatile Uint16 NAND4BITECC4; volatile Uint16 RSVD23[2]; volatile Uint16 NAND4BITECC5; volatile Uint16 NAND4BITECC6; volatile Uint16 RSVD24[2]; volatile Uint16 NAND4BITECC7; volatile Uint16 NAND4BITECC8; volatile Uint16 RSVD25[2]; volatile Uint16 NANDERRADD1; volatile Uint16 NANDERRADD2; volatile Uint16 RSVD26[2]; volatile Uint16 NANDERRADD3; volatile Uint16 NANDERRADD4; volatile Uint16 RSVD27[2]; volatile Uint16 NANDERRVAL1; volatile Uint16 NANDERRVAL2; volatile Uint16 RSVD28[2]; volatile Uint16 NANDERRVAL3; volatile Uint16 NANDERRVAL4; } CSL_EmifRegs; typedef struct { volatile Uint16 THR; volatile Uint16 RSVD0; volatile Uint16 IER; volatile Uint16 RSVD1; volatile Uint16 FCR; volatile Uint16 RSVD2; volatile Uint16 LCR; volatile Uint16 RSVD3; volatile Uint16 MCR; volatile Uint16 RSVD4; volatile Uint16 LSR; volatile Uint16 RSVD5[3]; volatile Uint16 SCR; volatile Uint16 RSVD6; volatile Uint16 DLL; volatile Uint16 RSVD7; volatile Uint16 DLH; volatile Uint16 RSVD8[5]; volatile Uint16 PWREMU_MGMT; } CSL_UartRegs; typedef struct { volatile Uint16 SPICDR; volatile Uint16 SPICCR; volatile Uint16 SPIDCR1; volatile Uint16 SPIDCR2; volatile Uint16 SPICMD1; volatile Uint16 SPICMD2; volatile Uint16 SPISTAT1; volatile Uint16 SPISTAT2; volatile Uint16 SPIDR1; volatile Uint16 SPIDR2; } CSL_SpiRegs; typedef struct { volatile Uint16 MMCCTL; volatile Uint16 RSVD0[3]; volatile Uint16 MMCCLK; volatile Uint16 RSVD1[3]; volatile Uint16 MMCST0; volatile Uint16 RSVD2[3]; volatile Uint16 MMCST1; volatile Uint16 RSVD3[3]; volatile Uint16 MMCIM; volatile Uint16 RSVD4[3]; volatile Uint16 MMCTOR; volatile Uint16 RSVD5[3]; volatile Uint16 MMCTOD; volatile Uint16 RSVD6[3]; volatile Uint16 MMCBLEN; volatile Uint16 RSVD7[3]; volatile Uint16 MMCNBLK; volatile Uint16 RSVD8[3]; volatile Uint16 MMCNBLC; volatile Uint16 RSVD9[3]; volatile Uint16 MMCDRR1; volatile Uint16 MMCDRR2; volatile Uint16 RSVD10[2]; volatile Uint16 MMCDXR1; volatile Uint16 MMCDXR2; volatile Uint16 RSVD11[2]; volatile Uint16 MMCCMD1; volatile Uint16 MMCCMD2; volatile Uint16 RSVD12[2]; volatile Uint16 MMCARG1; volatile Uint16 MMCARG2; volatile Uint16 RSVD13[2]; volatile Uint16 MMCRSP0; volatile Uint16 MMCRSP1; volatile Uint16 RSVD14[2]; volatile Uint16 MMCRSP2; volatile Uint16 MMCRSP3; volatile Uint16 RSVD15[2]; volatile Uint16 MMCRSP4; volatile Uint16 MMCRSP5; volatile Uint16 RSVD16[2]; volatile Uint16 MMCRSP6; volatile Uint16 MMCRSP7; volatile Uint16 RSVD17[2]; volatile Uint16 MMCDRSP; volatile Uint16 RSVD18[7]; volatile Uint16 MMCCIDX; volatile Uint16 RSVD19[19]; volatile Uint16 SDIOCTL; volatile Uint16 RSVD20[3]; volatile Uint16 SDIOST0; volatile Uint16 RSVD21[3]; volatile Uint16 SDIOIEN; volatile Uint16 RSVD22[3]; volatile Uint16 SDIOIST; volatile Uint16 RSVD23[3]; volatile Uint16 MMCFIFOCTL; } CSL_MmcsdRegs; typedef struct { volatile Uint16 LCDREVMIN; volatile Uint16 LCDREVMAJ; volatile Uint16 RSVD0[2]; volatile Uint16 LCDCR; volatile Uint16 RSVD1[3]; volatile Uint16 LCDSR; volatile Uint16 RSVD2[3]; volatile Uint16 LCDLIDDCR; volatile Uint16 RSVD3[3]; volatile Uint16 LCDLIDDCS0CONFIG0; volatile Uint16 LCDLIDDCS0CONFIG1; volatile Uint16 RSVD4[2]; volatile Uint16 LCDLIDDCS0ADDR; volatile Uint16 RSVD5[3]; volatile Uint16 LCDLIDDCS0DATA; volatile Uint16 RSVD6[3]; volatile Uint16 LCDLIDDCS1CONFIG0; volatile Uint16 LCDLIDDCS1CONFIG1; volatile Uint16 RSVD7[2]; volatile Uint16 LCDLIDDCS1ADDR; volatile Uint16 RSVD8[3]; volatile Uint16 LCDLIDDCS1DATA; volatile Uint16 RSVD9[27]; volatile Uint16 LCDDMACR; volatile Uint16 RSVD10[3]; volatile Uint16 LCDDMAFB0BAR0; volatile Uint16 LCDDMAFB0BAR1; volatile Uint16 RSVD11[2]; volatile Uint16 LCDDMAFB0CAR0; volatile Uint16 LCDDMAFB0CAR1; volatile Uint16 RSVD12[2]; volatile Uint16 LCDDMAFB1BAR0; volatile Uint16 LCDDMAFB1BAR1; volatile Uint16 RSVD13[2]; volatile Uint16 LCDDMAFB1CAR0; volatile Uint16 LCDDMAFB1CAR1; } CSL_LcdcRegs; typedef struct { volatile Uint16 RTCINTEN; volatile Uint16 RTCUPDATE; volatile Uint16 RSVD0[2]; volatile Uint16 RTCMIL; volatile Uint16 RTCMILA; volatile Uint16 RSVD1[2]; volatile Uint16 RTCSEC; volatile Uint16 RTCSECA; volatile Uint16 RSVD2[2]; volatile Uint16 RTCMIN; volatile Uint16 RTCMINA; volatile Uint16 RSVD3[2]; volatile Uint16 RTCHOUR; volatile Uint16 RTCHOURA; volatile Uint16 RSVD4[2]; volatile Uint16 RTCDAY; volatile Uint16 RTCDAYA; volatile Uint16 RSVD5[2]; volatile Uint16 RTCMONTH; volatile Uint16 RTCMONTHA; volatile Uint16 RSVD6[2]; volatile Uint16 RTCYEAR; volatile Uint16 RTCYEARA; volatile Uint16 RSVD7[2]; volatile Uint16 RTCINTFL; volatile Uint16 RTCNOPWR; volatile Uint16 RSVD8[2]; volatile Uint16 RTCINTREG; volatile Uint16 RSVD9[3]; volatile Uint16 RTCDRIFT; volatile Uint16 RSVD10[3]; volatile Uint16 RTCOSC; volatile Uint16 RSVD11[3]; volatile Uint16 RTCPMGT; volatile Uint16 RSVD12[47]; volatile Uint16 RTCSCR1; volatile Uint16 RTCSCR2; volatile Uint16 RSVD13[2]; volatile Uint16 RTCSCR3; volatile Uint16 RTCSCR4; } CSL_RtcRegs; typedef struct { volatile Uint16 DMACH0SSAL; volatile Uint16 DMACH0SSAU; volatile Uint16 DMACH0DSAL; volatile Uint16 DMACH0DSAU; volatile Uint16 DMACH0TCR1; volatile Uint16 DMACH0TCR2; volatile Uint16 RSVD0[26]; volatile Uint16 DMACH1SSAL; volatile Uint16 DMACH1SSAU; volatile Uint16 DMACH1DSAL; volatile Uint16 DMACH1DSAU; volatile Uint16 DMACH1TCR1; volatile Uint16 DMACH1TCR2; volatile Uint16 RSVD1[26]; volatile Uint16 DMACH2SSAL; volatile Uint16 DMACH2SSAU; volatile Uint16 DMACH2DSAL; volatile Uint16 DMACH2DSAU; volatile Uint16 DMACH2TCR1; volatile Uint16 DMACH2TCR2; volatile Uint16 RSVD2[26]; volatile Uint16 DMACH3SSAL; volatile Uint16 DMACH3SSAU; volatile Uint16 DMACH3DSAL; volatile Uint16 DMACH3DSAU; volatile Uint16 DMACH3TCR1; volatile Uint16 DMACH3TCR2; } CSL_DmaRegs; typedef struct { volatile Uint16 RSVD0[4]; volatile Uint16 USBLDOCNTL; volatile Uint16 RSVD1[13]; volatile Uint16 SARCTRL; volatile Uint16 RSVD2; volatile Uint16 SARDATA; volatile Uint16 RSVD3; volatile Uint16 SARCLKCTRL; volatile Uint16 RSVD4; volatile Uint16 SARPINCTRL; volatile Uint16 RSVD5; volatile Uint16 SARGPOCTRL; } CSL_AnactrlRegs; typedef struct { volatile Uint16 TXFUNCADDR; volatile Uint16 TXHUBADDR_TXHUBPORT; volatile Uint16 RSVD0[2]; volatile Uint16 RXFUNCADDR; volatile Uint16 RXHUBADDR_RXHUBPORT; volatile Uint16 RSVD36[2]; } CSL_UsbEptrgRegs; typedef struct { volatile Uint16 TXMAXP; volatile Uint16 PERI_TXCSR; volatile Uint16 RSVD0[2]; volatile Uint16 RXMAXP; volatile Uint16 PERI_RXCSR; volatile Uint16 RSVD1[2]; volatile Uint16 RXCOUNT; volatile Uint16 RSVD41[7]; } CSL_UsbEpcsrRegs; typedef struct { volatile Uint16 TXGCR1; volatile Uint16 TXGCR2; volatile Uint16 RSVD0[6]; volatile Uint16 RXGCR1; volatile Uint16 RXGCR2; volatile Uint16 RSVD1[2]; volatile Uint16 RXHPCR1A; volatile Uint16 RXHPCR2A; volatile Uint16 RSVD2[2]; volatile Uint16 RXHPCR1B; volatile Uint16 RXHPCR2B; volatile Uint16 RSVD46[14]; } CSL_UsbChannelRegs; typedef struct { volatile Uint16 ENTRYLSW; volatile Uint16 ENTRYMSW; volatile Uint16 RSVD49[2]; } CSL_UsbCdmaschetblwordRegs; typedef struct { volatile Uint16 QMEMRBASE1; volatile Uint16 QMEMRBASE2; volatile Uint16 RSVD0[2]; volatile Uint16 QMEMRCTRL1; volatile Uint16 QMEMRCTRL2; volatile Uint16 RSVD63[10]; } CSL_UsbQmmemregrRegs; typedef struct { volatile Uint16 RSVD0[12]; volatile Uint16 CTRL1D; volatile Uint16 CTRL2D; volatile Uint16 RSVD65[2]; } CSL_UsbQmqnRegs; typedef struct { volatile Uint16 QSTATA; volatile Uint16 RSVD0[3]; volatile Uint16 QSTAT1B; volatile Uint16 QSTAT2B; volatile Uint16 RSVD1[2]; volatile Uint16 QSTAT1C; volatile Uint16 RSVD67[7]; } CSL_UsbQmqnsRegs; typedef struct { volatile Uint16 REVID1; volatile Uint16 REVID2; volatile Uint16 RSVD0[2]; volatile Uint16 CTRLR; volatile Uint16 RSVD1[3]; volatile Uint16 STATR; volatile Uint16 RSVD2[3]; volatile Uint16 EMUR; volatile Uint16 RSVD3[3]; volatile Uint16 MODE1; volatile Uint16 MODE2; volatile Uint16 RSVD4[2]; volatile Uint16 AUTOREQ; volatile Uint16 RSVD5[3]; volatile Uint16 SPRFIXTIME1; volatile Uint16 SPRFIXTIME2; volatile Uint16 RSVD6[2]; volatile Uint16 TEARDOWN1; volatile Uint16 TEARDOWN2; volatile Uint16 RSVD7[2]; volatile Uint16 INTSRCR1; volatile Uint16 INTSRCR2; volatile Uint16 RSVD8[2]; volatile Uint16 INTSETR1; volatile Uint16 INTSETR2; volatile Uint16 RSVD9[2]; volatile Uint16 INTCLRR1; volatile Uint16 INTCLRR2; volatile Uint16 RSVD10[2]; volatile Uint16 INTMSKR1; volatile Uint16 INTMSKR2; volatile Uint16 RSVD11[2]; volatile Uint16 INTMSKSETR1; volatile Uint16 INTMSKSETR2; volatile Uint16 RSVD12[2]; volatile Uint16 INTMSKCLRR1; volatile Uint16 INTMSKCLRR2; volatile Uint16 RSVD13[2]; volatile Uint16 INTMASKEDR1; volatile Uint16 INTMASKEDR2; volatile Uint16 RSVD14[2]; volatile Uint16 EOIR; volatile Uint16 RSVD15[3]; volatile Uint16 INTVECTR1; volatile Uint16 INTVECTR2; volatile Uint16 RSVD16[14]; volatile Uint16 GREP1SZR1; volatile Uint16 GREP1SZR2; volatile Uint16 RSVD17[2]; volatile Uint16 GREP2SZR1; volatile Uint16 GREP2SZR2; volatile Uint16 RSVD18[2]; volatile Uint16 GREP3SZR1; volatile Uint16 GREP3SZR2; volatile Uint16 RSVD19[2]; volatile Uint16 GREP4SZR1; volatile Uint16 GREP4SZR2; volatile Uint16 RSVD20[931]; volatile Uint16 FADDR_POWER; volatile Uint16 INTRTX; volatile Uint16 RSVD21[2]; volatile Uint16 INTRRX; volatile Uint16 INTRTXE; volatile Uint16 RSVD22[2]; volatile Uint16 INTRRXE; volatile Uint16 INTRUSB_INTRUSBE; volatile Uint16 RSVD23[2]; volatile Uint16 FRAME; volatile Uint16 INDEX_TESTMODE; volatile Uint16 RSVD24[2]; volatile Uint16 TXMAXP_INDX; volatile Uint16 PERI_CSR0_INDX; volatile Uint16 RSVD25[2]; volatile Uint16 RXMAXP_INDX; volatile Uint16 PERI_RXCSR_INDX; volatile Uint16 RSVD26[2]; volatile Uint16 COUNT0_INDX; volatile Uint16 RSVD27[4]; volatile Uint16 CONFIGDATA_INDX; volatile Uint16 RSVD28[2]; volatile Uint16 FIFO0R1; volatile Uint16 FIFO0R2; volatile Uint16 RSVD29[2]; volatile Uint16 FIFO1R1; volatile Uint16 FIFO1R2; volatile Uint16 RSVD30[2]; volatile Uint16 FIFO2R1; volatile Uint16 FIFO2R2; volatile Uint16 RSVD31[2]; volatile Uint16 FIFO3R1; volatile Uint16 FIFO3R2; volatile Uint16 RSVD32[2]; volatile Uint16 FIFO4R1; volatile Uint16 FIFO4R2; volatile Uint16 RSVD33[46]; volatile Uint16 DEVCTL; volatile Uint16 TXFIFOSZ_RXFIFOSZ; volatile Uint16 RSVD34[2]; volatile Uint16 TXFIFOADDR; volatile Uint16 RXFIFOADDR; volatile Uint16 RSVD35[6]; volatile Uint16 HWVERS; volatile Uint16 RSVD37[19]; CSL_UsbEptrgRegs EPTRG[5]; volatile Uint16 RSVD38[89]; volatile Uint16 PERI_CSR0; volatile Uint16 RSVD39[6]; volatile Uint16 COUNT0; volatile Uint16 RSVD40[4]; volatile Uint16 CONFIGDATA; volatile Uint16 RSVD42[2]; CSL_UsbEpcsrRegs EPCSR[4]; volatile Uint16 RSVD43[2735]; volatile Uint16 DMAREVID1; volatile Uint16 DMAREVID2; volatile Uint16 RSVD44[2]; volatile Uint16 TDFDQ; volatile Uint16 RSVD45[3]; volatile Uint16 DMAEMU; volatile Uint16 RSVD47[2039]; CSL_UsbChannelRegs CHANNEL[4]; volatile Uint16 RSVD48[1920]; volatile Uint16 DMA_SCHED_CTRL1; volatile Uint16 DMA_SCHED_CTRL2; volatile Uint16 RSVD50[2046]; CSL_UsbCdmaschetblwordRegs CDMASCHETBLWORD[64]; volatile Uint16 RSVD51[5888]; volatile Uint16 QMGRREVID1; volatile Uint16 QMGRREVID2; volatile Uint16 RSVD52[6]; volatile Uint16 DIVERSION1; volatile Uint16 DIVERSION2; volatile Uint16 RSVD53[22]; volatile Uint16 FDBSC0; volatile Uint16 FDBSC1; volatile Uint16 RSVD54[2]; volatile Uint16 FDBSC2; volatile Uint16 FDBSC3; volatile Uint16 RSVD55[2]; volatile Uint16 FDBSC4; volatile Uint16 FDBSC5; volatile Uint16 RSVD56[2]; volatile Uint16 FDBSC6; volatile Uint16 FDBSC7; volatile Uint16 RSVD57[82]; volatile Uint16 LRAM0BASE1; volatile Uint16 LRAM0BASE2; volatile Uint16 RSVD58[2]; volatile Uint16 LRAM0SIZE; volatile Uint16 RSVD59[3]; volatile Uint16 LRAM1BASE1; volatile Uint16 LRAM1BASE2; volatile Uint16 RSVD60[6]; volatile Uint16 PEND0; volatile Uint16 PEND1; volatile Uint16 RSVD61[2]; volatile Uint16 PEND2; volatile Uint16 PEND3; volatile Uint16 RSVD62[2]; volatile Uint16 PEND4; volatile Uint16 PEND5; volatile Uint16 RSVD64[3942]; CSL_UsbQmmemregrRegs QMMEMREGR[16]; volatile Uint16 RSVD66[3840]; CSL_UsbQmqnRegs QMQN[64]; volatile Uint16 RSVD68[1024]; CSL_UsbQmqnsRegs QMQNS[64]; } CSL_UsbRegs; typedef struct { volatile Uint16 RSVD0[6]; volatile Uint16 IODIR1; volatile Uint16 IODIR2; volatile Uint16 IOINDATA1; volatile Uint16 IOINDATA2; volatile Uint16 IOOUTDATA1; volatile Uint16 IOOUTDATA2; volatile Uint16 IOINTEDG1; volatile Uint16 IOINTEDG2; volatile Uint16 IOINTEN1; volatile Uint16 IOINTEN2; volatile Uint16 IOINTFLG1; volatile Uint16 IOINTFLG2; } CSL_GpioRegs; typedef struct { volatile Uint16 TCR; volatile Uint16 RSVD0; volatile Uint16 TIMPRD1; volatile Uint16 TIMPRD2; volatile Uint16 TIMCNT1; volatile Uint16 TIMCNT2; } CSL_TimRegs; typedef struct { volatile Uint16 WDKCKLK; volatile Uint16 RSVD0; volatile Uint16 WDKICK; volatile Uint16 RSVD1; volatile Uint16 WDSVLR; volatile Uint16 RSVD2; volatile Uint16 WDSVR; volatile Uint16 RSVD3; volatile Uint16 WDENLOK; volatile Uint16 RSVD4; volatile Uint16 WDEN; volatile Uint16 RSVD5; volatile Uint16 WDPSLR; volatile Uint16 RSVD6; volatile Uint16 WDPS; } CSL_WdtRegs; typedef volatile ioport CSL_UsbRegs * CSL_UsbRegsOvly; typedef volatile ioport CSL_I2cRegs * CSL_I2cRegsOvly; typedef volatile ioport CSL_I2sRegs * CSL_I2sRegsOvly; typedef volatile ioport CSL_EmifRegs * CSL_EmifRegsOvly; typedef volatile ioport CSL_UartRegs * CSL_UartRegsOvly; typedef volatile ioport CSL_SpiRegs * CSL_SpiRegsOvly; typedef volatile ioport CSL_MmcsdRegs * CSL_MmcsdRegsOvly; typedef volatile ioport CSL_LcdcRegs * CSL_LcdcRegsOvly; typedef volatile ioport CSL_RtcRegs * CSL_RtcRegsOvly; typedef volatile ioport CSL_AnactrlRegs * CSL_SarRegsOvly; typedef volatile ioport CSL_GpioRegs * CSL_GpioRegsOvly; typedef volatile ioport CSL_SysRegs * CSL_SysRegsOvly; typedef volatile ioport CSL_DmaRegs * CSL_DmaRegsOvly; typedef volatile CSL_CpuRegs * CSL_CpuRegsOvly; typedef volatile ioport CSL_TimRegs * CSL_TimRegsOvly; typedef volatile ioport CSL_WdtRegs * CSL_WdtRegsOvly; Int16 EZDSP5535_init( ); void EZDSP5535_wait( Uint32 delay ); void EZDSP5535_waitusec( Uint32 usec ); extern Int16 led_test( ); int TestFail = (int)-1; void StopTest() { return; } void main( void ) { EZDSP5535_init( ); printf( "\nTesting LEDs...\n"); TestFail = led_test( ); if ( TestFail != 0 ) { printf( " FAIL... error code %d... quitting\n", TestFail ); } else { printf( " PASS\n" ); printf( "\n***ALL Tests Passed***\n" ); } StopTest(); }