Added list of NVM areas to GDx targets
This commit is contained in:
parent
72c8b8246b
commit
ecd3602662
|
|
@ -27,6 +27,27 @@
|
||||||
#include "AT24Cx.h"
|
#include "AT24Cx.h"
|
||||||
#include "W25Qx.h"
|
#include "W25Qx.h"
|
||||||
|
|
||||||
|
W25Qx_DEVICE_DEFINE(W25Q80, W25Qx_api)
|
||||||
|
AT24Cx_DEVICE_DEFINE(AT24C512)
|
||||||
|
|
||||||
|
static const struct nvmArea areas[] =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
.name = "External flash",
|
||||||
|
.dev = &W25Q80,
|
||||||
|
.startAddr = 0x0000,
|
||||||
|
.size = 0x100000, // 1 MB, 8 Mbit
|
||||||
|
.partitions = NULL
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "EEPROM",
|
||||||
|
.dev = &AT24C512,
|
||||||
|
.startAddr = 0x0000,
|
||||||
|
.size = 0x10000, // 64 kB, 512 kbit
|
||||||
|
.partitions = NULL
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
#if defined(PLATFORM_GD77)
|
#if defined(PLATFORM_GD77)
|
||||||
static const uint32_t UHF_CAL_BASE = 0x8F000;
|
static const uint32_t UHF_CAL_BASE = 0x8F000;
|
||||||
static const uint32_t VHF_CAL_BASE = 0x8F070;
|
static const uint32_t VHF_CAL_BASE = 0x8F070;
|
||||||
|
|
@ -103,6 +124,13 @@ void nvm_terminate()
|
||||||
AT24Cx_terminate();
|
AT24Cx_terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t nvm_getMemoryAreas(const struct nvmArea **list)
|
||||||
|
{
|
||||||
|
*list = &areas[0];
|
||||||
|
|
||||||
|
return (sizeof(areas) / sizeof(struct nvmArea));
|
||||||
|
}
|
||||||
|
|
||||||
void nvm_readCalibData(void *buf)
|
void nvm_readCalibData(void *buf)
|
||||||
{
|
{
|
||||||
W25Qx_wakeup();
|
W25Qx_wakeup();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue