-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecord.h
More file actions
42 lines (30 loc) · 774 Bytes
/
record.h
File metadata and controls
42 lines (30 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* record.h
*
* Created on: Sep 9, 2021
* Author: Danylo Ulianych
*/
#ifndef MAIN_RECORD_H_
#define MAIN_RECORD_H_
#include <stdint.h>
#include "esp_err.h"
#define SDPSENSOR_SAMPLE_PERIOUD_US 1000
#define BMP280_SAMPLE_PERIOD_MS 1000
// SDPxx sensor: diff pressure
typedef struct __attribute__ ((__packed__)) SDPRecord {
int64_t time;
int16_t diff_pressure_raw;
} SDPRecord;
// BMP/BME280 sensor: atm. pressure, temperature, humidity
typedef struct __attribute__ ((__packed__)) BMPRecord {
int64_t time;
float pressure;
float temperature;
float humidity;
} BMPRecord;
void record_sdp_start();
void record_sdp_stop();
esp_err_t record_bmp_start();
void record_bmp_stop();
void record_bmp_read();
#endif /* MAIN_RECORD_H_ */