We are using an Alliance AS5F34G04SND-08LIN NAND flash chip on a custom board with a STM32F469 MCU. I have emFile working correctly with it so all is good there. Because the Alliance AS5F34G04SND-08LIN does not support ONFI emFile is not able to detect the NAND specs on the chip. So I was forced to define my device config structures within FS_NAND_PHY_SPI.c. That works, but now my code is within the emFile source, rather than defined in my project files. I looked at what it would take to define everything outside the emFile code base. The problem is that the structures NAND_SPI_INST and FS_NAND_SPI_DEVICE_TYPE needed to define a new device config are defined privately within FS_NAND_PHY_SPI.c. There is a comment within FS_NAND_SPI_DEVICE_TYPE stating that it can't be defined in FS.h because NAND_SPI_INST isn't visible:
Display All
Well, I was able to simply move both NAND_SPI_INST and FS_NAND_SPI_DEVICE_TYPE in FS.h without issue. Doing so allows me to use those structures to define my own NAND device easily in its own module outside of the emFile source code. Can I request that you make the same change in the emFile source?
Could I also request that you make all the functions listed in _DeviceDefault publicly accessible in FS.h so that any new devices defined elsewhere can use them?:
Thanks,
Craig
Source Code
- struct FS_NAND_SPI_DEVICE_TYPE {
- //
- //lint -esym(9058, FS_NAND_SPI_DEVICE_TYPE)
- // We cannot define this structure in FS.h because all the functions take a pointer
- // to the instance of the physical layer that is a structure which is only visible in this module.
- //
- int (*pfIdentify) ( NAND_SPI_INST * pInst, const U8 * pId);
- int (*pfReadApplyPara) ( NAND_SPI_INST * pInst, const U8 * pId);
- int (*pfReadDataFromCache)(const NAND_SPI_INST * pInst, U32 PageIndex, void * pData, unsigned Off, unsigned NumBytes);
- int (*pfWriteDataToCache) (const NAND_SPI_INST * pInst, U32 PageIndex, const void * pData, unsigned Off, unsigned NumBytes);
- int (*pfGetECCResult) (const NAND_SPI_INST * pInst, FS_NAND_ECC_RESULT * pResult);
- int (*pfSelectDie) ( NAND_SPI_INST * pInst, unsigned DieIndex);
- int (*pfIsReadError) (U8 Status);
- };
Could I also request that you make all the functions listed in _DeviceDefault publicly accessible in FS.h so that any new devices defined elsewhere can use them?:
Thanks,
Craig