- Main Page
- Modules
- Data Structures
- Files
- Related Pages

# Core
[Architecture]

### Organisation

### Configuration

The following defines must be included in a conf_explorer.h header file :

    // Include header file to provide the memory routines (e.g. memset(), memcpy_ram2ram() ...)
    #define LIB_MEM               <string.h>
    // Include header file to provide the disk access routines (e.g. ram_2_memory(), mem_wr_protect() ...)
    #define LIB_CTRLACCESS        "ctrl_access.h"

    // Supported FATs (\c ENABLED or \c DISABLED).
    #define FS_FAT_12             ENABLED
    #define FS_FAT_16             ENABLED
    #define FS_FAT_32             ENABLED

    // The explorer may support either the ASCII or the UNICODE string format, or both.
    #define FS_ASCII              DISABLED
    #define FS_UNICODE            ENABLED

    // The navigator may support only the first partition (\c DISABLED), or multiple partitions (\c ENABLED).
    #define FS_MULTI_PARTITION    DISABLED

    // Level of features in File system core.
    // Select among:
    //  - FSFEATURE_READ:           All read functions.
    //  - FSFEATURE_WRITE:          nav_file_copy(), nav_file_paste(), nav_file_del(), file_create(), file_open(MODE_WRITE), file_write(), file_putc().
    //  - FSFEATURE_WRITE_COMPLET:  FSFEATURE_WRITE functions and nav_drive_format(), nav_dir_make(), nav_file_rename(), nav_file_dateset(), nav_file_attributset().
    //  - FSFEATURE_ALL:            All functions.
    #define FS_LEVEL_FEATURES     (FSFEATURE_READ | FSFEATURE_WRITE_COMPLET)

    // Number of caches used to store a cluster list of files (interesting in case of many `open file').
    // In player mode, 1 is OK (shall be > 0).
    #define FS_NB_CACHE_CLUSLIST  3

    // Maximal number of simultaneous navigators.
    #define FS_NB_NAVIGATOR       3

    // The navigator use the following ID to open the `copy file' and the current ID to create the `paste file'.
    #define FS_NAV_ID_COPYFILE    2 // Must be different of current ID used when the paste routine is called.

### Interfaces

FAT System
  It is the module low level, this one decodes the FAT structure.
  All routines of the module are private and can't be called by a user. See fat.c,fat_unusual.c

Navigation
  This module provides the routines :
  - to select an ID navigator
  - to move in directory tree
  - to modify directory tree
  - to get information about disk/dir/file
    The complete user interface is the public routine provided in the navigation.c C files.

File
  This module provides the file I/O control.
  The routines file_getc() and file_putc() are too slow to transfer many data.
  The file_read_buf() and file_write_buf() are developed to transfer many data between the RAM and a file on a memory.

Note:
  These routines optimize the transfer and if a DMA exists between RAM and memory then it is used.

The file_read() and file_write() are developed to transfer many data between a file and another memory or a specific interface.

Note:
  These routines don't transfer data, but provide an information on the disk segment corresponding to the file.
  Overside, it is not necessary to transfer data in the RAM and the chip can use a DMA between two disks to save time.

The complete user interface is the public routine provided in the file.c C files.

Memory interface
  The interfaces with the memory are :
  - mem_test_unit_ready()
  - mem_wr_protect()
  - memory_2_ram()
  - ram_2_memory()