NNP STM Generic Remote Module git-main
Loading...
Searching...
No Matches
eedata.c File Reference
#include "ObjDict.h"
#include "objdictdef.h"
#include "eedata.h"
#include <stdlib.h>

Go to the source code of this file.

Functions

UNS8 CheckRestoreFlag (void)
 checks whether or not RestoreValues() should be run.
 
void SaveValues (void)
 Saves the values of custom OD entries (specified in RestoreList OD index 0x2900) to EEPROM from the OD. Companion function to RestoreValues(). Note that if the RestoreList is changed, RestoreValues() will not restore values to the correct subindices in the OD unless the EEPROM data has been updated via SaveValues(). I.e., SaveValues() only stores the data bytes contained within the OD subindices in the order specified by RestoreList; the indices and subindices themselves are not stored in EEPROM.
 
void RestoreValues (void)
 Restores the values of custom OD entries (specified in RestoreList OD index 0x2900) to the OD from EEPROM. Companion function to SaveValues(). Note that if the RestoreList is changed, RestoreValues() will not restore values to the correct subindices in the OD unless the EEPROM data has been updated via SaveValues(). I.e., SaveValues() only stores the data bytes contained within the OD subindices in the order specified by RestoreList; the indices and subindices themselves are not stored in EEPROM.
 
void ResetToODDefault (void)
 invoked by nmt_master – writes 0's to size causing bypass of OD restore, then causes reset
 
void ResetModule (void)
 resets module, called by ResetToODDefault()
 
UNS8 ReadLocalFlashData (UNS32 nvAddress, UNS8 *data, UNS8 numData)
 reads CPU based flash data
 
void EEPROM_erase (UNS8 space)
 writes 0xFF to entire EEPROM (6KB).
 
UNS8 EEPROM_open ()
 Copies the EEPROM into ram for modification by EEPROM_write()
 
UNS8 EEPROM_commit ()
 Commits edits to EEPROM from ram to flash.
 
UNS8 EEPROM_discard ()
 Discards current edits to EEPROM without committing to flash.
 
void EEPROM_write (UNS16 address, UNS8 *data, UNS16 length)
 Writes bytes to a specified location in EEPROM.
 
void EEPROM_read (UNS16 address, UNS8 *data, UNS16 length)
 Reads bytes from a specified location in EEPROM.
 

Variables

uint8_t page [FLASH_PAGE_SIZE *EEPROM_PAGE_SIZE]
 
uint8_t memOpen = 0
 

Detailed Description

Date
Created on: Oct 14, 2024
Author
: jenej

Definition in file eedata.c.

Variable Documentation

◆ memOpen

uint8_t memOpen = 0

Definition at line 20 of file eedata.c.

◆ page

uint8_t page[FLASH_PAGE_SIZE *EEPROM_PAGE_SIZE]

Definition at line 19 of file eedata.c.