guard code within DEVICE_STORAGE

as required by mbedmicro
pull/1867/head
Rohit Grover 2016-06-08 11:16:25 +01:00
parent 0a9bba4eca
commit 0986c54b20
2 changed files with 8 additions and 0 deletions

View File

@ -18,6 +18,8 @@
#ifndef __DRIVER_STORAGE_H
#define __DRIVER_STORAGE_H
#if DEVICE_STORAGE
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
@ -762,4 +764,6 @@ typedef struct _ARM_DRIVER_STORAGE {
}
#endif // __cplusplus
#endif /* #if DEVICE_STORAGE */
#endif /* __DRIVER_STORAGE_H */

View File

@ -19,6 +19,8 @@
* This is a mock driver using the flash abstraction layer. It allows for writing tests.
*/
#if DEVICE_STORAGE
#include <string.h>
#include "Driver_Storage.h"
@ -1034,3 +1036,5 @@ ARM_DRIVER_STORAGE ARM_Driver_Storage_(0) = {
.GetNextBlock = nextBlock,
.GetBlock = getBlock
};
#endif /* #if DEVICE_STORAGE */