28#ifndef __NVMMANAGER_H__
29#define __NVMMANAGER_H__
34#ifndef HIDE_FROM_DOXYGEN
62 NVM_LOC_USER_START = 0,
67 NVM_LOC_RESERVED_TEKNIC = 416,
70 NVM_LOC_USER_MAX = NVMCTRL_PAGE_SIZE - 32,
72 NVM_LOC_HW_REVISION = NVM_LOC_USER_MAX - 18,
73 NVM_LOC_SERIAL_NUMBER = NVM_LOC_USER_MAX - 16,
75 NVM_LOC_MAC_FIRST = NVM_LOC_USER_MAX - 12,
76 NVM_LOC_MAC_SECOND = NVM_LOC_USER_MAX - 8,
78 NVM_LOC_DAC_ZERO = NVM_LOC_USER_MAX - 4,
79 NVM_LOC_DAC_SPAN = NVM_LOC_USER_MAX - 2,
86 static NvmManager &Instance();
93 int8_t Byte(NvmLocations nvmLocation);
102 bool Byte(NvmLocations nvmLocation, int8_t newValue);
112 int16_t Int16(NvmLocations nvmLocation);
122 bool Int16(NvmLocations nvmLocation, int16_t newValue);
132 int32_t Int32(NvmLocations nvmLocation);
142 bool Int32(NvmLocations nvmLocation, int32_t newValue);
152 int64_t Int64(NvmLocations nvmLocationStart);
162 bool Int64(NvmLocations nvmLocationStart, int64_t newValue);
171 void BlockRead(NvmLocations nvmLocationStart,
int lengthInBytes, uint8_t *
const p_data);
182 bool BlockWrite(NvmLocations nvmLocationStart,
int lengthInBytes, uint8_t
const *
const p_data);
193 void MacAddress(uint8_t *macAddress);
202 uint32_t SerialNumber();
204 bool FinishNvmWrite() {
205 while (m_pageModified || m_writeState != IDLE) {
206 if (WriteCacheToNvmProc()) {
216 bool Synchonized()
const {
217 return !m_pageModified;
230 int8_t m_nvmPageCache[NVMCTRL_PAGE_SIZE];
232 int32_t *m_nvmPageCache32;
233 WriteCacheState m_writeState;
234 uint8_t m_quadWordIndex;
250 void PopulateCache();
260 bool WriteCacheToNvm();
269 bool WriteCacheToNvmProc();
Namespace to encompass the ClearCore board API.
Definition AdcManager.h:36