#include <rtl.h>
int funinit (
const char *drive); /* drive to uninitialize */
Description
The funinit function uninitializes the Flash File System.
It can be used if during the application run time the drive volume to
be disabled for whatever reason (for example lowering power
consumption). After this function is called only the finit
function should be called for reinitialization of the drive.
The argument drive specifies the drive to be
uninitialized. The following options are allowed for the drive argument:
drive
UnInitialized Drives
NULL
All enabled drives
""
Default system drive
"F:" or "F0:"
Flash drive
"S:" or "S0:"
SPI Flash drive
"R:" or "R0:"
RAM drive
"M:" or "M0:"
Memory Card drive 0
"M1:"
Memory Card drive 1
"U:" or "U0:"
USB Flash drive 0
"U1:"
USB Flash drive 1
"N:" or "N0:"
NAND Flash drive 0
"N1:"
NAND Flash drive 1
The funinit function is in the RL-FlashFS library. The
prototype is defined in rtl.h.
#include <rtl.h>
void main (void) {
FILE *f;
/* Initialize the M: drive. */
if (finit ("M:") == 0) {
/* Update a log file on SD card. */
f = fopen ("M:\\Logs\\Test_file.log","a");
if (f == NULL) {
printf ("Failed to create a file!\n");
}
else {
// write data to file
fclose (f);
}
/* The drive is no more needed. */
funinit ("M:");
}
..
}
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.