fil.c

来自「S3C2450BSP开发包,里面有很多资料。可以提供大家参考下。有什么需要解决问」· C语言 代码 · 共 89 行

C
89
字号
/*****************************************************************************/
/*                                                                           */
/* COMPONENT   : Rainbow				                                     */
/* MODULE      : FIL				                                         */
/* NAME    	   : Flash Interface Layer (2450 version)                        */
/* FILE        : FIL.c		                                                 */
/* PURPOSE 	   : 															 */
/*                                                                           */
/*---------------------------------------------------------------------------*/
/*                                                                           */
/*          COPYRIGHT 2003-2005 SAMSUNG ELECTRONICS CO., LTD.                */
/*                          ALL RIGHTS RESERVED                              */
/*                                                                           */
/*   Permission is hereby granted to licensees of Samsung Electronics        */
/*   Co., Ltd. products to use or abstract this computer program for the     */
/*   sole purpose of implementing a product based on Samsung                 */
/*   Electronics Co., Ltd. products. No other rights to reproduce, use,      */
/*   or disseminate this computer program, whether in part or in whole,      */
/*   are granted.                                                            */
/*                                                                           */
/*   Samsung Electronics Co., Ltd. makes no representation or warranties     */
/*   with respect to the performance of this computer program, and           */
/*   specifically disclaims any responsibility for any damages,              */
/*   special or consequential, connected with the use of this program.       */
/*                                                                           */
/*---------------------------------------------------------------------------*/
/*                                                                           */
/* REVISION HISTORY                                                          */
/*                                                                           */
/*   18-AUG-2005 [Yangsup Lee] : first writing	                             */
/*                                                                           */
/*****************************************************************************/

/*****************************************************************************/
/* Header file inclusions                                                    */
/*****************************************************************************/
#include <WMRConfig.h>
#include <WMRTypes.h>
#include <OSLessWMROAM.h>
#include "S3C2450_FIL.h"
#include "FIL.h"
#include <bibdrvinfo.h>

#include <string.h>

/*****************************************************************************/
/* Static variables definitions                                              */
/*****************************************************************************/
PRIVATE LowFuncTbl	stLowFuncTbl;

/*****************************************************************************/
/* Code Implementation                                                       */
/*****************************************************************************/
INT32
FIL_Init(VOID)
{
	INT32 nFILRet;

	nFILRet = NAND_Init();

	if (nFILRet != FIL_SUCCESS)
	{
		return nFILRet;
	}

	stLowFuncTbl.Init = NAND_Init;
	stLowFuncTbl.Reset = NAND_Reset;
	stLowFuncTbl.Sync = NAND_Sync;
	stLowFuncTbl.Read = NAND_Read;
	stLowFuncTbl.Write = NAND_Write;
	stLowFuncTbl.Erase = NAND_Erase;

	return FIL_SUCCESS;
}

LowFuncTbl*
FIL_GetFuncTbl(VOID)
{
	return &stLowFuncTbl;
}

VOID GetNandInfo(NAND_INFO *pNandInfo)
{
	pNandInfo->dwPagesPerSuBlk = PAGES_PER_SUBLK;
	pNandInfo->dwSectorsPerSuPage = SECTORS_PER_SUPAGE;
	pNandInfo->dwSpecialAreaSize = SPECIAL_AREA_SIZE;
	pNandInfo->dwSpecialAreaStart = SPECIAL_AREA_START;
}

⌨️ 快捷键说明

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