Skip to content

Commit 0986c54

Browse files
author
Rohit Grover
committed
guard code within DEVICE_STORAGE
as required by mbedmicro
1 parent 0a9bba4 commit 0986c54

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

hal/hal/storage_abstraction/Driver_Storage.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
#ifndef __DRIVER_STORAGE_H
1919
#define __DRIVER_STORAGE_H
2020

21+
#if DEVICE_STORAGE
22+
2123
#ifdef __cplusplus
2224
extern "C" {
2325
#endif // __cplusplus
@@ -762,4 +764,6 @@ typedef struct _ARM_DRIVER_STORAGE {
762764
}
763765
#endif // __cplusplus
764766

767+
#endif /* #if DEVICE_STORAGE */
768+
765769
#endif /* __DRIVER_STORAGE_H */

hal/targets/hal/TARGET_Freescale/TARGET_KSDK2_MCUS/TARGET_K64F/storage_driver.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* This is a mock driver using the flash abstraction layer. It allows for writing tests.
2020
*/
2121

22+
#if DEVICE_STORAGE
23+
2224
#include <string.h>
2325

2426
#include "Driver_Storage.h"
@@ -1034,3 +1036,5 @@ ARM_DRIVER_STORAGE ARM_Driver_Storage_(0) = {
10341036
.GetNextBlock = nextBlock,
10351037
.GetBlock = getBlock
10361038
};
1039+
1040+
#endif /* #if DEVICE_STORAGE */

0 commit comments

Comments
 (0)