 /******************************************************************************
 * @file    m_loramngt_flash.h
 * @author  Insight SiP
 * @version V2.2.0
 * @date    20-dec-2019
 * @brief   loramngt flash module header file.
 *
 * @attention
 *	THIS SOFTWARE IS PROVIDED BY INSIGHT SIP "AS IS" AND ANY EXPRESS
 *	OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 *	OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 *	DISCLAIMED. IN NO EVENT SHALL INSIGHT SIP OR CONTRIBUTORS BE
 *	LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 *	CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *	GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 *	HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 *	LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 *	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *****************************************************************************/
 

#ifndef __M_LORAMNGT_FLASH_H__
#define __M_LORAMNGT_FLASH_H__

#include "ble_loramngt.h"


/**@brief Function for storing the lora configuration.
 *
 * @param[in] p_config  	Pointer to configuration to be stored.
 *
 * @retval NRF_SUCCESS      If initialization was successful.
 * @retval NRF_ERROR_NULL   If a NULL pointer was supplied.
 * @retval Other codes from the underlying drivers.
 */
uint32_t m_loramngt_flash_config_store(ble_loramngt_config_t *p_config);

/**@brief Function for loading the lora configuration.
 *
 * @param[out] p_config  	Pointer to loaded configuration.
 *
 * @retval NRF_SUCCESS      If initialization was successful.
 * @retval Other codes from the underlying drivers.
 */
uint32_t m_loramngt_flash_config_load(ble_loramngt_config_t **p_config);

/**@brief Function for initializing senslora flash handling.
 *
 * @param[in]  p_lora_default_config     	Pointer to lora default configuration.
 * @param[out] p_lora_config             	Pointer to lora current configuration.
 *
 * @retval NRF_SUCCESS      If initialization was successful.
 * @retval NRF_ERROR_NULL   If a NULL pointer was supplied.
 * @retval Other codes from the underlying drivers.
 */
uint32_t m_loramngt_flash_init (const ble_loramngt_config_t *p_default_config, ble_loramngt_config_t **p_config);

#endif

