AWS IoT for ESP32 v1.0.0
An ESP-IDF based solution
lib_flash.h
Go to the documentation of this file.
1/*******************************************************************************
2* Copyright (c) 2021, Buildstorm Pvt Ltd
3*
4* Filename: lib_flash.h
5*
6* Author: Amruta
7* email: amruta@buildstorm.com
8*
9* Description:
10* Contains wrapper functions to handle flash read/write functionalities.
11*******************************************************************************/
12
18#ifndef _LIB_MODULE_FLASH_H_
19#define _LIB_MODULE_FLASH_H_
20
21/* Includes ------------------------------------------------------------------*/
22#include "stdutils.h"
23
24/*---------------------------structures-------------------------------------*/
29typedef enum
30{
39
44typedef enum
45{
50
55typedef enum
56{
66
71typedef enum
72{
77
82typedef enum
83{
90
91/* Function declarations ----------------------------------------------------*/
92
99
108
117
124
130const char *FLASH_getThingName();
131
140bool FLASH_appDataRead(void *pData, uint16_t size_u16);
141
150bool FLASH_appDataWrite(void *pData, uint16_t size_u16);
151
160
161#endif
deviceCertType_et
Definition: lib_flash.h:72
@ FLASH_CERT_CERTIFICATE_PEM
Definition: lib_flash.h:73
@ FLAH_CERT_MAX
Definition: lib_flash.h:75
@ FLASH_CERT_PRIVATE_KEY
Definition: lib_flash.h:74
bool FLASH_updatePending()
Check if a dataset is updated.
bool FLASH_isDeviceRegistered()
Check if the device is registered with AWS IoT.
flashDataSet_et
Definition: lib_flash.h:83
@ FLASH_DATASET_SYSTEM_STATUS
Definition: lib_flash.h:85
@ FLASH_DATASET_DEVICE_CERTIFICATES
Definition: lib_flash.h:86
@ FLASH_DATASET_APP
Definition: lib_flash.h:87
@ FLASH_DATASET_DEVICE_CONFIG
Definition: lib_flash.h:84
@ FLASH_DATASET_MAX
Definition: lib_flash.h:88
systemStatusParams_et
Definition: lib_flash.h:45
@ SYSTEM_STATUS_MAX
Definition: lib_flash.h:48
@ SYSTEM_STATUS_OTA
Definition: lib_flash.h:46
@ SYSTEM_STATUS_ALL
Definition: lib_flash.h:47
const char * FLASH_getThingName()
Get thing name from stored configuration.
bool FLASH_appDataRead(void *pData, uint16_t size_u16)
Read the data from application dataset.
void FLASH_printConfig()
Print stored device configuration.
bool FLASH_appDataWrite(void *pData, uint16_t size_u16)
Store the given data to application data set.
deviceConfigParams_et
Definition: lib_flash.h:56
@ DEVICE_CONFIG_THING_NAME
Definition: lib_flash.h:62
@ DEVICE_CONFIG_HOST
Definition: lib_flash.h:57
@ DEVICE_CONFIG_MAX
Definition: lib_flash.h:64
@ DEVICE_CONFIG_USERNAME
Definition: lib_flash.h:59
@ DEVICE_CONFIG_PORT
Definition: lib_flash.h:58
@ DEVICE_CONFIG_WIFI
Definition: lib_flash.h:61
@ DEVICE_CONFIG_CLEAR
Definition: lib_flash.h:63
@ DEVICE_CONFIG_PASSWORD
Definition: lib_flash.h:60
char * FLASH_getCertificate(deviceCertType_et certType_e)
Get the given certificate from stored configuration.
flashStatus_t
Definition: lib_flash.h:30
@ FLASH_STATUS_LOAD_DEFAULT
Definition: lib_flash.h:33
@ FLASH_STATUS_MAX
Definition: lib_flash.h:37
@ FLASH_STATUS_READ_FAIL
Definition: lib_flash.h:34
@ FLASH_STATUS_BUSY
Definition: lib_flash.h:32
@ FLASH_STATUS_WRITE_FAIL
Definition: lib_flash.h:35
@ FLASH_STATUS_INVALID_DATASET
Definition: lib_flash.h:36
@ FLASH_STATUS_OK
Definition: lib_flash.h:31
bool FLASH_appDataEraseAll()
Erase stored application dataset.