ramdsk.h

来自「The combined demo is dedicated for S1C33」· C头文件 代码 · 共 88 行

H
88
字号
/****************************************************************************
 *																			*
 *	RAMDSK GDIC (for FS33G)													*
 *																			*
 *									Copyright (C) SEIKO EPSON CORP. 2003	*
 *																			*
 *	Function																*
 *		 GDIC  RAM 															*
 *																			*
 *																			*
 *	Require																	*
 *		Upper library:	FS33G												*
 *																			*
 *	Comment																	*
 *		GDICRAM Disk 														*
 *																			*
 *																			*
 *																			*
 *		GDIC  FS33G															*
 *																			*
 *	Revision history														*
 *		2003/08/26	TaTeishi	First revision								*
 *																			*
 ****************************************************************************/

#ifndef	_RAMDSK_H_
#define	_RAMDSK_H_

#include "fat.h"

/****************************************************************************
 *	RAMDSK GDIC Definition													*
 ****************************************************************************/

/*------------------------------------------------------*/
/*	RAM Disk format parameter definition				*/
/*------------------------------------------------------*/
#ifdef	L04DMT
	#define	RAMDSK_STRADR			(0x2000000)		// [Byte]
	#define	RAMDSK_SIZE			(0x0400000)		// [Byte]
#endif

#ifdef	L05DMT
	#define	RAMDSK_STRADR			(0x3000000)		// [Byte]
	#define	RAMDSK_SIZE			(0x0ffffff)		// [Byte]
#endif

#define	RAMDSK_SEC_SIZE			(512)			// [Byte]

#define	RAMDSK_TOTAL_SEC		(RAMDSK_SIZE / RAMDSK_SEC_SIZE)
#define	RAMDSK_SEC_PAR_CLUS		(1)
#define	RAMDSK_RSV_SEC_CNT		(1)
#define	RAMDSK_FAT_CNT			(2)
#define	RAMDSK_ROOT_ENT_CNT		(128)
#define	RAMDSK_HIDDEN_SEC_CNT	(1)


/*------------------------------------------------------*/
/*	COMMON ERROR CODE		-( 0~ 9)					*/
/*------------------------------------------------------*/
#define	RAMDSK_E_SUCCESS	0				// Successful
#define	RAMDSK_E_FAILURE	-1				// Failure


/****************************************************************************
 *	RAMDSK GDIC DSR Prototype												*
 ****************************************************************************/
int ramdskOpenLib(FatInitParams_t *pstParams);
int ramdskCloseLib();
int ramdskInitDev(FatInitParams_t *pstParams);
int ramdskPhyFormat(unsigned long ulSelNum, unsigned char **pbVolLbl,
												FatInitParams_t *pstParams);
int ramdskLogFormat(unsigned long ulSelNum, unsigned char **pbVolLbl,
												FatInitParams_t *pstParams);
void ramdskMakeDriveImage();
int ramdskPhyFmtChk();
int ramdskLogFmtChk();
int ramdskMediaReset();
int ramdskRdSect(unsigned char bDrvNum, unsigned long ulLogSct,
				unsigned long ulDatSiz, unsigned char *pBuffer);
int ramdskWtSect(unsigned char bDrvNum, unsigned long ulLogSct,
			unsigned long ulDatSiz, unsigned char *pBuffer, unsigned char bVerify);
int ramdskCacheRAMEntry(unsigned char *pCacheAddr);
unsigned long ramdskTotalSec();

#endif	_RAMDSK_H_
/**** End of file ***********************************************************/

⌨️ 快捷键说明

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