This section describes functions and macros of the driver's API.
#define FTFA_WriteArray |
( |
|
pDst, |
|
|
|
pSrc, |
|
|
|
size |
|
) |
| |
This function writes array into flash memory starting at address specified by pDst parameter.
- Parameters
-
pDst | Pointer to the starting address of the flash memory. The supplied address must be longword aligned. |
pSrc | Pointer to the source array in RAM to be written. The supplied address must be longword aligned. |
size | Size of the array in number of bytes (must be aligned to long words). |
- Returns
- number of bytes written into flash memory.
- Note
- Implemented as a function call.
- Warning
- Re-programming of existing 0s to 0 is not allowed as this overstresses the device. This function executes from RAM.
- See also
- FTFA_WriteW32, FTFA_EraseSector, FTFA_ReadArray
#define FTFA_ReadArray |
( |
|
pSrc, |
|
|
|
pDst, |
|
|
|
size |
|
) |
| |
This function reads array from flash memory starting at address specified by pSrc parameter.
- Parameters
-
pSrc | Pointer to the starting of the flash memory. The supplied address must be longword aligned. |
pDst | Pointer to the destination array in RAM. The supplied address must be longword aligned. |
size | Size of the array in number of bytes (must be aligned to long words). |
- Returns
- number of bytes read from flash memory.
- Note
- Implemented as a function call. You can use also memcpy() function.
- See also
- FTFA_WriteArray
#define FTFA_WriteW32 |
( |
|
pDst, |
|
|
|
val |
|
) |
| |
This function writes long word into flash memory starting at address specified by pDst parameter.
- Parameters
-
pDst | Pointer to the starting address of the flash memory. The supplied address must be longword aligned. |
val | uint32 value to be written into flash memory. |
- Returns
- number of bytes written into flash memory.
- Note
- Implemented as a function call.
- Warning
- This function executes from RAM.
- See also
- FTFA_WriteArray, FTFA_EraseSector
#define FTFA_EraseSector |
( |
|
pDst | ) |
|
This function erases all bytes in the 1 KB sector of the flash memory starting at address in the flash sector to be erased.
- Parameters
-
pDst | Pointer to the starting address of the flash memory. The supplied address must be longword aligned. |
- Note
- Implemented as a function call.
- Warning
- Use erase operation to restore bits from '0' to '1'; bits cannot be programmed from a '0' to a '1'. This function executes from RAM.
- See also
- FTFA_WriteW32, FTFA_WriteArray
#define FTFA_ReadIFR |
( |
|
addr | ) |
|
This function reads four bytes from Flash Information Row (IFR) starting at address specified by addr parameter.
- Parameters
-
addr | Longword aligned address in range 0x00 to 0xFF hexadecimal. |
- Returns
- uint32 four bytes.
- Note
- Implemented as a function call.