Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

1.8 Migration
Describes migration from the MDD File System Interface Library.
Description
Older versions of Microchip's software releases have included a FAT file system library called the MDD File System Interface
Library. For various reasons (functionality, code size, execution speed) you may wish to migrate from the MDDFS library to
this library. This topic will provide information to make this transition easier.
1.8.1 Initialization
Describes changes in initialization routines between the File I/O library and the MDD library.
Description
Because the File I/O library supports multiple drives, the method for initializing it has changed. To begin initializing the File
I/O library, the user must first call FILEIO_Initialize. This will initialize the library's structures in the same way that FSInit did
for the MDD library. Unlike FSInit, FILEIO_Initialize will not initialize the media accessed by the library,
In the MDD library, physical media access functions were tied to the library by definitions in a header file. In the File I/O
library, this information is provided to the library at run time to allow the library to access multiple devices dynamically. To
specify how to access a media device, the user will pass a pointer to a FILEIO_DRIVE_CONFIG structure and a pointer to a
structure containing media-specific parameters into the FILEIO_DriveMount function. These structures contain function
pointers to the functions that will allow the File I/O library to access the media. In most cases, the functions in the
FILEIO_DRIVE_CONFIG structure functions will be implemented in the media layer and the media-specific parameter
functions must be implemented by the user, if they are required. For more information, see the How the Library Works topic.
1.8.2 API Differences
Describes differences in the API between libraries.
Description
There are several differences between the File I/O and MDD API. The following table describes these differences.
File I/O Library API Nearest MDD API Notable Differences
FILEIO_MediaDetect - This API provides a middleware-level interface to the media detect
function.
FILEIO_Initialize,
FILEIO_Reinitialize,
FILEIO_DriveMount
FSInit Since the File I/O library supports multiple physical layers, the drive
mounting functionality was separated from the library initialization
functionality.
FILEIO_DriveUnmount -
FILEIO_Open FSfopen FILEIO_Open accepts full paths as arguments. Instead of an ASCII
mode string, it now accepts a logical OR of mode parameters. File
objects are now allocated by the user instead of the library and are
passed in as arguments. This function will now return
FILEIO_RESULT_SUCCESS/FAILURE instead of a file pointer or
NULL.
1.8 Migration MLA - File I/O Library Help API Differences
79

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh