Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Generic Application Block to FRAM Map #247

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Catena_FramStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ class cFramStorage
kBootCount = 14,
kOperatingFlags = 15,
kBme680Cal = 16,
kAppConf = 17,
// when you add something, also update McciCatena::cFramStorage::vItemDefs[]!
kMAX
};

/* client should beware of MaxAppConfSize using the kAppConf key*/
const static unsigned int MaxAppConfSize = 64;

class StandardItem
{
private:
Expand Down
5 changes: 3 additions & 2 deletions src/lib/Catena_FramStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ McciCatena::cFramStorage::vItemDefs[cFramStorage::kMAX] =
cFramStorage::StandardItem(kBootCount, sizeof(uint32_t), /* number */ true),
cFramStorage::StandardItem(kOperatingFlags, sizeof(uint32_t), /* number */ true),

/* the size field should match BSEC_MAX_STATE_BLOB_SIZE, whcich is 139 */
cFramStorage::StandardItem(kBme680Cal, 139, /* number */ false),
/* the size field should match BSEC_MAX_STATE_BLOB_SIZE, which is 139 */
cFramStorage::StandardItem(kBme680Cal, 139, /* number */ false),
cFramStorage::StandardItem(kAppConf, cFramStorage::MaxAppConfSize, false)
};


Expand Down