#include <mios32.h>
#include "eeprom.h"
Defines | |
#define | PAGE0_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + 0x000)) |
#define | PAGE0_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (PAGE_SIZE - 1))) |
#define | PAGE1_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + PAGE_SIZE)) |
#define | PAGE1_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (2 * PAGE_SIZE - 1))) |
#define | PAGE0 ((uint16_t)0x0000) |
#define | PAGE1 ((uint16_t)0x0001) |
#define | NO_VALID_PAGE ((uint16_t)0x00AB) |
#define | ERASED ((uint16_t)0xFFFF) |
#define | RECEIVE_DATA ((uint16_t)0xEEEE) |
#define | VALID_PAGE ((uint16_t)0x0000) |
#define | READ_FROM_VALID_PAGE ((uint8_t)0x00) |
#define | WRITE_IN_VALID_PAGE ((uint8_t)0x01) |
#define | PAGE_FULL ((uint8_t)0x80) |
Functions | |
s32 | EEPROM_Init (u32 mode) |
Restore the pages to a known good state in case of page's status corruption after a power loss. | |
s32 | EEPROM_Read (u16 VirtAddress) |
Returns the last stored variable data, if found, which correspond to the passed virtual address. | |
s32 | EEPROM_Write (u16 VirtAddress, u16 Data) |
Writes/upadtes variable data in EEPROM. | |
s32 | EEPROM_SendDebugMessage (u32 mode) |