📄 _flsoc.h
字号:
/*
* $Log: V:/Flite/archives/TrueFFS5/Src/_flsoc.h_V $
*
* Rev 1.0 May 14 2002 14:59:48 oris
* Initial revision.
*/
/***********************************************************************************/
/* M-Systems Confidential */
/* Copyright (C) M-Systems Flash Disk Pioneers Ltd. 1995-2001 */
/* All Rights Reserved */
/***********************************************************************************/
/* NOTICE OF M-SYSTEMS OEM */
/* SOFTWARE LICENSE AGREEMENT */
/* */
/* THE USE OF THIS SOFTWARE IS GOVERNED BY A SEPARATE LICENSE */
/* AGREEMENT BETWEEN THE OEM AND M-SYSTEMS. REFER TO THAT AGREEMENT */
/* FOR THE SPECIFIC TERMS AND CONDITIONS OF USE, */
/* OR CONTACT M-SYSTEMS FOR LICENSE ASSISTANCE: */
/* E-MAIL = info@m-sys.com */
/***********************************************************************************/
#ifndef _FLSOC_H
#define _FLSOC_H
struct tSocket {
unsigned volNo; /* Volume no. of socket */
unsigned serialNo; /* Serial no. of socket on controller */
FLBoolean cardChanged; /* need media change notification */
int VccUsers; /* No. of current VCC users */
int VppUsers; /* No. of current VPP users */
PowerState VccState; /* Actual VCC state */
PowerState VppState; /* Actual VPP state */
byte curPartition; /* Current partition to use the socket (set busy) */
#if (defined(VERIFY_WRITE) || defined(VERIFY_ERASED_SECTOR))
byte verifyWrite; /* VerifyWrite mode */
#endif /* VERIFY_WRITE || VERIFY_ERASED_SECTOR */
FLBoolean remapped; /* set to TRUE whenever the socket window is moved */
void (*powerOnCallback)(void *flash); /* Notification routine for Vcc on */
void * flash; /* Flash object for callback */
struct { /* Window state */
unsigned int baseAddress; /* Physical base as a 4K page */
unsigned int currentPage; /* Our current window page mapping */
void FAR0 * base; /* Pointer to window base */
long int size; /* Window size (must by power of 2) */
unsigned speed; /* in nsec. */
unsigned busWidth; /* 8 or 16 bits */
} window;
/*----------------------------------------------------------------------*/
/* c a r d D e t e c t e d */
/* */
/* Detect if a card is present (inserted) */
/* */
/* Parameters: */
/* vol : Pointer identifying drive */
/* */
/* Returns: */
/* 0 = card not present, other = card present */
/*----------------------------------------------------------------------*/
FLBoolean (*cardDetected)(FLSocket vol);
/*----------------------------------------------------------------------*/
/* V c c O n */
/* */
/* Turns on Vcc (3.3/5 Volts). Vcc must be known to be good on exit. */
/* */
/* Parameters: */
/* vol : Pointer identifying drive */
/* */
/*----------------------------------------------------------------------*/
void (*VccOn)(FLSocket vol);
/*----------------------------------------------------------------------*/
/* V c c O f f */
/* */
/* Turns off Vcc. */
/* */
/* Parameters: */
/* vol : Pointer identifying drive */
/* */
/*----------------------------------------------------------------------*/
void (*VccOff)(FLSocket vol);
#ifdef SOCKET_12_VOLTS
/*----------------------------------------------------------------------*/
/* V p p O n */
/* */
/* Turns on Vpp (12 Volts. Vpp must be known to be good on exit. */
/* */
/* Parameters: */
/* vol : Pointer identifying drive */
/* */
/* Returns: */
/* FLStatus : 0 on success, failed otherwise */
/*----------------------------------------------------------------------*/
FLStatus (*VppOn)(FLSocket vol);
/*----------------------------------------------------------------------*/
/* V p p O f f */
/* */
/* Turns off Vpp. */
/* */
/* Parameters: */
/* vol : Pointer identifying drive */
/* */
/*----------------------------------------------------------------------*/
void (*VppOff)(FLSocket vol);
#endif /* SOCKET_12_VOLTS */
/*----------------------------------------------------------------------*/
/* i n i t S o c k e t */
/* */
/* Perform all necessary initializations of the socket or controller */
/* */
/* Parameters: */
/* vol : Pointer identifying drive */
/* */
/* Returns: */
/* FLStatus : 0 on success, failed otherwise */
/*----------------------------------------------------------------------*/
FLStatus (*initSocket)(FLSocket vol);
/*----------------------------------------------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -