Skip to content

Commit 81ab477

Browse files
author
Rohit Grover
committed
switch to using more specific names in DEVICE_STORAGE_CONFIG_*
This should help avoid conflicts with configs for other Storage devices in the future.
1 parent c82e777 commit 81ab477

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,16 @@ struct mtd_k64f_data {
169169
static const ARM_STORAGE_BLOCK blockTable[] = {
170170
{
171171
/**< This is the start address of the flash block. */
172-
#ifdef DEVICE_STORAGE_CONFIG_HARDWARE_MTD_START_ADDR
173-
.addr = DEVICE_STORAGE_CONFIG_HARDWARE_MTD_START_ADDR,
172+
#ifdef DEVICE_STORAGE_CONFIG_HARDWARE_MTD_K64F_START_ADDR
173+
.addr = DEVICE_STORAGE_CONFIG_HARDWARE_MTD_K64F_START_ADDR,
174174
#else
175175
.addr = BLOCK1_START_ADDR,
176176
#endif
177177

178178
/**< This is the size of the flash block, in units of bytes.
179179
* Together with addr, it describes a range [addr, addr+size). */
180-
#ifdef DEVICE_STORAGE_CONFIG_HARDWARE_MTD_SIZE
181-
.size = DEVICE_STORAGE_CONFIG_HARDWARE_MTD_SIZE,
180+
#ifdef DEVICE_STORAGE_CONFIG_HARDWARE_MTD_K64F_SIZE
181+
.size = DEVICE_STORAGE_CONFIG_HARDWARE_MTD_K64F_SIZE,
182182
#else
183183
.size = BLOCK1_SIZE,
184184
#endif
@@ -200,7 +200,7 @@ static const ARM_DRIVER_VERSION version = {
200200
};
201201

202202

203-
#if (!defined(DEVICE_STORAGE_CONFIG_HARDWARE_MTD_ASYNC_OPS) || DEVICE_STORAGE_CONFIG_HARDWARE_MTD_ASYNC_OPS)
203+
#if (!defined(DEVICE_STORAGE_CONFIG_HARDWARE_MTD_K64F_ASYNC_OPS) || DEVICE_STORAGE_CONFIG_HARDWARE_MTD_K64F_ASYNC_OPS)
204204
#define ASYNC_OPS 1
205205
#else
206206
#define ASYNC_OPS 0
@@ -219,17 +219,17 @@ static const ARM_STORAGE_CAPABILITIES caps = {
219219
.asynchronous_ops = ASYNC_OPS,
220220

221221
/* Enable chip-erase functionality if we own all of block-1. */
222-
#if ((!defined (DEVICE_STORAGE_CONFIG_HARDWARE_MTD_START_ADDR) || (DEVICE_STORAGE_CONFIG_HARDWARE_MTD_START_ADDR == BLOCK1_START_ADDR)) && \
223-
(!defined (DEVICE_STORAGE_CONFIG_HARDWARE_MTD_SIZE) || (DEVICE_STORAGE_CONFIG_HARDWARE_MTD_SIZE == BLOCK1_SIZE)))
222+
#if ((!defined (DEVICE_STORAGE_CONFIG_HARDWARE_MTD_K64F_START_ADDR) || (DEVICE_STORAGE_CONFIG_HARDWARE_MTD_K64F_START_ADDR == BLOCK1_START_ADDR)) && \
223+
(!defined (DEVICE_STORAGE_CONFIG_HARDWARE_MTD_K64F_SIZE) || (DEVICE_STORAGE_CONFIG_HARDWARE_MTD_K64F_SIZE == BLOCK1_SIZE)))
224224
.erase_all = 1, /**< Supports EraseChip operation. */
225225
#else
226226
.erase_all = 0, /**< Supports EraseChip operation. */
227227
#endif
228228
};
229229

230230
static const ARM_STORAGE_INFO info = {
231-
#ifdef DEVICE_STORAGE_CONFIG_HARDWARE_MTD_SIZE
232-
.total_storage = DEVICE_STORAGE_CONFIG_HARDWARE_MTD_SIZE, /**< Total available storage, in units of octets. */
231+
#ifdef DEVICE_STORAGE_CONFIG_HARDWARE_MTD_K64F_SIZE
232+
.total_storage = DEVICE_STORAGE_CONFIG_HARDWARE_MTD_K64F_SIZE, /**< Total available storage, in units of octets. */
233233
#else
234234
.total_storage = BLOCK1_SIZE, /**< Total available storage, in units of octets. By default, BLOCK0 is reserved to hold program code. */
235235
#endif

0 commit comments

Comments
 (0)