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

📄 cardopt.h

📁 凌阳MP3 spSPCA755yuanma
💻 H
字号:

#ifndef _cardopt_
#define _cardopt_

#include "chipopt.h"

// @012403@wyeo@support 256M nand, begin

#define K_DELETE_LFN		1

// this case should not happen K_SUPPORT_NEWNAND = 0, K_SUPPORT_ONLYNEWNAND = 1
// thse 2 option apply only to nand
//1. 1 mask for all old nand.
//K_SUPPORT_NEWNAND=0, K_SUPPORT_ONLYNEWNAND=0 code support old nand.
//---
//2. 1 mask for just new nand.
//K_SUPPORT_NEWNAND=1, K_SUPPORT_ONLYNEWNAND=1 code support only new nand.
//--
//3. If code over 64K, support both old and new nand.
//K_SUPPORT_NEWNAND=1, K_SUPPORT_ONLYNEWNAND=0 code support old+new nand.
//--
//4. K_SUPPORT_NEWNAND=0, K_SUPPORT_ONLYNEWNAND=1 no this case.
//
#if ((K_CARD_TOTAL <= 1) && NANDF_OPTION)
#define K_SUPPORT_NEWNAND	1
#define K_SUPPORT_ONLYNEWNAND	0
#else
#define K_SUPPORT_NEWNAND	0
#define K_SUPPORT_ONLYNEWNAND	0
#endif

#if (K_SUPPORT_ONLYNEWNAND)
#undef P_NAND_SIZE
#define P_NAND_SIZE		256
#endif
// @012403@wyeo@support 256M nand, end

// patch 4.4-7@wyeo@remove debug message, begin

#define CARDLIB_RELEASE		1
#define K_SLASH /

#if CARDLIB_RELEASE
#define M_Card_Printf;/K_SLASH
#else
#define M_Card_Printf printf
#endif

// end

#if (K_CHIP_SET == K_CHIP_533 || K_CHIP_SET == K_CHIP_8591)
#include "setmode.h"
#define K_MEDIA_NONE                    K_MEDIA_None
#define K_MEDIA_NANDF                   K_MEDIA_Nandf
#define K_MEDIA_SMC                     K_MEDIA_Smc
#if (CFAIDE)
#define K_MEDIA_CFC                     K_MEDIA_CfcIde
#else
#define K_MEDIA_CFC                     K_MEDIA_CfcMem
#endif

#define K_MEDIA_SDF                     K_MEDIA_Sdf
#define K_MEDIA_MMC                     K_MEDIA_Mmc
#define K_MEDIA_NEXTF                   K_MEDIA_Nextf
#define K_MEDIA_DOSRAM			K_MEDIA_Sdram
#else

#ifndef AUDIO_OPTION
#define AUDIO_OPTION                    0
#endif

#ifndef PLAYBACK_OPTION
#define PLAYBACK_OPTION                 1
#endif

#ifndef DEBUG_OPTION
#define DEBUG_OPTION                    0
#endif

//HIS101b-0025
#ifndef SDRAM_OPTION
#define SDRAM_OPTION			1
#endif

//HIS101b-0025
#ifndef DOSRAM_OPTION
#define DOSRAM_OPTION           	0
#endif

//HIS101b-0025
#ifndef NANDF_OPTION
#define NANDF_OPTION            	1
#endif

//HIS101b-0025
#ifndef SMC_OPTION
#define SMC_OPTION              	0
#endif

//HIS101b-0025
#ifndef NORF_OPTION
#define NORF_OPTION             	0
#endif

//HIS101b-0025
#ifndef CFC_OPTION
#define CFC_OPTION              	1
#endif

#ifndef MMC_OPTION
#define MMC_OPTION              	0
#endif

//HIS101b-0025
#ifndef NEXTF_OPTION
#define NEXTF_OPTION            	0
#endif

//HIS101b-0025
#ifndef SDF_OPTION
#define SDF_OPTION              	0
#endif

//Media Type
//HIS101b-0025
#ifndef K_MEDIA_NONE
#define K_MEDIA_NONE			0x00
#endif

//HIS101b-0025
#ifndef K_MEDIA_NANDF
// WWWW0319 start
#if (SMC_OPTION == 1 && NANDF_OPTION == 1)
#define K_MEDIA_NANDF                   0x11
#else
#define K_MEDIA_NANDF                   0x01
#endif
// WWWW0319 end
#endif

//HIS101b-0025
#ifndef K_MEDIA_SMC
#define K_MEDIA_SMC			0x01
#endif

//HIS101b-0025
#ifndef K_MEDIA_NORF
#define K_MEDIA_NORF			0x02
#endif

//HIS101b-0025
#ifndef K_MEDIA_CFC
#define K_MEDIA_CFC			0x03
#endif

//HIS101b-0025
#ifndef K_MEDIA_MMC
#define K_MEDIA_MMC			0x04
#endif

//HIS101b-0025
#ifndef K_MEDIA_NEXTF
#define K_MEDIA_NEXTF			0x05
#endif

//HIS101b-0025
#ifndef K_MEDIA_SDF
#define K_MEDIA_SDF			0x06
#endif

//HIS101b-0025
#ifndef K_MEDIA_DOSRAM
#define K_MEDIA_DOSRAM			0x07
#endif

//Media SubType
//HIS101b-0025
#ifndef K_SUBMEDIA_NANDF
#define K_SUBMEDIA_NANDF        	0x00
#endif

//HIS101b-0025
#ifndef K_SUBMEDIA_SMC
#define K_SUBMEDIA_SMC			0x01
#endif

#endif // K_CHIP_SET

#ifndef K_MEDIA_TYPE

#if (K_CARD_TYPE & K_NANDF_SUPPORTED)
#define K_MEDIA_TYPE			K_MEDIA_NANDF
#elif (K_CARD_TYPE & K_NORF_SUPPORTED)
#define K_MEDIA_TYPE			K_MEDIA_NORF
#elif (K_CARD_TYPE & K_NEXTF_SUPPORTED)
#define K_MEDIA_TYPE			K_MEDIA_NEXTF
//patch4.2@richie@ds0511 begin
#elif (K_CARD_TYPE & K_DOSRAM_SUPPORTED)
#define K_MEDIA_TYPE			K_MEDIA_DOSRAM
//patch4.2@richie@ds0511 end
#elif (K_CARD_TYPE & K_CFC_SUPPORTED)
#define K_MEDIA_TYPE			K_MEDIA_CFC
#elif (K_CARD_TYPE & K_SMC_SUPPORTED)
#define K_MEDIA_TYPE			K_MEDIA_SMC
#elif (K_CARD_TYPE & K_SDF_SUPPORTED)
#define K_MEDIA_TYPE			K_MEDIA_SDF
#elif (K_CARD_TYPE & K_MMC_SUPPORTED)
#define K_MEDIA_TYPE			K_MEDIA_MMC
#endif

#endif

//HIS101b-0025
#ifndef K_MEDIA_ONLYONE
#if (K_CARD_TOTAL <= 1)
#define K_MEDIA_ONLYONE			1
#else
#define K_MEDIA_ONLYONE			0
#endif
#endif

#ifndef K_MEDIA_UI_OPTION
#define K_MEDIA_UI_OPTION		0
#endif

#define K_MEDIA_NewForOldBlk		0x0001
#define K_MEDIA_HasBlockBoundary	0x0002
#define K_MEDIA_EraseBefOverWrite	0x0004
#define K_MEDIA_AutoAdress		0x0008

#define K_MEDIA_SMC_Behavior		( K_MEDIA_NewForOldBlk | K_MEDIA_HasBlockBoundary )
#define K_MEDIA_CF_Behavior		( K_MEDIA_AutoAdress )
#define K_MEDIA_DRM_Behavior		( K_MEDIA_AutoAdress ) // HIS101a-0002
#define K_MEDIA_SD_Behavior        	K_MEDIA_AutoAdress
#define K_MEDIA_MMC_Behavior       	( K_MEDIA_AutoAdress ) 

//When record avi WITH audio, should turn on this option.
//This option search all free clusters before recording. This
//prevent audio and video not sync problem when the clusters
//are not very contiguous.But this option require many pre-processing
//time when searching whole BIG capacity flash with SMALL cluster.
//It is suggested that you define the time to record for your product, 
//then caluclate approximate size require to search. For example, if
//you define your product could record 200 second, also assume that
//frame rate for your product is 10, and maximal size of each frame
//is 12K, the require size is 200*10*12K = 24,000K + 500K = 24,500K.
//If G_DOS_ClusterSize is 2K, then 24,500K/2K=12,250 cluster. Then
//set this value to G_DOS_LinearFATMax before calling file recording
//function. G_DOS_LinearFATMax is initial in Card_InitGlobal at cardlink.c
//to 0xFFFF(maximal clusters) whcih search whole flash.								// use asic find pattern to do FAT search
#define K_Use_Pat_FAT			0			// 523, 504 must 0, 533 could 1

#define K_File_HaveVideo	        0

// K_File_HaveVideo must on, when this option is on
#define K_File_HaveMpegAvi	        1			// HIS120-0001 // used by 503, 504

#define K_File_HaveWaveCardFull	        1			// HIS120-0005 // used by 503, 504
#define K_File_HaveAviInterlace	        0			// HIS120-0006 // used by 503, 504

#if (K_File_HaveMpegAvi == 0)					// used by 503, 504
// sorry, old avi format doesn't support interlace
#undef K_File_HaveAviInterlace
#define K_File_HaveAviInterlace         0
#endif

// when this is on, it means capture the video image to SDRAM
#if ( K_CHIP_SET == K_CHIP_503 )
#define K_File_PutVideoAtDram			1
#elif( K_CHIP_SET == K_CHIP_504 )
	#if ( CFC_OPTION == 1 )
	#define K_File_PutVideoAtDram		0
	#else
	// HIS101b-0002
	#if(IC_Package_160P_OPTION == 1)
	#define K_File_PutVideoAtDram		0
	#else
	#define K_File_PutVideoAtDram		1
	#endif
	#endif
#elif( K_CHIP_SET == K_CHIP_533 )               // HIS101c-0002
#define K_File_PutVideoAtDram			1
#else
#define K_File_PutVideoAtDram			0
#endif

// DEBUG mode
// this flag has effect only when K_File_PutVideoAtDram is 1
// when this is on, it means capture only the first frame of video image
#define K_File_RptSameVideoAtDram		0

// HIS101a-0003
#define K_Audio_Codec_OnlyNonCompressed		0
#define K_Audio_Codec_OnlyIMACompressed		1

#endif

⌨️ 快捷键说明

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