Functions for working with EELITE and EEFULL.
Also, this function is useful for the crack.elf
Usage: #include <swilib.h> or #include <swilib/eeprom.h>
|
| typedef void(* | EELiteCallback) (int status) |
| | EELITE write-operation completion callback.
|
| |
| uint32_t | GetEELiteMaxID (void) |
| | Get the last ID of the EELITE blocks.
|
| |
| int | GetEELiteBlockSizeVersion (uint32_t block, int *size, char *version) |
| | Get info about the EELITE block.
|
| |
| void * | GetEELiteBlockAddress (short block) |
| | Get a pointer to the EELITE block data.
|
| |
| int | StartWriteEELiteBlock (uint32_t block, uint32_t size, uint32_t version, EELiteCallback callback) |
| | Begin writing to the EELITE block.
|
| |
| int | WriteEELiteBlock (uint32_t block, const void *buf, uint32_t offset, uint32_t size, EELiteCallback callback) |
| | Write data to the EELITE block.
|
| |
| int | FinishWriteEELiteBlock (uint32_t block, EELiteCallback callback) |
| | Finish writing to the EELITE block.
|
| |
| int | DeleteEELiteBlock (uint32_t block, EELiteCallback callback) |
| | Delete block in the EELITE.
|
| |
|
| uint32_t | GetEEFullMaxID (void) |
| | Get the last ID of the EEFULL blocks.
|
| |
| int | EEFullGetBlockInfo (uint32_t block, int *size, char *version) |
| | Get info about the EEFULL block.
|
| |
| void | EEFullReadBlock (int block, void *buf, int offset, int size, int cepid, int msg) |
| | Read block from the EEFULL.
|
| |
| void | EEFullWriteBlock (int block, const void *buf, int offset, int size, int cepid, int msg) |
| | Update block in the EEFULL.
|
| |
| int | EEFullDeleteBlock (uint32_t block, int cepid, int msg) |
| | Delete block in the EEFULL.
|
| |
| int | EEFullCreateBlock (uint32_t block, int size, int version, int cepid, int msg) |
| | Create new block in the EEFULL.
|
| |
◆ EELiteCallback
| typedef void(* EELiteCallback) (int status) |
EELITE write-operation completion callback.
- Parameters
-
| status | operation status; zero indicates success |
Definition at line 27 of file eeprom.h.
◆ GetEELiteMaxID()
| uint32_t GetEELiteMaxID |
( |
void | | ) |
|
Get the last ID of the EELITE blocks.
- Returns
- ID
◆ GetEELiteBlockSizeVersion()
| int GetEELiteBlockSizeVersion |
( |
uint32_t | block, |
|
|
int * | size, |
|
|
char * | version ) |
Get info about the EELITE block.
- Parameters
-
| block | EELITE block number |
| [out] | size | block size |
| [out] | version | block version |
- Returns
- 0 or error
◆ GetEELiteBlockAddress()
| void * GetEELiteBlockAddress |
( |
short | block | ) |
|
Get a pointer to the EELITE block data.
- Parameters
-
- Returns
- pointer to the block data
◆ StartWriteEELiteBlock()
| int StartWriteEELiteBlock |
( |
uint32_t | block, |
|
|
uint32_t | size, |
|
|
uint32_t | version, |
|
|
EELiteCallback | callback ) |
Begin writing to the EELITE block.
- Parameters
-
| block | EELITE block number |
| size | size of writing |
| version | block version; only the low byte is stored |
| callback | optional completion callback |
- Returns
- 0 or error
◆ WriteEELiteBlock()
| int WriteEELiteBlock |
( |
uint32_t | block, |
|
|
const void * | buf, |
|
|
uint32_t | offset, |
|
|
uint32_t | size, |
|
|
EELiteCallback | callback ) |
Write data to the EELITE block.
- Parameters
-
| block | EELITE block number |
| buf | new block data |
| offset | offset in the block |
| size | size to the write |
| callback | optional completion callback |
- Returns
- 0 or error
◆ FinishWriteEELiteBlock()
| int FinishWriteEELiteBlock |
( |
uint32_t | block, |
|
|
EELiteCallback | callback ) |
Finish writing to the EELITE block.
- Parameters
-
| block | EELITE block number |
| callback | optional completion callback |
- Returns
- 0 or error
◆ DeleteEELiteBlock()
Delete block in the EELITE.
- Parameters
-
| block | EELITE block number |
| callback | optional completion callback |
- Returns
- 0 or error
◆ GetEEFullMaxID()
| uint32_t GetEEFullMaxID |
( |
void | | ) |
|
Get the last ID of the EEFULL blocks.
- Returns
- ID
◆ EEFullGetBlockInfo()
| int EEFullGetBlockInfo |
( |
uint32_t | block, |
|
|
int * | size, |
|
|
char * | version ) |
Get info about the EEFULL block.
- Parameters
-
| block | EEFULL block number |
| [out] | size | block size |
| [out] | version | block version |
- Returns
- 0 or error
◆ EEFullReadBlock()
| void EEFullReadBlock |
( |
int | block, |
|
|
void * | buf, |
|
|
int | offset, |
|
|
int | size, |
|
|
int | cepid, |
|
|
int | msg ) |
Read block from the EEFULL.
- Parameters
-
| block | EEFULL block number |
| [out] | buf | output buffer for block data |
| offset | offset in the block data |
| size | size to the read |
| cepid | CEPID, set to 0xFFFF |
| msg | GBS message ID, set to 0 |
◆ EEFullWriteBlock()
| void EEFullWriteBlock |
( |
int | block, |
|
|
const void * | buf, |
|
|
int | offset, |
|
|
int | size, |
|
|
int | cepid, |
|
|
int | msg ) |
Update block in the EEFULL.
- Parameters
-
| block | EEFULL block number |
| buf | new block data |
| offset | offset in the block |
| size | size to the write |
| cepid | CEPID, set to 0xFFFF |
| msg | GBS message ID, set to 0 |
◆ EEFullDeleteBlock()
| int EEFullDeleteBlock |
( |
uint32_t | block, |
|
|
int | cepid, |
|
|
int | msg ) |
Delete block in the EEFULL.
- Parameters
-
| block | EEFULL block number |
| cepid | CEPID, set to 0xFFFF |
| msg | GBS message ID, set to 0 |
- Returns
- 0 or error
◆ EEFullCreateBlock()
| int EEFullCreateBlock |
( |
uint32_t | block, |
|
|
int | size, |
|
|
int | version, |
|
|
int | cepid, |
|
|
int | msg ) |
Create new block in the EEFULL.
- Parameters
-
| block | EEFULL block number |
| size | block size |
| version | block version |
| cepid | CEPID, set to 0xFFFF |
| msg | GBS message ID, set to 0 |
- Returns
- 0 or error