mirror of https://github.com/ARMmbed/mbed-os.git
rename CONFIG_HARDWARE... to have a prefix of DEVICE_STORAGE_
parent
14a14a07dc
commit
887aa833b3
|
|
@ -174,16 +174,16 @@ struct mtd_k64f_data {
|
||||||
static const ARM_STORAGE_BLOCK blockTable[] = {
|
static const ARM_STORAGE_BLOCK blockTable[] = {
|
||||||
{
|
{
|
||||||
/**< This is the start address of the flash block. */
|
/**< This is the start address of the flash block. */
|
||||||
#ifdef CONFIG_HARDWARE_MTD_START_ADDR
|
#ifdef DEVICE_STORAGE_CONFIG_HARDWARE_MTD_START_ADDR
|
||||||
.addr = CONFIG_HARDWARE_MTD_START_ADDR,
|
.addr = DEVICE_STORAGE_CONFIG_HARDWARE_MTD_START_ADDR,
|
||||||
#else
|
#else
|
||||||
.addr = BLOCK1_START_ADDR,
|
.addr = BLOCK1_START_ADDR,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**< This is the size of the flash block, in units of bytes.
|
/**< This is the size of the flash block, in units of bytes.
|
||||||
* Together with addr, it describes a range [addr, addr+size). */
|
* Together with addr, it describes a range [addr, addr+size). */
|
||||||
#ifdef CONFIG_HARDWARE_MTD_SIZE
|
#ifdef DEVICE_STORAGE_CONFIG_HARDWARE_MTD_SIZE
|
||||||
.size = CONFIG_HARDWARE_MTD_SIZE,
|
.size = DEVICE_STORAGE_CONFIG_HARDWARE_MTD_SIZE,
|
||||||
#else
|
#else
|
||||||
.size = BLOCK1_SIZE,
|
.size = BLOCK1_SIZE,
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -205,7 +205,7 @@ static const ARM_DRIVER_VERSION version = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#if (!defined(CONFIG_HARDWARE_MTD_ASYNC_OPS) || CONFIG_HARDWARE_MTD_ASYNC_OPS)
|
#if (!defined(DEVICE_STORAGE_CONFIG_HARDWARE_MTD_ASYNC_OPS) || DEVICE_STORAGE_CONFIG_HARDWARE_MTD_ASYNC_OPS)
|
||||||
#define ASYNC_OPS 1
|
#define ASYNC_OPS 1
|
||||||
#else
|
#else
|
||||||
#define ASYNC_OPS 0
|
#define ASYNC_OPS 0
|
||||||
|
|
@ -224,8 +224,8 @@ static const ARM_STORAGE_CAPABILITIES caps = {
|
||||||
.asynchronous_ops = ASYNC_OPS,
|
.asynchronous_ops = ASYNC_OPS,
|
||||||
|
|
||||||
/* Enable chip-erase functionality if we own all of block-1. */
|
/* Enable chip-erase functionality if we own all of block-1. */
|
||||||
#if ((!defined (CONFIG_HARDWARE_MTD_START_ADDR) || (CONFIG_HARDWARE_MTD_START_ADDR == BLOCK1_START_ADDR)) && \
|
#if ((!defined (DEVICE_STORAGE_CONFIG_HARDWARE_MTD_START_ADDR) || (DEVICE_STORAGE_CONFIG_HARDWARE_MTD_START_ADDR == BLOCK1_START_ADDR)) && \
|
||||||
(!defined (CONFIG_HARDWARE_MTD_SIZE) || (CONFIG_HARDWARE_MTD_SIZE == BLOCK1_SIZE)))
|
(!defined (DEVICE_STORAGE_CONFIG_HARDWARE_MTD_SIZE) || (DEVICE_STORAGE_CONFIG_HARDWARE_MTD_SIZE == BLOCK1_SIZE)))
|
||||||
.erase_all = 1, /**< Supports EraseChip operation. */
|
.erase_all = 1, /**< Supports EraseChip operation. */
|
||||||
#else
|
#else
|
||||||
.erase_all = 0, /**< Supports EraseChip operation. */
|
.erase_all = 0, /**< Supports EraseChip operation. */
|
||||||
|
|
@ -233,8 +233,8 @@ static const ARM_STORAGE_CAPABILITIES caps = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const ARM_STORAGE_INFO info = {
|
static const ARM_STORAGE_INFO info = {
|
||||||
#ifdef CONFIG_HARDWARE_MTD_SIZE
|
#ifdef DEVICE_STORAGE_CONFIG_HARDWARE_MTD_SIZE
|
||||||
.total_storage = CONFIG_HARDWARE_MTD_SIZE, /**< Total available storage, in units of octets. */
|
.total_storage = DEVICE_STORAGE_CONFIG_HARDWARE_MTD_SIZE, /**< Total available storage, in units of octets. */
|
||||||
#else
|
#else
|
||||||
.total_storage = BLOCK1_SIZE, /**< Total available storage, in units of octets. By default, BLOCK0 is reserved to hold program code. */
|
.total_storage = BLOCK1_SIZE, /**< Total available storage, in units of octets. By default, BLOCK0 is reserved to hold program code. */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue