kopia lustrzana https://github.com/OpenRTX/OpenRTX
NVM: zephyr: fixed compilation errors
rodzic
bbd104172b
commit
8b792c4773
|
@ -49,10 +49,11 @@ int zephirFlash_init(const struct nvmDevice* dev)
|
||||||
const struct flash_parameters *info = flash_get_parameters(TO_DEV_HANDLE(dev->priv));
|
const struct flash_parameters *info = flash_get_parameters(TO_DEV_HANDLE(dev->priv));
|
||||||
|
|
||||||
// TODO: erase size and erase cycles to be retrieved from the real device.
|
// TODO: erase size and erase cycles to be retrieved from the real device.
|
||||||
dev->info->write_size = info->write_block_size;
|
struct nvmInfo *nvm_info = (struct nvmInfo *) dev->info;
|
||||||
dev->info->erase_size = 4096;
|
nvm_info->write_size = info->write_block_size;
|
||||||
dev->info->erase_cycles = 100000;
|
nvm_info->erase_size = 4096;
|
||||||
dev->info->device_info = NVM_FLASH | NVM_WRITE | NVM_BITWRITE | NVM_ERASE;
|
nvm_info->erase_cycles = 100000;
|
||||||
|
nvm_info->device_info = NVM_FLASH | NVM_WRITE | NVM_BITWRITE | NVM_ERASE;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ extern const struct nvmOps zephyr_flash_ops;
|
||||||
static struct nvmInfo nvm_devInfo_##name; \
|
static struct nvmInfo nvm_devInfo_##name; \
|
||||||
static const struct nvmDevice name = \
|
static const struct nvmDevice name = \
|
||||||
{ \
|
{ \
|
||||||
.priv = DEVICE_DT_GET(DT_ALIAS(alias)) \
|
.priv = DEVICE_DT_GET(DT_ALIAS(alias)), \
|
||||||
.ops = &zephyr_flash_ops, \
|
.ops = &zephyr_flash_ops, \
|
||||||
.info = &nvm_devInfo_##name, \
|
.info = &nvm_devInfo_##name, \
|
||||||
.size = sz \
|
.size = sz \
|
||||||
|
|
Ładowanie…
Reference in New Issue