/**
* \file  resource.h
*
* \brief This is the implementation of LoRaWAN resource module
*
* Copyright (c) 2021 Europalab Devices ApS
*
* \asf_license_start
*
* \page License
*
* This file is part of Sendcomm.
*
* Sendcomm is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Sendcomm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Sendcomm. If not, see <https://www.gnu.org/licenses/>.
*
* \asf_license_stop
*
*/


/* Prevent double inclusion */
#ifndef RESOURCE_H
#define RESOURCE_H


/****************************** INCLUDES **************************************/
#include "asf.h"

/***************************** DEFINES ****************************************/
/* Resource type */
typedef enum _resourceType
{
    TEMP_SENSOR = 0x1,
    LED_AMBER = 0x2,
    LED_RED = 0x3,
    UNSUPPORTED_RESOURCE = 0xFF
}resourceType_t;


/*************************** FUNCTIONS PROTOTYPE ******************************/

/*********************************************************************//**
 \brief      Function to get different resource data
 \param[in]  resourceType_t - Type of resource (Temperature)
 \param[out] *data    - Pointer to the data from different resource
*************************************************************************/
void get_resource_data(const resourceType_t resource, uint8_t * data);

/*********************************************************************//**
 \brief      Function to set data to resource
 \param[in]  resourceType_t - Type of resource (Temperature)
 \param[out] *data    - Pointer to the data from different resource
*************************************************************************/
int set_resource_data(const resourceType_t resource,const uint8_t * data);

/*********************************************************************//**
 \brief      Function to initialize the different resources
*************************************************************************/
void resource_init(void);

#endif
