Microchip® Advanced Software Framework

rww_eeprom.h File Reference

SAM Read While Write EEPROM Emulator.

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

#include <compiler.h>

Data Structures

struct  rww_eeprom_emulator_parameters
 RWW EEPROM memory parameter structure. More...
 

Macros

RWW EEPROM Emulator Information
#define RWW_EEPROM_EMULATOR_ID   1
 Emulator scheme ID, identifying the scheme used to emulated EEPROM storage. More...
 
#define RWW_EEPROM_MAJOR_VERSION   1
 Emulator major version number, identifying the emulator major version. More...
 
#define RWW_EEPROM_MINOR_VERSION   0
 Emulator minor version number, identifying the emulator minor version. More...
 
#define RWW_EEPROM_REVISION   0
 Emulator revision version number, identifying the emulator revision. More...
 
#define RWW_EEPROM_PAGE_SIZE   (NVMCTRL_PAGE_SIZE - RWW_EEPROM_HEADER_SIZE)
 Size of the user data portion of each logical EEPROM page, in bytes. More...
 

Enumerations

enum  rwwee_logical_page_num_in_row {
  RWWEE_LOGICAL_PAGE_NUM_1 = 1,
  RWWEE_LOGICAL_PAGE_NUM_2 = 2
}
 RWW EEPROM Logical Page in Each Row. More...
 

Functions

Configuration and Initialization
enum status_code rww_eeprom_emulator_init (void)
 Initializes the RWW EEPROM Emulator service. More...
 
void rww_eeprom_emulator_erase_memory (void)
 Erases the entire emulated RWW EEPROM memory space. More...
 
enum status_code rww_eeprom_emulator_get_parameters (struct rww_eeprom_emulator_parameters *const parameters)
 Retrieves the parameters of the RWW EEPROM Emulator memory layout. More...
 
Logical RWW EEPROM Page Reading/Writing
enum status_code rww_eeprom_emulator_commit_page_buffer (void)
 Commits any cached data to physical non-volatile memory. More...
 
enum status_code rww_eeprom_emulator_write_page (const uint8_t logical_page, const uint8_t *const data)
 Writes a page of data to an emulated RWW EEPROM memory page. More...
 
enum status_code rww_eeprom_emulator_read_page (const uint8_t logical_page, uint8_t *const data)
 Reads a page of data from an emulated RWW EEPROM memory page. More...
 
Buffer RWW EEPROM Reading/Writing
enum status_code rww_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 RWW EEPROM memory space. More...
 
enum status_code rww_eeprom_emulator_read_buffer (const uint16_t offset, uint8_t *const data, const uint16_t length)
 Reads a buffer of data from the emulated RWW EEPROM memory space. More...