#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:");
}
..
}
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.