f_format


Use this function to format the specified drive.

If the media is not present, this function fails. If the call is successful, all data on the specified volume are destroyed and any open files are closed.

Format

unsigned char f_format ( void )

Arguments

None.

Return values

Return value Description
F_NOERR Successful execution.
Else See Error Codes.

Example

void myinitfs()
{
    unsigned char ret;
    f_initvolume();
    ret = f_format();
    if (ret)
    {
        printf( "Unable to format drive! Error %d", ret );
    }
    else
    {
        printf( "Drive formatted correctly" );
    }
    .
    .
}