Skip to content

Commit

Permalink
Merge pull request #247 from helium/lthiery/add-application-block-to-…
Browse files Browse the repository at this point in the history
…fram

Add Generic Application Block to FRAM Map
  • Loading branch information
terrillmoore authored Feb 12, 2020
2 parents 119e90e + 9af4475 commit 85c010c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This library provides a simple-to-use framework for taking advantage of many of

_Apologies_: This document is a work in progress, and is published in this intermediate form in hopes that it will still be better than nothing.

[![GitHub release](https://img.shields.io/github/release/mcci-catena/Catena-Arduino-Platform.svg)](https://github.com/mcci-catena/Catena-Arduino-Platform/releases/latest) [![GitHub commits](https://img.shields.io/github/commits-since/mcci-catena/Catena-Arduino-Platform/latest.svg)](https://github.com/mcci-catena/Catena-Arduino-Platform/compare/v0.18.0...master) [![Build Status](https://travis-ci.com/mcci-catena/Catena-Arduino-Platform.svg?branch=master)](https://travis-ci.com/mcci-catena/Catena-Arduino-Platform)
[![GitHub release](https://img.shields.io/github/release/mcci-catena/Catena-Arduino-Platform.svg)](https://github.com/mcci-catena/Catena-Arduino-Platform/releases/latest) [![GitHub commits](https://img.shields.io/github/commits-since/mcci-catena/Catena-Arduino-Platform/latest.svg)](https://github.com/mcci-catena/Catena-Arduino-Platform/compare/v0.18.1...master) [![Build Status](https://travis-ci.com/mcci-catena/Catena-Arduino-Platform.svg?branch=master)](https://travis-ci.com/mcci-catena/Catena-Arduino-Platform)

<!-- markdownlint-disable MD033 -->
<!-- markdownlint-capture -->
Expand Down Expand Up @@ -1375,6 +1375,8 @@ This sketch demonstrates the use of the Catena FSM class to implement the `Turns
| [`catena-mcciadk`](https://github.com/mcci-catena/Catena-mcciadk) | 0.2.1 | 0.1.2 | Needed for miscellaneous definitions |

## Library Release History
- v0.18.1 includes the following changes.
- [#247](https://github.com/mcci-catena/Catena-Arduino-Platform/pull/247) Add a generic application block to FRAM map

- v0.18.0 includes the following changes.

Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=MCCI Catena Arduino Platform
version=0.18.0
version=0.18.1
author=Terry Moore, ChaeHee Won, Sungjoon Park
maintainer=MCCI Corporation <techsupport@mcci.com>
sentence=Arduino library for MCCI Catena 44xx, 45xx, 46xx and 48xx systems.
Expand Down
2 changes: 1 addition & 1 deletion src/CatenaBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Copyright notice:
#define CATENA_ARDUINO_PLATFORM_VERSION_CALC(major, minor, patch, local) \
(((major) << 24u) | ((minor) << 16u) | ((patch) << 8u) | (local))

#define CATENA_ARDUINO_PLATFORM_VERSION CATENA_ARDUINO_PLATFORM_VERSION_CALC(0, 18, 0, 0) /* v0.18.0.0 */
#define CATENA_ARDUINO_PLATFORM_VERSION CATENA_ARDUINO_PLATFORM_VERSION_CALC(0, 18, 1, 0) /* v0.18.0.0 */

#define CATENA_ARDUINO_PLATFORM_VERSION_GET_MAJOR(v) \
(((v) >> 24u) & 0xFFu)
Expand Down
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

0 comments on commit 85c010c

Please sign in to comment.