文件名称:mini2440对nand flash的读写,以及读取ID
文件大小:4KB
文件格式:ZIP
更新时间:2017-08-18 11:25:23
nand flash的读写
/* low level nand write function */ int nand_write_ll(unsigned char *buf, unsigned long start_addr, int size) { int i, j,k; if(buf == NULL) { return; } if ((start_addr & NAND_BLOCK_MASK) || (size & NAND_BLOCK_MASK)) { return -1; /* invalid alignment */ } NAND_CHIP_ENABLE; for(i=0; i<(size/2048+1); i++) // fixed by xuj { /* READ0 */ NAND_DETECT_RB; NFCMD = 0x80; /* low level nand write ID function */ int nand_read_ID(void) { int k; unsigned char id[5] = {0}; NAND_CHIP_ENABLE; /* READ0 */ NFCMD = 0x90; /* Write Address */ NFADDR = 0;
【文件预览】:
嵌入式1309黄学兰
----nand_write.c.bak(2KB)
----Read_ID.c.bak(1KB)
----nand_write.c(2KB)
----Read_ID.c(1KB)