IOT Matrix Display
|
#include "module_config.h"
#include <wchar.h>
#include <zephyr/drivers/flash.h>
#include <zephyr/fs/nvs.h>
#include <zephyr/logging/log.h>
#include <zephyr/storage/flash_map.h>
Macros | |
#define | NVS_PARTITION storage_partition |
#define | NVS_PARTITION_DEVICE FIXED_PARTITION_DEVICE(NVS_PARTITION) |
#define | NVS_PARTITION_OFFSET FIXED_PARTITION_OFFSET(NVS_PARTITION) |
#define | FS_NUMBER_OF_FLASH_SECTORS 3U |
#define | CHECK_ITEM_ID(id) |
Functions | |
LOG_MODULE_REGISTER (module_config, CONFIG_LOG_DEFAULT_LEVEL) | |
int8_t | module_configInit (void) |
initialise the configuration module | |
int8_t | module_configCreate (module_configItemID_t item_id, uint8_t length, void *buff, module_configFlags_t flags) |
creates a config item | |
int8_t | module_configRead (module_configItemID_t item_id, uint8_t length, void *buff) |
reads an item from the config into the buffer provided | |
int8_t | module_configUpdate (module_configItemID_t item_id, uint8_t length, void *buff) |
updates a config item | |
int8_t | module_configDelete (module_configItemID_t item_id) |
deletes a config item | |
#define CHECK_ITEM_ID | ( | id | ) |
int8_t module_configCreate | ( | module_configItemID_t | item_id, |
uint8_t | length, | ||
void * | buff, | ||
module_configFlags_t | flags ) |
creates a config item
type | module_configItemID_t which config item to write |
length | length of item which will be writeen |
buff | void buffer with item data to write |
flags | bit field of flags to set for item |
int8_t module_configDelete | ( | module_configItemID_t | item_id | ) |
deletes a config item
item | config item to delete |
int8_t module_configInit | ( | void | ) |
initialise the configuration module
int8_t module_configRead | ( | module_configItemID_t | item_id, |
uint8_t | length, | ||
void * | buff ) |
reads an item from the config into the buffer provided
type | module_configItemID_t which config item to read |
length | length of item to read |
buff | void buffer to read the item data into |
int8_t module_configUpdate | ( | module_configItemID_t | item_id, |
uint8_t | length, | ||
void * | buff ) |
updates a config item
type | module_configItemID_t which config item to write |
length | length of item which will be writen |
buff | void buffer with item data to write |