Loading...
Searching...
No Matches
barometer.h
Go to the documentation of this file.
1
7
8// ALLOW FORMATTING
9#ifndef BARO_H
10#define BARO_H
11
12#include "stdint.h"
13
14typedef struct Baro {
25 void (*update)(struct Baro *baro);
26
38 void (*readTemp)(struct Baro *baro, float *out);
39
51 void (*readPress)(struct Baro *baro, float *out);
52
64 void (*readRawTemp)(struct Baro *baro, uint8_t *out);
65
77 void (*readRawPress)(struct Baro *baro, uint8_t *out);
78
92 void (*processRawTemp)(struct Baro *baro, uint8_t *bytes, float *out);
93
107 void (*processRawPress)(struct Baro *baro, uint8_t *bytes, float *out);
108
110 uint8_t tempDataSize;
111 uint8_t *rawPress;
112 uint8_t *rawTemp;
114 float press;
115 float temp;
116 float sensitivity;
117} Baro_t;
118
120#endif
void(* readPress)(struct Baro *baro, float *out)
Pointer to readPress method.
Definition barometer.h:51
uint8_t * rawTemp
Pointer to driver defined raw temperature data array.
Definition barometer.h:112
void(* readTemp)(struct Baro *baro, float *out)
Pointer to readTemp method.
Definition barometer.h:38
void(* readRawPress)(struct Baro *baro, uint8_t *out)
Pointer to readRawPress method.
Definition barometer.h:77
float temp
Last read processed temperature value.
Definition barometer.h:115
uint8_t pressDataSize
Size of raw pressure data in bytes.
Definition barometer.h:109
float press
Last read processed pressure value.
Definition barometer.h:114
float groundPress
Stored ground pressure reading.
Definition barometer.h:113
void(* processRawTemp)(struct Baro *baro, uint8_t *bytes, float *out)
Pointer to processRawTemp method.
Definition barometer.h:92
void(* processRawPress)(struct Baro *baro, uint8_t *bytes, float *out)
Pointer to processRawPress method.
Definition barometer.h:107
void(* readRawTemp)(struct Baro *baro, uint8_t *out)
Pointer to readRawTemp method.
Definition barometer.h:64
uint8_t tempDataSize
Size of raw temperature data in bytes.
Definition barometer.h:110
uint8_t * rawPress
Pointer to driver defined raw pressure data array.
Definition barometer.h:111
void(* update)(struct Baro *baro)
Pointer to update method.
Definition barometer.h:25