X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fnand.h;h=87faf65e3e985fcac249499bda9900ad44caacee;hb=c00549cc35cb40d68160db6addb24cc82afe052e;hp=5514c9e53088b75e0d6708bc05b4b453a1016360;hpb=bcc879816c385dea470a0363a802934c498e71e4;p=bertos.git diff --git a/bertos/drv/nand.h b/bertos/drv/nand.h index 5514c9e5..87faf65e 100644 --- a/bertos/drv/nand.h +++ b/bertos/drv/nand.h @@ -29,20 +29,20 @@ * Copyright 2011 Develer S.r.l. (http://www.develer.com/) * --> * -* \brief NAND driver +* \brief ONFI 1.0 compliant NAND kblock driver * * \author Stefano Fedrigo * * $WIZ$ module_name = "nand" * $WIZ$ module_depends = "timer", "kblock", "heap" * $WIZ$ module_configuration = "bertos/cfg/cfg_nand.h" +* */ #ifndef DRV_NAND_H #define DRV_NAND_H #include "cfg/cfg_nand.h" -#include #include @@ -61,12 +61,6 @@ #define NAND_ERR_ECC BV(5) ///< Unrecoverable ECC error /** \} */ -#define NAND_PAGE_SIZE (CONFIG_NAND_DATA_SIZE + CONFIG_NAND_SPARE_SIZE) -#define NAND_BLOCK_SIZE (CONFIG_NAND_DATA_SIZE * CONFIG_NAND_PAGES_PER_BLOCK) - -// Number of usable blocks, and index of first remapping block -#define NAND_NUM_USER_BLOCKS (CONFIG_NAND_NUM_BLOCK - CONFIG_NAND_NUM_REMAP_BLOCKS) - // NAND commands #define NAND_CMD_READ_1 0x00 @@ -87,14 +81,6 @@ #define NAND_CMD_RESET 0xFF -// Get block from page -#define PAGE(blk) ((blk) * CONFIG_NAND_PAGES_PER_BLOCK) - -// Page from block and page in block -#define BLOCK(page) ((uint16_t)((page) / CONFIG_NAND_PAGES_PER_BLOCK)) -#define PAGE_IN_BLOCK(page) ((uint16_t)((page) % CONFIG_NAND_PAGES_PER_BLOCK)) - - /** * NAND context. */