Microchip® Advanced Software Framework

eeprom.h File Reference

SAM EEPROM Emulator.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include <compiler.h>

Data Structures

struct  eeprom_emulator_parameters
 EEPROM memory parameter structure. More...
 

Macros

EEPROM Emulator Information
#define EEPROM_EMULATOR_ID   1
 Emulator scheme ID, identifying the scheme used to emulated EEPROM storage. More...
 
#define EEPROM_MAJOR_VERSION   1
 Emulator major version number, identifying the emulator major version. More...
 
#define EEPROM_MINOR_VERSION   0
 Emulator minor version number, identifying the emulator minor version. More...
 
#define EEPROM_REVISION   0
 Emulator revision version number, identifying the emulator revision. More...
 
#define EEPROM_PAGE_SIZE   (NVMCTRL_PAGE_SIZE - EEPROM_HEADER_SIZE)
 Size of the user data portion of each logical EEPROM page, in bytes. More...
 

Functions

Configuration and Initialization
enum status_code eeprom_emulator_init (void)
 Initializes the EEPROM Emulator service. More...
 
void eeprom_emulator_erase_memory (void)
 Erases the entire emulated EEPROM memory space. More...
 
enum status_code eeprom_emulator_get_parameters (struct eeprom_emulator_parameters *const parameters)
 Retrieves the parameters of the EEPROM Emulator memory layout. More...
 
Logical EEPROM Page Reading/Writing
enum status_code eeprom_emulator_commit_page_buffer (void)
 Commits any cached data to physical non-volatile memory. More...
 
enum status_code eeprom_emulator_write_page (const uint8_t logical_page, const uint8_t *const data)
 Writes a page of data to an emulated EEPROM memory page. More...
 
enum status_code eeprom_emulator_read_page (const uint8_t logical_page, uint8_t *const data)
 Reads a page of data from an emulated EEPROM memory page. More...
 
Buffer EEPROM Reading/Writing
enum status_code eeprom_emulator_write_buffer (const uint16_t offset, const uint8_t *const data, const uint16_t length)
 Writes a buffer of data to the emulated EEPROM memory space. More...
 
enum status_code eeprom_emulator_read_buffer (const uint16_t offset, uint8_t *const data, const uint16_t length)
 Reads a buffer of data from the emulated EEPROM memory space. More...