Added list of NVM areas to GDx targets

pull/218/head
Silvano Seva 2023-11-21 14:10:21 +01:00
rodzic 72c8b8246b
commit ecd3602662
1 zmienionych plików z 28 dodań i 0 usunięć

Wyświetl plik

@ -27,6 +27,27 @@
#include "AT24Cx.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)
static const uint32_t UHF_CAL_BASE = 0x8F000;
static const uint32_t VHF_CAL_BASE = 0x8F070;
@ -103,6 +124,13 @@ void nvm_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)
{
W25Qx_wakeup();