/*
 Author: Obrtac Tomas  
 Mail: obrtac.tomas@gmail.com
 2017
 */


#ifndef Sensors_lib
#define	Sensors_lib

#include <xc.h> // include processor files - each processor file is guarded. 
#include <stdint.h>
#include "UART_commands.h"
#include "SPI_commands.h"
#include "I2Ccommands.h"
#include <math.h>


#define SPI1ON LATAbits.LATA3
#define RNON LATAbits.LATA7
#define _XTAL_FREQ 20000000


void Restart_Barometric(void);
uint32_t MS5607_Read_Value_4096(uint8_t command);
uint32_t MS5607_Barrometric_Read_Value_4096(uint8_t command);
uint16_t MS5607_Read_Constant(uint8_t command);
uint16_t *Return_Constans_MS5607(void);
uint16_t *Return_Pressure_Temperature_MS5607(uint16_t Konst[]);
uint16_t *Return_Values_MS5607(uint16_t Konst[]);
void OPT3001_Configuration(char address);
float OPT3001_Converted_Value(char address);
float ADT7301_Converted_Value(void);

#endif	/* XC_HEADER_TEMPLATE_H */

