mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/driver-ms56xx.git
synced 2025-09-28 22:37:33 +00:00
updated for adler
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#ifndef STA_SENSORS_MS5607_HPP
|
||||
#define STA_SENSORS_MS5607_HPP
|
||||
|
||||
#include <sta/bus/spi/device.hpp>
|
||||
#include <sta/bus/i2c/device.hpp>
|
||||
//#include <sta/bus/spi/device.hpp>
|
||||
//#include <sta/bus/i2c/device.hpp>
|
||||
#include <sta/devices/stm32/bus/spi.hpp>
|
||||
#include <sta/time.hpp>
|
||||
|
||||
#include <sta/endian.hpp>
|
||||
@@ -28,6 +29,11 @@ namespace sta
|
||||
* @brief Driver class for communicating with the MS56xx pressure sensor via SPI.
|
||||
*
|
||||
*/
|
||||
struct MSData {
|
||||
float pressure;
|
||||
float temperature;
|
||||
};
|
||||
|
||||
class MS56xx {
|
||||
public:
|
||||
/**
|
||||
@@ -123,7 +129,7 @@ namespace sta
|
||||
*
|
||||
* @note Set PS pin to high for I2C. Chip select pin represents LSB of address.
|
||||
*/
|
||||
MS56xx(I2CDevice * device, Version version, DelayUsFunc delay, OsrLevel osr = OsrLevel::_1024);
|
||||
//MS56xx(I2CDevice * device, Version version, DelayUsFunc delay, OsrLevel osr = OsrLevel::_1024);
|
||||
|
||||
/**
|
||||
* @brief Initialize the driver. Computes the pressure value at altitude 0.
|
||||
@@ -145,7 +151,7 @@ namespace sta
|
||||
* @param unit Specifies the unit for the pressure measurement. Default is hPa.
|
||||
* @return float The measured value in the specified unit.
|
||||
*/
|
||||
float getPressure(Unit unit = Unit::hPa);
|
||||
MSData getPressure(Unit unit = Unit::hPa);
|
||||
|
||||
/**
|
||||
* @brief Reads the current temperature value from the sensor.
|
||||
|
Reference in New Issue
Block a user