提交 9a40908c 编写于 作者: B Bernard Xiong

Merge branch 'master' of https://github.com/RT-Thread/rt-thread

...@@ -24,7 +24,6 @@ RT-Thread RTOS can support many architectures: ...@@ -24,7 +24,6 @@ RT-Thread RTOS can support many architectures:
* ARM Cortex-R4 * ARM Cortex-R4
* ARM Cortex-A8/A9 * ARM Cortex-A8/A9
* ARM920T/ARM926 etc * ARM920T/ARM926 etc
* MIPS * MIPS
* x86 * x86
* PowerPC * PowerPC
......
...@@ -4,23 +4,23 @@ ...@@ -4,23 +4,23 @@
#include <string.h> #include <string.h>
#define NAND_SIM "nand.bin" #define NAND_SIM "nand.bin"
#if 1 #if 1
#define OOB_SIZE 64 #define OOB_SIZE 64
#define PAGE_DATA_SIZE 2048 #define PAGE_DATA_SIZE 2048
#define PAGE_SIZE (2048 + 64)
#define PAGE_PER_BLOCK 64 #define PAGE_PER_BLOCK 64
#define BLOCK_SIZE (PAGE_SIZE * PAGE_PER_BLOCK) #define ECC_SIZE ((PAGE_DATA_SIZE) * 3 / 256)
#define BLOCK_NUM 512 #define BLOCK_NUM 512
// #define BLOCK_NUM 2048
#else #else
#define OOB_SIZE 16 #define OOB_SIZE 16
#define PAGE_SIZE (512 + OOB_SIZE) #define PAGE_DATA_SIZE 512
#define PAGE_PER_BLOCK 32 #define PAGE_PER_BLOCK 32
#define BLOCK_SIZE (PAGE_SIZE * PAGE_PER_BLOCK) #define ECC_SIZE ((PAGE_DATA_SIZE) * 3 / 256)
#define BLOCK_NUM 512 #define BLOCK_NUM 512
#endif #endif
#define ECC_SIZE ((PAGE_DATA_SIZE) * 3 / 256) #define BLOCK_SIZE (PAGE_SIZE * PAGE_PER_BLOCK)
#define PAGE_SIZE (PAGE_DATA_SIZE + OOB_SIZE)
static unsigned char block_data[BLOCK_SIZE]; static unsigned char block_data[BLOCK_SIZE];
static struct rt_mtd_nand_device _nanddrv_file_device; static struct rt_mtd_nand_device _nanddrv_file_device;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册