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

📄 flsystem.c

📁 M-System DOC(Disk on a Chip) Flash芯片映像读写工具, 可以进行二片Flash芯片的内容互相拷贝, 提高烧录程序的效率.
💻 C
字号:
/************************************************************************/
/*                                                                      */
/*              FAT-FTL Lite Software Development Kit                   */
/*              Copyright (C) M-Systems Ltd. 1995-2003                  */
/*                                                                      */
/************************************************************************/

#include "flbase.h"
#include <time.h>
#include <stdlib.h>
#include <dos.h>
#include <conio.h>


/*----------------------------------------------------------------------*/
/*                    f l S y s f u n I n i t                           */
/*                                                                      */
/* Perform system initialization.                                       */
/*                                                                      */
/* Note : This example file did not support a valid implementation.     */
/*----------------------------------------------------------------------*/

void flSysfunInit(void)
{
   /* Initialize system resource */
}


/*----------------------------------------------------------------------*/
/*                    f l S y s f u n E x i t                           */
/*                                                                      */
/* Free any system resources taken by TrueFFS.                          */
/*                                                                      */
/* This routine was added in TtueFFS 6.0 and is prorotyped in           */
/* flsystems.h using the FL_SYS_FUNC_RELEASE macro.                     */
/*                                                                      */
/* Note : This example file did not support a valid implementation.     */
/*----------------------------------------------------------------------*/

void flSysfunExit()
{
   /* Free system resource */
}


/*----------------------------------------------------------------------*/
/*                       f l D e l a y M s e c s                        */
/*                                                                      */
/* Wait for specified number of milliseconds.                           */
/*                                                                      */
/* Parameters:                                                          */
/*      milliseonds     : Minimum number of milliseconds to wait        */
/*                                                                      */
/* Note : This routine requires the DOS.H include file.                 */
/*----------------------------------------------------------------------*/

void flDelayMsecs(unsigned milliseconds)
{
}


/*----------------------------------------------------------------------*/
/*                        f l s l e e p                                 */
/*                                                                      */
/* Wait number of milliseconds with yield CPU.                          */
/*                                                                      */
/* Parameters:                                                          */
/*      msec            : Minimum number of milliseconds to wait        */
/*                                                                      */
/* Note : This routine can not be implemented in DOS, since it does not */
/*        support task. Also not that un-commenting DO_NOT_YIELD_CPU in */
/*        flsystemh eliminates the need for this routine.               */
/*----------------------------------------------------------------------*/

void flsleep(unsigned long msec)
{
   /* Give CPU at least msec */
}


/*----------------------------------------------------------------------*/
/*                     f l C r e a t e M u t e x                        */
/*                                                                      */
/* Creates or initializes a mutex                                       */
/*                                                                      */
/* Parameters:                                                          */
/*      mutex           : Pointer to mutex                              */
/*                                                                      */
/* Returns:                                                             */
/*      FLStatus        : 0 on success, otherwise failure               */
/*----------------------------------------------------------------------*/

FLStatus flCreateMutex(FLMutex *mutex)
{
  *mutex = 0;
  return flOK;
}

/*----------------------------------------------------------------------*/
/*                     f l D e l e t e M u t e x                        */
/*                                                                      */
/* Deletes a mutex.                                                     */
/*                                                                      */
/* Parameters:                                                          */
/*      mutex           : Pointer to mutex                              */
/*                                                                      */
/*----------------------------------------------------------------------*/

void flDeleteMutex(FLMutex *mutex)
{
}

/*----------------------------------------------------------------------*/
/*                      f l T a k e M u t e x                           */
/*                                                                      */
/* Try to take mutex, if free.                                          */
/*                                                                      */
/* Parameters:                                                          */
/*      mutex           : Pointer to mutex                              */
/*                                                                      */
/* Returns:                                                             */
/*      int             : TRUE = Mutex taken, FALSE = Mutex not free    */
/*----------------------------------------------------------------------*/

FLBoolean flTakeMutex(FLMutex *mutex)
{
  (*mutex)++;
  if (*mutex > 1) {
    (*mutex)--;
    return FALSE;
  }

  return TRUE;
}

/*----------------------------------------------------------------------*/
/*                        f l F r e e M u t e x                         */
/*                                                                      */
/* Free mutex.                                                          */
/*                                                                      */
/* Parameters:                                                          */
/*      mutex           : Pointer to mutex                              */
/*                                                                      */
/*----------------------------------------------------------------------*/

void flFreeMutex(FLMutex *mutex)
{
  (*mutex)--;
}


/*----------------------------------------------------------------------*/
/*                        f l R a n d B y t e                           */
/*                                                                      */
/* Return a random number from 0 to 255.                                */
/*                                                                      */
/* Note : This example file did not support a valid implementation.     */
/*----------------------------------------------------------------------*/

unsigned flRandByte(void)
{
   return 0;
}

/*----------------------------------------------------------------------*/
/*                         f l C u r r e n t T i m e                    */
/*                                                                      */
/* Return current DOS time.                                             */
/*                                                                      */
/* The DOS time field is encoded as follows:                            */
/*    bit 0-4   : Seconds divided by 2 (0-29)                           */
/*    bit 5-10  : Minutes (0-59)                                        */
/*    bit 11-15 : Hours (0-23)                                          */
/*                                                                      */
/* Note : This example file did not support a valid implementation.     */
/*----------------------------------------------------------------------*/

unsigned flCurrentTime(void)
{
   return 0;
}

/*----------------------------------------------------------------------*/
/*                         f l C u r r e n t D a t e                    */
/*                                                                      */
/* Return current DOS date.                                             */
/*                                                                      */
/* The DOS time field is encoded as follows:                            */
/*    bit 0-4   : Day of month (1-31)                                   */
/*    bit 5-10  : Month (1-12)                                          */
/*    bit 11-15 : Year relative to 1980                                 */
/*                                                                      */
/* Note : This example file did not support a valid implementation.     */
/*----------------------------------------------------------------------*/

unsigned flCurrentDate(void)
{
   return 0;
}

⌨️ 快捷键说明

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