/* * Baro_MS4525DO.h * * Created on: Jun 22, 2020 * Author: matth */ #ifndef MATT_BARO_MS4525DO_SPI_H_ #define MATT_BARO_MS4525DO_SPI_H_ #include "SPIDevice.h" #include typedef enum { Baro_MS4525S_typeA, Baro_MS4525S_typeB } Baro_MS4525S_type; typedef struct Baro_MS4525S{ const char *name; SPI_DEV_t *_dev; int32_t Prange; int32_t Pmin; Baro_MS4525S_type typeAB; int32_t pressure; /* Pa */ int16_t temp; /*degC -50~150 */ uint8_t status; } Baro_MS4525S_t; bool Baro_MS4525S_init(Baro_MS4525S_t *baro, const char *name, SPI_DEV_t *dev, int Pmax, int Pmin, Baro_MS4525S_type typeAB); bool Baro_MS4525S_update(Baro_MS4525S_t *baro); #endif /* MATT_BARO_MS4525DO_SPI_H_ */