⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nf_check_conf.h

📁 mp3播放器
💻 H
字号:
//! @file nf_check_conf.h,v
//!
//! Copyright (c) 2004 Atmel.
//!
//! Please read file license.txt for copyright notice.
//!
//! @brief This file checks the Nand Flash parameters which are
//! used by the NF driver.
//!
//! As soon as a parameter is bad, the NF_BAD_CONFIG switch is set
//! to TRUE and prevent NF driver(s) from compiling.
//!
//! @version 1.3 snd3-refd1-1_9_5
//!
//! @todo
//! @bug

#ifndef _NF_CHECK_CONFIG_H_
#define _NF_CHECK_CONFIG_H_

//_____ D E C L A R A T I O N ______________________________________________
//

#define NF_BAD_CONFIG (FALSE)

#if (!defined NF_N_DEVICES)
#  error Please specify in conf_nf.h the number of nand-flash you are using.
#  undef  NF_BAD_CONFIG
#  define NF_BAD_CONFIG (TRUE)
#else
#  if (NF_N_DEVICES!=1) && (NF_N_DEVICES!=2) && (NF_N_DEVICES!=4)
#     error Invalid number of nand-flash devices.
#  endif
#endif




#if (defined NF_SHIFT_PAGE_BYTE)
#  if (NF_SHIFT_PAGE_BYTE!=11) && (NF_SHIFT_PAGE_BYTE!=9)
#     error (1<<NF_SHIFT_PAGE_BYTE) is an invalid size of NF page
#     undef  NF_BAD_CONFIG
#     define NF_BAD_CONFIG (TRUE)
#  endif
#endif

#if (defined NF_SHIFT_BLOCK_PAGE)
#  if (NF_SHIFT_BLOCK_PAGE!=5) && (NF_SHIFT_BLOCK_PAGE!=6)
#     error (1<<NF_SHIFT_BLOCK_PAGE) is an invalid size of NF block
#     undef  NF_BAD_CONFIG
#     define NF_BAD_CONFIG (TRUE)
#  endif
#endif

#if (!defined NF_CACHE_LUT_LOG_SZ)
#  error NF_CACHE_LUT_LOG_SZ (Look-Up Table cache size) is not defined
#  undef  NF_BAD_CONFIG
#  define NF_BAD_CONFIG (TRUE)
#else
#  if (NF_N_DEVICES*NF_CACHE_LUT_LOG_SZ >128)
#     error NF driver internal limitation: LUT cache is too big
#     undef  NF_BAD_CONFIG
#     define NF_BAD_CONFIG (TRUE)
#  endif
#endif

#if (!defined NF_CACHE_FBB_LOG_SZ)
#  error NF_CACHE_FBB_LOG_SZ (Free-blocks Block cache size) is not defined
#  undef  NF_BAD_CONFIG
#  define NF_BAD_CONFIG (TRUE)
#else
#  if (NF_N_DEVICES*NF_CACHE_FBB_LOG_SZ >128)
#     error NF driver internal limitation: FBB cache is too big
#     undef  NF_BAD_CONFIG
#     define NF_BAD_CONFIG (TRUE)
#  endif
#endif

#endif // _NF_CHECK_CONFIG_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -