#include <stdio.h>#include <stdlib.h>#include <string.h>#include "eeprom_emulation.h"#include "hpm_crc32.h"Macros | |
| #define | E2P_OFFSET(TYPE, MEMBER) ((uint32_t)(&(((TYPE *)0)->MEMBER))) |
| #define | E2P_SWAP(a, b) |
Functions | |
| static E2P_ATTR void | e2p_print_info (e2p_t *e2p) |
| static E2P_ATTR hpm_stat_t | e2p_table_update (e2p_block *block) |
| static E2P_ATTR void | e2p_format (e2p_t *e2p) |
| static E2P_ATTR void | e2p_config_info (e2p_t *e2p) |
| static E2P_ATTR uint32_t | e2p_data_crc_calc (uint16_t length, uint8_t *data) |
| static E2P_ATTR hpm_stat_t | e2p_retrieve_info (uint32_t block_id, e2p_block *block) |
| static E2P_ATTR hpm_stat_t | e2p_write_private (e2p_t *e2p, uint32_t block_id, uint16_t length, uint8_t *data) |
| static E2P_ATTR int | e2p_info_table_sort (void) |
| static E2P_ATTR void | e2p_dummy_config (e2p_t *e2p) |
| static E2P_ATTR void | e2p_check_version (e2p_t *e2p) |
| static E2P_ATTR e2p_t * | e2p_get_valid_context (e2p_t *e2p, uint8_t *flush) |
| E2P_ATTR hpm_stat_t | e2p_config (e2p_t *e2p) |
| eeprom emulation config More... | |
| E2P_ATTR hpm_stat_t | e2p_flush (uint8_t flag) |
| eeprom emulation flush whole area, remove redundancy More... | |
| E2P_ATTR hpm_stat_t | e2p_write (uint32_t block_id, uint16_t length, uint8_t *data) |
| eeprom emulation write More... | |
| E2P_ATTR hpm_stat_t | e2p_read (uint32_t block_id, uint16_t length, uint8_t *data) |
| eeprom emulation read More... | |
| E2P_ATTR void | e2p_clear (void) |
| format whole area, 0xFF More... | |
| E2P_ATTR uint32_t | e2p_generate_id (const char *name) |
| generate custom id More... | |
| E2P_ATTR void | e2p_show_info (void) |
| show e2p instance info include config info and store info More... | |
Variables | |
| static e2p_t | e2p_dummy |
| static e2p_t * | e2p_raw |
| static e2p_t * | e2p_valid_ctx |
| static e2p_block | e2p_info_table [(100)] |
| #define E2P_OFFSET | ( | TYPE, | |
| MEMBER | |||
| ) | ((uint32_t)(&(((TYPE *)0)->MEMBER))) |
| #define E2P_SWAP | ( | a, | |
| b | |||
| ) |
| E2P_ATTR void e2p_clear | ( | void | ) |
format whole area, 0xFF
| E2P_ATTR hpm_stat_t e2p_config | ( | e2p_t * | e2p | ) |
eeprom emulation config
| e2p | instance context |
|
static |
| E2P_ATTR hpm_stat_t e2p_flush | ( | uint8_t | flag | ) |
eeprom emulation flush whole area, remove redundancy
| flag | E2P_FLUSH_TRY - conditional flush, E2P_FLUSH_BEGIN - force flush |
| E2P_ATTR uint32_t e2p_generate_id | ( | const char * | name | ) |
generate custom id
| name |
|
static |
| E2P_ATTR hpm_stat_t e2p_read | ( | uint32_t | block_id, |
| uint16_t | length, | ||
| uint8_t * | data | ||
| ) |
eeprom emulation read
| block_id | custom id |
| length | data length |
| data |
|
static |
| E2P_ATTR void e2p_show_info | ( | void | ) |
show e2p instance info include config info and store info
|
static |
| E2P_ATTR hpm_stat_t e2p_write | ( | uint32_t | block_id, |
| uint16_t | length, | ||
| uint8_t * | data | ||
| ) |
eeprom emulation write
| block_id | custom id |
| length | data length |
| data |
|
static |
|
static |
|
static |
|
static |
|
static |