Init
This commit is contained in:
commit
6673f03640
|
|
@ -0,0 +1,24 @@
|
|||
//
|
||||
// Created by cfif on 07.10.22.
|
||||
//
|
||||
|
||||
#include "DeviceStorage.h"
|
||||
#include "StorageOnFlashArtery.h"
|
||||
#include "InternalFlashPage.h"
|
||||
|
||||
|
||||
bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageInterface) {
|
||||
|
||||
tStorageOnFlashArtery *store = (tStorageOnFlashArtery *) storageInterface->env;
|
||||
sInternalFlashPage_Read(store->mainFlashPageAddress, 0x0, (uint8_t *) &env->nvm, sizeof(env->nvm));
|
||||
/*
|
||||
if ((env->nvm.SettingsServerConnection.EGTS_SERVER_ADDRESS.length > 32) ||
|
||||
(env->nvm.SettingsServerConnection.EGTS_ALT_SERVER_ADDRESS.length > 32) ||
|
||||
(env->nvm.SettingsServerConnection.EGTS_GPRS_APN.length > 32)) {
|
||||
DeviceDataNonVolatile_InitDefaults(&env->nvm);
|
||||
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// Created by zemon on 20.02.24.
|
||||
//
|
||||
|
||||
#ifndef HEAVY_TERMINAL_DEVICESTORAGE_H
|
||||
#define HEAVY_TERMINAL_DEVICESTORAGE_H
|
||||
|
||||
#include "DataNonVolatile.h"
|
||||
#include "StorageIO.h"
|
||||
#include "stdbool.h"
|
||||
|
||||
typedef struct {
|
||||
tDeviceDataNonVolatile nvm;
|
||||
} tDeviceStorage;
|
||||
|
||||
bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageInterface);
|
||||
|
||||
#endif //HEAVY_TERMINAL_DEVICESTORAGE_H
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"cmake": {
|
||||
"inc_dirs": [
|
||||
"./"
|
||||
],
|
||||
"srcs": [
|
||||
"./**.c"
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue