Merge pull request #4388 from c1728p9/deprecate_config_store

Deprecate config store and related libraries
pull/4422/head
Martin Kojtal 2017-06-01 14:02:43 +02:00 committed by GitHub
commit 9355531653
6 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1 @@
*

View File

@ -82,6 +82,8 @@ extern "C" {
#include <stdint.h> #include <stdint.h>
#include <string.h> /* requierd for memset() in ARM_CFSTORE_HANDLE_INIT() */ #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 */ #define DEVICE_STORAGE 1 /* enable storage */
/// @cond CFSTORE_DOXYGEN_DISABLE /// @cond CFSTORE_DOXYGEN_DISABLE
#include <Driver_Storage.h> #include <Driver_Storage.h>
@ -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; extern ARM_CFSTORE_DRIVER cfstore_driver;
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -23,6 +23,7 @@ extern "C" {
#endif // __cplusplus #endif // __cplusplus
#include "storage_abstraction/Driver_Storage.h" #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 * General return codes. All Flash-Journal APIs return an int32_t to allow for
@ -288,6 +289,8 @@ typedef struct FlashJournal_t {
* } * }
* \endcode * \endcode
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.5", "FlashJournal is deprecated. "
"Use a BlockDevice or filesystem instead")
static inline int32_t FlashJournal_initialize(FlashJournal_t *journal, static inline int32_t FlashJournal_initialize(FlashJournal_t *journal,
ARM_DRIVER_STORAGE *mtd, ARM_DRIVER_STORAGE *mtd,
const FlashJournal_Ops_t *ops, const FlashJournal_Ops_t *ops,
@ -332,6 +335,8 @@ static inline int32_t FlashJournal_initialize(FlashJournal_t *journal,
* } * }
* \endcode * \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) static inline FlashJournal_Status_t FlashJournal_getInfo(FlashJournal_t *journal, FlashJournal_Info_t *info)
{ {
return journal->ops.getInfo(journal, info); return journal->ops.getInfo(journal, info);
@ -411,6 +416,8 @@ static inline FlashJournal_Status_t FlashJournal_getInfo(FlashJournal_t *journal
* } * }
* \endcode * \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) static inline int32_t FlashJournal_read(FlashJournal_t *journal, void *blob, size_t n)
{ {
return journal->ops.read(journal, blob, n); return journal->ops.read(journal, blob, n);
@ -493,6 +500,8 @@ static inline int32_t FlashJournal_read(FlashJournal_t *journal, void *blob, siz
* } * }
* \endcode * \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) 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); return journal->ops.readFrom(journal, offset, blob, n);
@ -605,6 +614,8 @@ static inline int32_t FlashJournal_readFrom(struct FlashJournal_t *journal, size
* } * }
* \endcode * \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) static inline int32_t FlashJournal_log(FlashJournal_t *journal, const void *blob, size_t n)
{ {
return journal->ops.log(journal, blob, n); return journal->ops.log(journal, blob, n);
@ -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 * by an operation other than a commit, that operation will very likely
* return an error code. * 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) static inline int32_t FlashJournal_commit(FlashJournal_t *journal)
{ {
return journal->ops.commit(journal); return journal->ops.commit(journal);
@ -728,6 +741,8 @@ static inline int32_t FlashJournal_commit(FlashJournal_t *journal)
* } * }
* \endcode * \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) static inline int32_t FlashJournal_reset(FlashJournal_t *journal)
{ {
return journal->ops.reset(journal); return journal->ops.reset(journal);

View File

@ -23,6 +23,7 @@
#endif // __cplusplus #endif // __cplusplus
#include "storage_abstraction/Driver_Storage.h" #include "storage_abstraction/Driver_Storage.h"
#include "mbed_toolchain.h" /* required for MBED_DEPRECATED_SINCE */
#if !defined(YOTTA_CFG_STORAGE_VOLUME_MANAGER_MAX_VOLUMES) #if !defined(YOTTA_CFG_STORAGE_VOLUME_MANAGER_MAX_VOLUMES)
#define MAX_VOLUMES 4 #define MAX_VOLUMES 4
@ -88,6 +89,8 @@ class StorageVolumeManager; /* forward declaration */
class StorageVolume { class StorageVolume {
public: public:
MBED_DEPRECATED_SINCE("mbed-os-5.5", "StorageVolume is deprecated. "
"Use MBRBlockDevice for volumes instead")
StorageVolume() : allocated(false) { /* empty */ } StorageVolume() : allocated(false) { /* empty */ }
public: public:
@ -161,6 +164,8 @@ private:
class StorageVolumeManager { class StorageVolumeManager {
public: public:
MBED_DEPRECATED_SINCE("mbed-os-5.5", "StorageVolumeManager is deprecated. "
"Use MBRBlockDevice to manage volumes instead")
StorageVolumeManager() { /* empty */ } StorageVolumeManager() { /* empty */ }
~StorageVolumeManager() { /* empty */ } ~StorageVolumeManager() { /* empty */ }

View File

@ -25,6 +25,8 @@
#include <stdint.h> #include <stdint.h>
#include <stdbool.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)) #define ARM_DRIVER_VERSION_MAJOR_MINOR(major,minor) (((major) << 8) | (minor))
/** /**

View File

@ -23,6 +23,8 @@
#include <stdint.h> #include <stdint.h>
/****** This file has been deprecated since mbed-os-5.5 *****/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif // __cplusplus #endif // __cplusplus