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

📄 file.lst

📁 该源码是基于atmel公司的89C51SND1C的mp3解决方案
💻 LST
字号:
C51 COMPILER V7.00  FILE                                                                   04/28/2004 09:32:00 PAGE 1   


C51 COMPILER V7.00, COMPILATION OF MODULE FILE
OBJECT MODULE PLACED IN C:\Documents and Settings\lvxc\桌面\AA\file.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE modules\file\file.c OPTIMIZE(7,SPEED) BROWSE INCDIR(.\modules\system;.\;.\;
                    -.\lib_refd) DEFINE(KEIL) DEBUG OBJECTEXTEND PRINT(.\file.lst) OBJECT(C:\Documents and Settings\lvxc\桌面\AA\file.obj)

stmt level    source

   1          /*C**************************************************************************
   2          * NAME:         file.c
   3          *----------------------------------------------------------------------------
   4          * Copyright (c) 2003 Atmel.
   5          *----------------------------------------------------------------------------
   6          * RELEASE:      snd1c-refd-nf-4_0_3      
   7          * REVISION:     1.10     
   8          *----------------------------------------------------------------------------
   9          * PURPOSE:
  10          * This file contains extention routines to the file system
  11          *****************************************************************************/
  12          
  13          /*_____ I N C L U D E S ____________________________________________________*/
  14          
  15          #include "config.h"                         /* system configuration   */
  16          #include "modules\display\disp_task.h"      /* display definition */
  17          #include "file.h"                           /* file system definition */
  18          
  19          /*_____ M A C R O S ________________________________________________________*/
  20          
  21          #define F_SEEK_TIME ((Byte)4)
  22          
  23          extern  bit     fs_memory;          /* selected file system */
  24          
  25          /*_____ D E F I N I T I O N ________________________________________________*/
  26          
  27          
  28          /*_____ D E C L A R A T I O N ______________________________________________*/
  29          
  30          
  31          /*F**************************************************************************
  32          * NAME: file_seek_prev
  33          *----------------------------------------------------------------------------
  34          * PARAMS:
  35          *   id: file type identifier
  36          *   loop: loop to the last file
  37          *
  38          * return:
  39          *----------------------------------------------------------------------------
  40          * PURPOSE:
  41          *   Select previous file with specified extension
  42          *----------------------------------------------------------------------------
  43          * EXAMPLE:
  44          *----------------------------------------------------------------------------
  45          * NOTE:
  46          *   Depending on the time played, this function selects the previous file
  47          *   or restarts the file under playing.
  48          *----------------------------------------------------------------------------
  49          * REQUIREMENTS:
  50          *****************************************************************************/
  51          bit file_seek_prev (Byte id, bit loop)
  52          {
  53   1        if ((disp_get_sec() < F_SEEK_TIME) && (disp_get_min() == 0))
  54   1        {
C51 COMPILER V7.00  FILE                                                                   04/28/2004 09:32:00 PAGE 2   

  55   2          while (File_goto_prev() == OK)
  56   2          {
  57   3            /* a file or a directory exists */
  58   3            if ((File_type() & id) != 0)            /* specified file type found */
  59   3            { 
  60   4              return TRUE;                          /* exit when found */
  61   4            }
  62   3          }
  63   2          /* beginning of dir */
  64   2          if (File_goto_last() == OK)               /* goto to the end of dir */
  65   2          {
  66   3            if (loop)                               /* loop = false when ask previous and play */
  67   3            {
  68   4              do
  69   4              {
  70   5                if ((File_type() & id) != 0)          /* look for a specified file */
  71   5                {                                     /* specified file type found */
  72   6                  return TRUE;                        /* exit when found */
  73   6                }
  74   5              }
  75   4              while (File_goto_prev() == OK);
  76   4              return FALSE;
  77   4            }
  78   3            else                                    /* no loop */
  79   3            {
  80   4              return FALSE;                         /* Stop at the last */
  81   4            }
  82   3          }
  83   2          else
  84   2            return FALSE;
  85   2        }
  86   1        return TRUE;
  87   1      }
  88          
  89          
  90          /*F**************************************************************************
  91          * NAME: file_seek_next
  92          *----------------------------------------------------------------------------
  93          * PARAMS:
  94          *   id:   file type identifier
  95          *   loop: loop to the first file
  96          *
  97          * return:
  98          *----------------------------------------------------------------------------
  99          * PURPOSE:
 100          *   Select next file with specified extension
 101          *----------------------------------------------------------------------------
 102          * EXAMPLE:
 103          *----------------------------------------------------------------------------
 104          * NOTE:
 105          *----------------------------------------------------------------------------
 106          * REQUIREMENTS:
 107          *****************************************************************************/
 108          bit file_seek_next (Byte id, bit loop)
 109          {
 110   1        
 111   1        while (File_goto_next() == OK)
 112   1        {
 113   2          /* file or dir found */
 114   2          if ((File_type() & id) != 0)
 115   2          { /* specified file type found */
 116   3            return TRUE;                          /* exit when found */
C51 COMPILER V7.00  FILE                                                                   04/28/2004 09:32:00 PAGE 3   

 117   3          }
 118   2        }
 119   1                                                  /* end of dir */
 120   1        if (File_goto_first() == OK)              /* goto beginning of the dir */
 121   1        {
 122   2          if (loop)                               /* loop ? */
 123   2          {                                       /* re-start at the beginning */
 124   3            do
 125   3            {
 126   4              if ((File_type() & id) != 0)        /* look for a specified file */
 127   4              {                                   /* specified file type found */
 128   5                return TRUE;                      /* exit when found */
 129   5              }
 130   4            }
 131   3            while (File_goto_next() == OK);      
 132   3            return FALSE;                         /* no specified file in the dir */
 133   3          }
 134   2          else                                    /* no loop */
 135   2          {
 136   3            return FALSE;                         /* Stop at the beginning */
 137   3          }
 138   2        }
 139   1        else
 140   1          return FALSE;
 141   1      }
 142          
 143          
 144          /*F**************************************************************************
 145          * NAME: file_entry_dir
 146          *----------------------------------------------------------------------------
 147          * PARAMS:
 148          *   id: file type identifier
 149          *
 150          * return:
 151          *   OK: file type found in dir
 152          *   KO: file type not found in dir
 153          *----------------------------------------------------------------------------
 154          * PURPOSE:
 155          *   Enter a directory
 156          *----------------------------------------------------------------------------
 157          * EXAMPLE:
 158          *----------------------------------------------------------------------------
 159          * NOTE:
 160          *----------------------------------------------------------------------------
 161          * REQUIREMENTS:
 162          *****************************************************************************/
 163          bit file_entry_dir (Byte id)
 164          {
 165   1        if (File_type() == FILE_DIR)              /* only for directory! */
 166   1        { /* stopped on a directory */
 167   2          if (File_goto_child(id) == KO)
 168   2          {
 169   3            /* no file in dir */
 170   3            File_goto_parent(id);
 171   3            return KO;
 172   3          }
 173   2          else
 174   2           return OK;
 175   2        }
 176   1        else
 177   1        {
 178   2          return KO;
C51 COMPILER V7.00  FILE                                                                   04/28/2004 09:32:00 PAGE 4   

 179   2        }
 180   1      }
 181          
 182          
 183          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    133    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----       3
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----       2
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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