IAP_internal_flash_write
« Back to documentation index
IAP Class Reference
IAP Class Reference
#include <IAP.h>
Detailed Description
IAP class
Interface for internal flash memory access
Definition at line 186 of file IAP.h.
Constructor & Destructor Documentation
Constructor for IAP
Definition at line 200 of file IAP.h.
Member Function Documentation
| int blank_check |
( |
int |
start, |
|
|
int |
end | |
|
) |
| | |
Blank check sector(s)
- Parameters:
-
| start | a Start Sector Number |
| end | an End Sector Number (should be greater than or equal to start sector number). |
- Returns:
- error code: CMD_SUCCESS | BUSY | SECTOR_NOT_BLANK | INVALID_SECTOR
Definition at line 91 of file IAP.cpp.
| int compare |
( |
char * |
source_addr, |
|
|
char * |
target_addr, |
|
|
int |
size | |
|
) |
| | |
Compare <address1> <address2> <no of="" bytes>="">
- Parameters:
-
| source_addr | Starting flash or RAM address of data bytes to be compared. This address should be a word boundary. |
| target_addr | Starting flash or RAM address of data bytes to be compared. This address should be a word boundary. |
| size | Number of bytes to be compared; should be a multiple of 4. |
- Returns:
- error code: CMD_SUCCESS | COMPARE_ERROR | COUNT_ERROR (Byte count is not a multiple of 4) | ADDR_ERROR | ADDR_NOT_MAPPED
Definition at line 168 of file IAP.cpp.
| int erase |
( |
int |
start, |
|
|
int |
end | |
|
) |
| | |
Erase Sector(s)
- Parameters:
-
| start | a Start Sector Number |
| end | an End Sector Number (should be greater than or equal to start sector number). |
- Returns:
- error code: CMD_SUCCESS | BUSY | SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION | INVALID_SECTOR
Definition at line 109 of file IAP.cpp.
| int prepare |
( |
int |
start, |
|
|
int |
end | |
|
) |
| | |
Prepare sector(s) for write operation
- Parameters:
-
| start | a Start Sector Number |
| end | an End Sector Number (should be greater than or equal to start sector number). |
- Returns:
- error code: CMD_SUCCESS | BUSY | INVALID_SECTOR
Definition at line 128 of file IAP.cpp.
Read part identification number
- Returns:
- device ID
- See also:
- read_serial()
Definition at line 58 of file IAP.cpp.
Read device serial number
- Returns:
- device serial number
- See also:
- read_ID()
Definition at line 74 of file IAP.cpp.
| int reserved_flash_area_size |
( |
void |
|
) |
|
| char * reserved_flash_area_start |
( |
void |
|
) |
|
| int write |
( |
char * |
source_addr, |
|
|
char * |
target_addr, |
|
|
int |
size | |
|
) |
| | |
Copy RAM to Flash
- Parameters:
-
| source_addr | Source RAM address from which data bytes are to be read. This address should be a word boundary. |
| target_addr | Destination flash address where data bytes are to be written. This address should be a 256 byte boundary. |
| size | Number of bytes to be written. Should be 256 | 512 | 1024 | 4096. |
- Returns:
- error code: CMD_SUCCESS | SRC_ADDR_ERROR (Address not a word boundary) | DST_ADDR_ERROR (Address not on correct boundary) | SRC_ADDR_NOT_MAPPED | DST_ADDR_NOT_MAPPED | COUNT_ERROR (Byte count is not 256 | 512 | 1024 | 4096) | SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION | BUSY
Definition at line 147 of file IAP.cpp.