📄 ramdsk.h
字号:
/****************************************************************************
* *
* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -