Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
languagecpp
void

...

 FSDev_NOR_LowDefrag (CPU_CHAR 

...

*name_dev,

...


                          FS_ERR

...

   *p_err);


File

Called from

Code enabled by

fs_dev_nor.c

Application

N/A

Low-level defragment a NOR device.

Arguments

name_dev

Device name (see  Note #1).

p_err

Pointer to variable that will the receive return error code from this function:

FS_ERR_NONE

Device low-level defragmented successfully.

FS_ERR_NAME_NULL

Argument name_dev passed a NULL pointer.

FS_ERR_DEV_INVALID

Argument name_dev specifies an invalid device

FS_ERR_DEV_NOT_OPEN

Device is not open.

FS_ERR_DEV_NOT_PRESENT

Device is not present.

FS_ERR_DEV_INVALID_LOW_FMT

Device needs to be low-level formatted.

FS_ERR_DEV_IO

Device I/O error.

FS_ERR_DEV_TIMEOUT

Device timeout.

Returned Value

None.

Notes/Warnings

  1. The device must be a NOR device (e.g., “nor:0:”).
  2. Defragmentation groups sectors containing high-level data into as few blocks as possible, in order of logical sector. A defragmented file system should have near-optimal access speeds in a read-only environment.