|
NNP STM Generic Remote Module git-main
|
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. | |
| UNS8 CheckRestoreFlag | ( | void | ) |
checks whether or not RestoreValues() should be run.
Definition at line 27 of file eedata.c.
Referenced by main().


| UNS8 EEPROM_commit | ( | ) |
Commits edits to EEPROM from ram to flash.
Definition at line 266 of file eedata.c.
Referenced by EEPROM_erase(), ResetToODDefault(), SaveValues(), and WriteEEProm().

| UNS8 EEPROM_discard | ( | ) |
| void EEPROM_erase | ( | UNS8 | space | ) |
writes 0xFF to entire EEPROM (6KB).
| space | can be used to specify region of EEPROM (as long as aligned with EEPROM_ERASE_SIZE) |
Definition at line 228 of file eedata.c.
Referenced by processNMTstateChange().


| UNS8 EEPROM_open | ( | ) |
Copies the EEPROM into ram for modification by EEPROM_write()
Definition at line 252 of file eedata.c.
Referenced by EEPROM_erase(), ResetToODDefault(), SaveValues(), and WriteEEProm().

Reads bytes from a specified location in EEPROM.
| address | The address, relative to the start of the EEPROM where the data will be written. |
| *data | pointer to the data (or array) to read to |
| length | length of data to be read |
Definition at line 343 of file eedata.c.
Referenced by CheckRestoreFlag(), ReadEEProm(), and RestoreValues().

Writes bytes to a specified location in EEPROM.
EEPROM_open() must be called before this to copy EEPROM into ram, which this function edits
EEPROM_commit() is called afterwards to commit EEPROM edits to flash
| address | The address, relative to the start of the EEPROM where the data will be written. |
| *data | pointer to the data (or array) to be written |
| length | length of data to be written |
Definition at line 327 of file eedata.c.
Referenced by EEPROM_erase(), ResetToODDefault(), SaveValues(), and WriteEEProm().

reads CPU based flash data
| nvAddress | |
| pointer | to data |
| size | of data requested |
Definition at line 205 of file eedata.c.
Referenced by ReadLocalFlashMemory().

| void ResetModule | ( | void | ) |
resets module, called by ResetToODDefault()
Definition at line 191 of file eedata.c.
Referenced by processNMTstateChange(), and ResetToODDefault().

| void ResetToODDefault | ( | void | ) |
invoked by nmt_master – writes 0's to size causing bypass of OD restore, then causes reset
Definition at line 173 of file eedata.c.
Referenced by processNMTstateChange().


| 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.
Called from NMT_Do_Restore_Cmd (only when in the Waiting Mode) and from the startup sequence. All OD indices used by the RestoreList MUST have more than one subindex, where the first subindex specifies the number of subindices.
Definition at line 117 of file eedata.c.
Referenced by main(), and processNMTstateChange().


| 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.
Called from NMT_Do_Restore_Cmd (only when in the Waiting Mode) and from the startup sequence. The first two bytes in EEPROM specify the amount EEPROM used by this function. All OD indices used by the RestoreList MUST have more than one subindex, where the first subindex specifies the number of subindices. Takes ~9ms per byte that needs to be saved.
Definition at line 51 of file eedata.c.
Referenced by main(), and processNMTstateChange().

