📄 _flsoc.h
字号:
/***********************************************************************************/
/* M-Systems Confidential */
/* Copyright (C) M-Systems Flash Disk Pioneers Ltd. 1995-2003 */
/* 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 */
/***********************************************************************************/
/*
* $Log: V:/PVCSDB/DiskOnChip/archives/general storage/TrueFFS/src/include/_flsoc.h-arc $
*
* Rev 1.0 Apr 09 2003 12:16:02 OriS
* Initial revision.
*
*/
#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 */
PowerState DPDState; /* Actual DPD state */
FLByte curPartition; /* Current partition to use the socket (set busy) */
#ifdef VERIFY_WRITE
FLByte verifyWrite; /* VerifyWrite mode */
#endif /* VERIFY_WRITE */
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 */
FLSDword 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 + -