1 /*!
2  * \file      NvmDataMgmt.h
3  *
4  * \brief     NVM context management implementation
5  *
6  * \copyright Revised BSD License, see section \ref LICENSE.
7  *
8  * \code
9  *                ______                              _
10  *               / _____)             _              | |
11  *              ( (____  _____ ____ _| |_ _____  ____| |__
12  *               \____ \| ___ |    (_   _) ___ |/ ___)  _ \
13  *               _____) ) ____| | | || |_| ____( (___| | | |
14  *              (______/|_____)_|_|_| \__)_____)\____)_| |_|
15  *              (C)2013-2017 Semtech
16  *
17  *               ___ _____ _   ___ _  _____ ___  ___  ___ ___
18  *              / __|_   _/_\ / __| |/ / __/ _ \| _ \/ __| __|
19  *              \__ \ | |/ _ \ (__| ' <| _| (_) |   / (__| _|
20  *              |___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___|
21  *              embedded.connectivity.solutions===============
22  *
23  * \endcode
24  *
25  * \author    Miguel Luis ( Semtech )
26  *
27  * \author    Gregory Cristian ( Semtech )
28  *
29  * \author    Daniel Jaeckle ( STACKFORCE )
30  *
31  * \author    Johannes Bruder ( STACKFORCE )
32  *
33  * \defgroup  NVMDATAMGMT NVM context management implementation
34  *            This module implements the NVM context handling
35  * \{
36  */
37 #ifndef __NVMDATAMGMT_H__
38 #define __NVMDATAMGMT_H__
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 /*!
45  * \brief NVM Management event.
46  *
47  * \param [IN] notifyFlags Bitmap which contains the information about modules that
48  *                         changed.
49  */
50 void NvmDataMgmtEvent( uint16_t notifyFlags );
51 
52 /*!
53  * \brief Function which stores the MAC data into NVM, if required.
54  *
55  * \retval Number of bytes which were stored.
56  */
57 uint16_t NvmDataMgmtStore( void );
58 
59 /*!
60  * \brief Function which restores the MAC data from NVM, if required.
61  *
62  * \retval Number of bytes which were restored.
63  */
64 uint16_t NvmDataMgmtRestore(void );
65 
66 /*!
67  * \brief Resets the NVM data.
68  *
69  * \retval Returns true, if successful.
70  */
71 bool NvmDataMgmtFactoryReset( void );
72 
73 /* \} */
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif // __NVMDATAMGMT_H__
80