Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <AP_EEProm.h>
00020 void AP_EEPromRegistry::print(BetterStream & stream)
00021 {
00022 stream.printf("\nEEPROM Registry\n");
00023 for (int i=0;i<getSize();i++)
00024 {
00025 stream.printf("id:\t%u\t%s\t%s\tval:\t%10.4f\taddr:\t%u\t\n",
00026 (*this)[i]->getEntryId(),
00027 (*this)[i]->getEntryParentName(),
00028 (*this)[i]->getEntryName(),
00029 (*this)[i]->getEntry(),
00030 (*this)[i]->getEntryAddress());
00031 }
00032 }
00033
00034
00035 void AP_EEPromRegistry::add(AP_EEPromEntryI * entry, uint16_t & id, uint16_t & address, size_t size)
00036 {
00037 if (_newAddress + size > _maxSize) return;
00038 address = _newAddress;
00039 _newAddress += size;
00040 id = _newId++;
00041 push_back(entry);
00042 }
00043
00044 extern AP_EEPromRegistry eepromRegistry(1024);