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

📄 smccon.h

📁 台湾凌阳方案300万数码相机源代码
💻 H
字号:
#ifndef _smccon_
#define _smccon_

/*++

Copyright (c) 2001 Sunplus Technology Co., Ltd.

Module Name:

        smccon.h

Abstract:

        Header file related to file layer constant definition

Environment:

        Keil C51 Compiler

Revision History:

        09/04/2001      William Yeo    created                 

--*/

//------------------------------------------------------------------------------
//Constant
//------------------------------------------------------------------------------
//-------------------------------------
//smcascic.c
//-------------------------------------
#define SMC_USE_PIO_MODE	0		//HIS101a-0023

//-------------------------------------
//smccore.c
//-------------------------------------
#define K_SMC_BUILD_BANK_MAP_SIZE	4	// HIS101a-0037
						// 4 byte represent 32 bank map, which
						// allow up to 512M card
#if ( P_NAND_SIZE > 16 || P_NAND_SIZE == 0 )
#define K_SMC_BUILD_BANK_AT_SDRAM	1	// HIS101a-0037
#else
#define K_SMC_BUILD_BANK_AT_SDRAM	0	// HIS101a-0037
#endif

#define K_SMC_MAX_ClusterSize		((ULONG)0x6000)	// HIS101a-0037
							// assume max cluster size is 24K word = 48K byte 
#define K_SMC_DO_ECC_CORECTION		1	// HIS101b-0009
#define K_SMC_DO_USB_ECC_BY_FIRMWARE	0	// HIS101b-0009
#define K_SMC_DO_USB_ECC_BY_HOST	1	// HIS101b-0009
#define K_SMC_ECC_STRUC_LEN		6	// HIS101b-0009

// wyeo@0514, path for read write nand reserve block
#define K_NANDF_Reserve_FlashToSram		0
#define K_NANDF_Reserve_SramToFlash		1
#define K_NANDF_Reserve_FlashToDram		2
#define K_NANDF_Reserve_DramToFlash		3

// HIS101b-0019
#if (NANDF_OPTION)
#define K_NANDF_STRICT_BAD_CHECK	1
#else
#define K_NANDF_STRICT_BAD_CHECK	0	
#endif

#define K_PreWriteOldBlock		0

// @patch 4.5@wyeo@make table make faster, begin
#define K_STRICT_MAKE_TABLE             1
#define K_RECOVER_MAKE_TABLE            1
#define K_Error_Recovery                1
//end

// @patch 4.5@wyeo@simulate smc as nand
#define K_SMC_AS_NANDF			0	// tetsing mode, musty 0
//end

//-------------------------------------
//smcdata.h
//-------------------------------------

//-------------------------------------
//smcdef.h
//-------------------------------------
// 533 start
//patch4.5@ada@adjust NANDF read write timming begin
#define K_SMC_ActiveCycle       0x0d
//#define K_SMC_ActiveCycle       1
#define K_SMC_RecoveryCycle     0x09
//#define K_SMC_RecoveryCycle     1
//patch4.5@ada@adjust NANDF read write timming end
// 533 end

#define K_SMC_CIS_SIZE          0x080
#define K_SMC_CisPartialSize    10

#define K_SMC_SequentialDataInput       0x80
#define K_SMC_Read1             	0x00	// K_SMC_Read1_1stHalf
#define K_SMC_Read1_2ndHalf             0x01	// K_SMC_Read1_2ndHalf
#define K_SMC_Read2                     0x50
#define K_SMC_ReadId                    0x90	// K_SMC_ReadID	
#define K_SMC_Reset                     0xFF
#define K_SMC_PageProgram               0x10
#define K_SMC_BlockErase1               0x60
#define K_SMC_BlockErase2               0xD0
#define K_SMC_EraseSuspend              0xB0
#define K_SMC_EraseResume               0xD0
#define K_SMC_ReadStatus                0x70
#define K_SMC_ReadRegister              0xE0

#define K_SMC_PageExtSize               ((BYTE) 0x10)
#define K_SMC_PageWholeSize             ((WORD) K_Card_PageSize + (WORD) K_SMC_PageExtSize)
#define K_SMC_PacketPerPage             ((BYTE) (K_Card_PageSize / 0x40)) //0x40 byte/bulk packet

#define K_SMC_EccUnitSize               ((WORD) 0x0100)
#define K_SMC_EccUnitPerPage            ((BYTE) (K_Card_PageSize / K_SMC_EccUnitSize))

#define K_SMC_EccByteSize               6

#define K_SMC_LogicalBlockPerBank       1000            		//1000 logical-block/bank

#define K_SMC_MaxAllocatTableSize       1024                            //size of table storing physical to logical address mapping
#define K_SMC_MaxEntryTableSize         (K_SMC_MaxAllocatTableSize / 8) //size of table storing whether block is empty or not

#define K_SIZEOF_G_SMC_AllocatTable	((ULONG)K_SMC_MaxAllocatTableSize*2L)
#define K_SIZEOF_G_SMC_EntryTable	((ULONG)K_SMC_MaxEntryTableSize)

//-------------------------------------
//smcdos.c
//-------------------------------------

//-------------------------------------
//smcecc.c
//-------------------------------------

//-------------------------------------
//smcecctb.c
//-------------------------------------

#endif

⌨️ 快捷键说明

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