EMIFANANDInit(NandInfo_t *nandInfo) { nandTimingInfo = (EMIFANANDTimingInfo_t *) nandInfo->hNandCtrlInfo->hNandTimingInfo; } 这句话怎么理解呢?谁能给小弟详细解释一下,谢谢 下面是对应的结构体 + H q& {3 w' ~/ X' ^
" P/ }0 p8 M, L# {8 W
# C! D) {; E, g# M; c2 w
typedef struct _EMIFA_NAND_TIMING_INFO_ {unsigned int writeSetup; unsigned int writeStrobe; unsigned int writeHold; unsigned int readSetup; unsigned int readStrobe; unsigned int readHold; unsigned int turnAround; } EMIFANANDTimingInfo_t; typedef struct _NAND_INFO_ { unsigned int dataRegAddr; /* ADDR Register address */ unsigned int addrRegAddr; /* CMD Register address */ unsigned int cmdRegAddr; /* Pointer to Memory Controller Structure */ struct _NAND_CTRL_INFO_ *hNandCtrlInfo; /* Pointer to ECC Structure */ struct _NAND_ECC_INFO_ *hNandEccInfo; /* Pointer to DMA Structure */ struct _NAND_DMA_INFO_ *hNandDmaInfo; } NandInfo_t;
0 M0 z+ `7 g+ b0 o
typedef struct _NAND_CTRL_INFO_ { unsigned int (*WaitPinStatusGet)(NandInfo_t *nandInfo); /* Timing info for the device and the controller */ void *hNandTimingInfo; /* Base address of the controller */ unsigned int baseAddr; /* ECC supported by the controller */ unsigned int eccSupported; /* Wait pin where NAND dev R/B pin is connected */ unsigned int chipSelectBaseAddr[NAND_MAX_CHIP_SELECTS]; 7 i9 v* `. q3 |* L' z
} NandCtrlInfo_t; . n5 ^( j/ `' z. s8 Y. J
5 i$ H9 S9 R# |3 i( d4 _/ H |