You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
946 B
C

#ifndef DAQ_H
#define DAQ_H
//HEADERS
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <stdint.h>
#include "uart.h"
//DEFINITIONS
#define SprintIR 4 //co2 sensor
#define COAF 1 //co sensor
#define LOX_O2 2 //o2
//comands
#define Rep_Dev_ID "Y\r\n"
#define Polling_Mode "K 2\r\n"
#define OX_P_Mode "M 1\r\n"
#define FILnUNFIL "M 6\r\n"
#define unf_gas_con "z\r\n"
#define fil_gas_con "Z\r\n"
#define Temperature "T\r\n"
#define get_readigns "Q\r\n"
#define percent_oxigen "%\r\n"
#define ppm_oxigen "O\r\n"
#define M_zZTHBD "M 14406\r\n"
#define M_zZTHB "M 12358\r\n"
#define Readings_OX "A\r\n"
//FUNCTIONS
int sensConf(uint8_t uartNumber, int baudRate, char mode[], char response[], int tries);
int DAQ(int t_hrs, int sp_s);
char *getMeasures(char src[], char fval, int nchar);
#endif