Skip to content

Deprecate config store and related libraries #4388

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

Merged
merged 1 commit into from
Jun 1, 2017
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions features/storage/FEATURE_STORAGE/TESTS/.mbedignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually not 100% sure if this will work, but let's hope so.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied this file from mbed-os\features\unsupported so hopefully it works

Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ extern "C" {
#include <stdint.h>
#include <string.h> /* requierd for memset() in ARM_CFSTORE_HANDLE_INIT() */

#include "mbed_toolchain.h" /* required for MBED_DEPRECATED_SINCE */

#define DEVICE_STORAGE 1 /* enable storage */
/// @cond CFSTORE_DOXYGEN_DISABLE
#include <Driver_Storage.h>
Expand Down Expand Up @@ -873,6 +875,7 @@ typedef struct _ARM_DRIVER_CFSTORE



MBED_DEPRECATED_SINCE("mbed-os-5.5", "CFSTORE replace by FATFileSystem.")
extern ARM_CFSTORE_DRIVER cfstore_driver;

#ifdef __cplusplus
Expand Down
15 changes: 15 additions & 0 deletions features/storage/FEATURE_STORAGE/flash-journal/flash_journal.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ extern "C" {
#endif // __cplusplus

#include "storage_abstraction/Driver_Storage.h"
#include "mbed_toolchain.h" /* required for MBED_DEPRECATED_SINCE */

/**
* General return codes. All Flash-Journal APIs return an int32_t to allow for
Expand Down Expand Up @@ -288,6 +289,8 @@ typedef struct FlashJournal_t {
* }
* \endcode
*/
MBED_DEPRECATED_SINCE("mbed-os-5.5", "FlashJournal is deprecated. "
"Use a BlockDevice or filesystem instead")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much better.

static inline int32_t FlashJournal_initialize(FlashJournal_t *journal,
ARM_DRIVER_STORAGE *mtd,
const FlashJournal_Ops_t *ops,
Expand Down Expand Up @@ -332,6 +335,8 @@ static inline int32_t FlashJournal_initialize(FlashJournal_t *journal,
* }
* \endcode
*/
MBED_DEPRECATED_SINCE("mbed-os-5.5", "FlashJournal is deprecated. "
"Use a BlockDevice or filesystem instead")
static inline FlashJournal_Status_t FlashJournal_getInfo(FlashJournal_t *journal, FlashJournal_Info_t *info)
{
return journal->ops.getInfo(journal, info);
Expand Down Expand Up @@ -411,6 +416,8 @@ static inline FlashJournal_Status_t FlashJournal_getInfo(FlashJournal_t *journal
* }
* \endcode
*/
MBED_DEPRECATED_SINCE("mbed-os-5.5", "FlashJournal is deprecated. "
"Use a BlockDevice or filesystem instead")
static inline int32_t FlashJournal_read(FlashJournal_t *journal, void *blob, size_t n)
{
return journal->ops.read(journal, blob, n);
Expand Down Expand Up @@ -493,6 +500,8 @@ static inline int32_t FlashJournal_read(FlashJournal_t *journal, void *blob, siz
* }
* \endcode
*/
MBED_DEPRECATED_SINCE("mbed-os-5.5", "FlashJournal is deprecated. "
"Use a BlockDevice or filesystem instead")
static inline int32_t FlashJournal_readFrom(struct FlashJournal_t *journal, size_t offset, void *blob, size_t n)
{
return journal->ops.readFrom(journal, offset, blob, n);
Expand Down Expand Up @@ -605,6 +614,8 @@ static inline int32_t FlashJournal_readFrom(struct FlashJournal_t *journal, size
* }
* \endcode
*/
MBED_DEPRECATED_SINCE("mbed-os-5.5", "FlashJournal is deprecated. "
"Use a BlockDevice or filesystem instead")
static inline int32_t FlashJournal_log(FlashJournal_t *journal, const void *blob, size_t n)
{
return journal->ops.log(journal, blob, n);
Expand Down Expand Up @@ -669,6 +680,8 @@ static inline int32_t FlashJournal_log(FlashJournal_t *journal, const void *blob
* by an operation other than a commit, that operation will very likely
* return an error code.
*/
MBED_DEPRECATED_SINCE("mbed-os-5.5", "FlashJournal is deprecated. "
"Use a BlockDevice or filesystem instead")
static inline int32_t FlashJournal_commit(FlashJournal_t *journal)
{
return journal->ops.commit(journal);
Expand Down Expand Up @@ -728,6 +741,8 @@ static inline int32_t FlashJournal_commit(FlashJournal_t *journal)
* }
* \endcode
*/
MBED_DEPRECATED_SINCE("mbed-os-5.5", "FlashJournal is deprecated. "
"Use a BlockDevice or filesystem instead")
static inline int32_t FlashJournal_reset(FlashJournal_t *journal)
{
return journal->ops.reset(journal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#endif // __cplusplus

#include "storage_abstraction/Driver_Storage.h"
#include "mbed_toolchain.h" /* required for MBED_DEPRECATED_SINCE */

#if !defined(YOTTA_CFG_STORAGE_VOLUME_MANAGER_MAX_VOLUMES)
#define MAX_VOLUMES 4
Expand Down Expand Up @@ -88,6 +89,8 @@ class StorageVolumeManager; /* forward declaration */

class StorageVolume {
public:
MBED_DEPRECATED_SINCE("mbed-os-5.5", "StorageVolume is deprecated. "
"Use MBRBlockDevice for volumes instead")
StorageVolume() : allocated(false) { /* empty */ }

public:
Expand Down Expand Up @@ -161,6 +164,8 @@ class StorageVolume {

class StorageVolumeManager {
public:
MBED_DEPRECATED_SINCE("mbed-os-5.5", "StorageVolumeManager is deprecated. "
"Use MBRBlockDevice to manage volumes instead")
StorageVolumeManager() { /* empty */ }
~StorageVolumeManager() { /* empty */ }

Expand Down
2 changes: 2 additions & 0 deletions hal/storage_abstraction/Driver_Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <stdint.h>
#include <stdbool.h>

/****** This file has been deprecated since mbed-os-5.5 *****/

#define ARM_DRIVER_VERSION_MAJOR_MINOR(major,minor) (((major) << 8) | (minor))

/**
Expand Down
2 changes: 2 additions & 0 deletions hal/storage_abstraction/Driver_Storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include <stdint.h>

/****** This file has been deprecated since mbed-os-5.5 *****/

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
Expand Down