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

📄 flsysfun.h

📁 H3 M-system NAND flash driver in Linux OS, M-DOC driver
💻 H
字号:
/****************************************************************************** *                                                                            * * Project: DOC Driver for Linux 2.4 Block device driver for mDOC H3  family  * * of devices under Linux kernel 2.4.                                         * *                                                                            * *   Version: 1.0                                                             * *   Email questions to: oemsupport@sandisk.com                               * *   Copyright (C) SanDisk IL Ltd. 1995 - 2007                                * *   SanDisk IL Ltd., 7 Atir Yeda Street, Kfar Saba 44425, Israel             * *                                                                            * ****************************************************************************** *                                                                            * * This program is free software; you can redistribute it and/or modify it    * * under the terms of the GNU General Public License as published by the Free * * Software Foundation; either version 2 of the License, or any later version.* * This program is distributed in the hope that it will be useful, but WITHOUT* * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      * * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for  * * more details, which is set forth in the readme.txt file.                   * * You should have received a copy of the GNU General Public License along    * * with this program; if not, write to the Free Software Foundation, Inc., 51 * * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA                    * *                                                                            * * This License does not grant you any right to use the trademarks, service   * * marks or logos of SanDisk IL Ltd. or SanDisk Corporation.                  * * Subject to the foregoing, SanDisk IL Ltd., for itself and on behalf of its * * licensors, hereby reserves all intellectual property rights in the program,* * except for the rights expressly granted in this License.                   * *                                                                            * ******************************************************************************//*
 * $Log:   V:/PVCSDB/DiskOnChip/archives/Testing/TrueFFS 6.3/Drop 2.5/3/common/flsysfun.h-arc  $
 * 
 *    Rev 1.7   Sep 11 2006 13:45:24   yaniv.iarovici
 * Legal header added
 * 
 *    Rev 1.6   Aug 09 2006 16:52:52   Polina.Marimont
 * initial for DOC Driver 1.0
 */

#ifndef FLSYSFUN_H
#define FLSYSFUN_H


/*----------------------------------------------------------------------*/
/*                       f l S y s f u n I n i t                        */
/*                                                                      */
/* Do any necessary initialization for routines in this module.         */
/*                                                                      */
/* Called from fatlite.c (flInit)                                       */
/*                                                                      */
/* Parameters:                                                          */
/*      None                                                            */
/*                                                                      */
/*----------------------------------------------------------------------*/

extern void flSysfunInit(void);


/*----------------------------------------------------------------------*/
/*                         f l R a n d B y t e                          */
/*                                                                      */
/* Returns a random number between 0 and 255                            */
/*                                                                      */
/* Called from FTLLITE.C                                                */
/*                                                                      */
/* Parameters:                                                          */
/*      None                                                            */
/*                                                                      */
/* Returns:                                                             */
/*        A random number between 0 and 255                             */
/*----------------------------------------------------------------------*/

extern unsigned flRandByte(void);


/*----------------------------------------------------------------------*/
/*                      f l I n s t a l l T i m e r                     */
/*                                                                      */
/* Installs an interval timer.                                          */
/* The implementation of this routine usually means hooking a clock     */
/* interrupt. The polling interval is specified as a parameter. If the  */
/* clock frequency is faster, the interval timer should count several   */
/* clock ticks before calling the interval routine.                     */
/*                                                                      */
/* This routine is necessary if POLLING_INTERVAL (custom.h) is greater  */
/* than 0. In this case this routine will be called from socket.c       */
/* (init). It will be called to install 'socketIntervalRoutine' with a  */
/* period specified by POLLING_INTERVAL.                                */
/*                                                                      */
/* Parameters:                                                          */
/*      routine                : Routine to call at each interval       */
/*        interval        : Milliseconds per polling interval           */
/*                                                                      */
/* Returns:                                                             */
/*         FLStatus        : 0 on success, otherwise failure            */
/*----------------------------------------------------------------------*/

extern FLStatus flInstallTimer(void (*routine)(void), unsigned interval);


#ifdef FL_EXIT

/*----------------------------------------------------------------------*/
/*                      f l R e m o v e T i m e r                       */
/*                                                                      */
/* Removes the active interval timer.                                   */
/* This routine removes the active interval timer set by 'removeTimer'. */
/*                                                                      */
/* Parameters:                                                          */
/*      None                                                            */
/*                                                                      */
/*----------------------------------------------------------------------*/

extern void flRemoveTimer(void);

#endif


/*----------------------------------------------------------------------*/
/*                       f l C u r r e n t D a t e                      */
/*                                                                      */
/* Returns the current DOS-format date                                  */
/*                                                                      */
/* The DOS date format is documented in dosformt.h.                     */
/*                                                                      */
/* If a TOD clock is not available, return the value of 1/1/80.         */
/*                                                                      */
/* Parameters:                                                          */
/*      None                                                            */
/*                                                                      */
/* Returns:                                                             */
/*        Current date                                                  */
/*----------------------------------------------------------------------*/

extern unsigned flCurrentDate(void);


/*----------------------------------------------------------------------*/
/*                      f l C u r r e n t T i m e                       */
/*                                                                      */
/* Returns the current DOS-format time                                  */
/*                                                                      */
/* The DOS time format is documented in dosformt.h.                     */
/*                                                                      */
/* If a TOD clock is not available, return the value of 0:00 AM.        */
/*                                                                      */
/* Parameters:                                                          */
/*      None                                                            */
/*                                                                      */
/* Returns:                                                             */
/*        Current time                                                  */
/*----------------------------------------------------------------------*/

extern unsigned flCurrentTime(void);


/*----------------------------------------------------------------------*/
/*                      f l C r e a t e M u t e x                       */
/*                                                                      */
/* Creates and initializes a mutex object                               */
/*                                                                      */
/* The mutex is initializes as not owned by anyone.                     */
/*                                                                      */
/* Parameters:                                                          */
/*      mutex                : Pointer to mutex object                  */
/*                                                                      */
/* Returns:                                                             */
/*         FLStatus        : 0 on success, otherwise failure            */
/*----------------------------------------------------------------------*/

extern FLStatus flCreateMutex(FLMutex *mutex);


/*----------------------------------------------------------------------*/
/*                      f l D e l e t e M u t e x                       */
/*                                                                      */
/* Destroys a mutex object                                              */
/*                                                                      */
/* This function frees any resources taken by flCreateMutex.            */
/*                                                                      */
/* Parameters:                                                          */
/*      mutex                : Pointer to mutex object                  */
/*                                                                      */
/* Returns:                                                             */
/*         None                                                         */
/*----------------------------------------------------------------------*/

extern void flDeleteMutex(FLMutex *mutex);


/*----------------------------------------------------------------------*/
/*                        f l T a k e M u t e x                         */
/*                                                                      */
/* Attempts to take ownership of a mutex. If the mutex is currently not */
/* owned, TRUE is returned and the mutex becomes owned. If the mutex is */
/* currently owned, FALSE is returned and ownership is not taken.       */
/*                                                                      */
/* Parameters:                                                          */
/*      mutex                : Pointer to mutex object                  */
/*                                                                      */
/* Returns:                                                             */
/*         FLBoolean        : TRUE if ownership taken, FALSE otherwise  */
/*----------------------------------------------------------------------*/

extern FLBoolean flTakeMutex(FLMutex *mutex);


/*----------------------------------------------------------------------*/
/*                        f l F r e e M u t e x                         */
/*                                                                      */
/* Frees ownership of a mutex                                           */
/*                                                                      */
/* Parameters:                                                          */
/*      mutex                : Pointer to mutex object                  */
/*                                                                      */
/* Returns:                                                             */
/*         None                                                         */
/*----------------------------------------------------------------------*/

extern void flFreeMutex(FLMutex *mutex);


#endif /* FLSYSFUN_H */

⌨️ 快捷键说明

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