system/application_nvm/nvm_settings.h

/*******************************************************************************
* # License
* Copyright 2019 Silicon Laboratories Inc. www.silabs.com
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/
#pragma once
#include "gos.h"
#include "common.h"
// Define list of NVM entries for this app
// NOTE: For backwards compatibility, it's important the values
// assigned to these entries do NOT change with new versions of your app.
// To change or modify NVM entries, add a new entry with a new value to the list.
//
// NOTE: The maximum size of all NVM entries is GOS_NVM_MEMORY_SECTION_SIZE (typically 4K)
//
GOS_NVM_DEFINES_START
//--------------------------------------------------------------------------
// Sensor related settings
GOS_NVM_DEFINE_TYPE(SENSOR, 0),
// humidity sensor settings
GOS_NVM_DEFINE_ENTRY(SENSOR, HUMIDITY, 0, sizeof(humidity_sensor_settings_t)),
// temperature sensor settings
GOS_NVM_DEFINE_ENTRY(SENSOR, TEMPERATURE, 1, sizeof(temperature_sensor_settings_t)),
//--------------------------------------------------------------------------
// Cloud related settings
// cloud URL settings
GOS_NVM_DEFINE_ENTRY(CLOUD, URL, 0, MAX_CLOUD_URL_LENGTH),
// cloud settings
GOS_NVM_DEFINE_ENTRY(CLOUD, SETTINGS, 1, sizeof(cloud_settings_t)),
//--------------------------------------------------------------------------
// Device related settings
GOS_NVM_DEFINE_TYPE(DEVICE, 2),
// cloud URL settings
GOS_NVM_DEFINE_ENTRY(DEVICE, KEY, 0, DEVICE_KEY_LENGTH),
GOS_NVM_DEFINES_END