updated for datenlogger needs

This commit is contained in:
lars 2024-02-23 16:49:22 +01:00
parent 15d53829d7
commit 210f527973
2 changed files with 8 additions and 8 deletions

View File

@ -1,9 +1,9 @@
#ifndef STA_SENSORS_MS5607_HPP #ifndef STA_SENSORS_MS5607_HPP
#define STA_SENSORS_MS5607_HPP #define STA_SENSORS_MS5607_HPP
#include<sta/spi/device.hpp> #include<sta/devices/stm32/bus/spi.hpp>
#include<sta/endian.hpp> #include<sta/endian.hpp>
#include<sta/stm32/delay.hpp> #include<sta/devices/stm32/delay.hpp>
namespace sta { namespace sta {
// Class to represent a MS5607 pressure sensor which is used with SPI // Class to represent a MS5607 pressure sensor which is used with SPI
@ -18,7 +18,7 @@ namespace sta {
_4096 = 4 _4096 = 4
}; };
MS5607(SpiDevice* device, OsrLevel osr=OsrLevel::_1024); MS5607(STM32SPIDevice* device, OsrLevel osr=OsrLevel::_1024);
// Request Calculation of uncompensated pressure // Request Calculation of uncompensated pressure
// Takes a few ms -> Call, then do sth. else, then get Pressure with function // Takes a few ms -> Call, then do sth. else, then get Pressure with function
@ -65,7 +65,7 @@ namespace sta {
bool presRead; bool presRead;
// STA internal object for SPi abstraction // STA internal object for SPi abstraction
SpiDevice* device_; STM32SPIDevice* device_;
OsrLevel osr_; OsrLevel osr_;
// 6 Different constants; Includes Offsets, references etc. // 6 Different constants; Includes Offsets, references etc.

View File

@ -4,7 +4,7 @@ namespace sta {
// Forward declaration // Forward declaration
uint16_t uint_8BufferTouint16_t(uint8_t* buffer); uint16_t uint_8BufferTouint16_t(uint8_t* buffer);
MS5607::MS5607(SpiDevice* device, OsrLevel level) { MS5607::MS5607(STM32SPIDevice* device, OsrLevel level) {
this->device_ = device; this->device_ = device;
this->osr_ = level; this->osr_ = level;
this->lastPresVal = -1; this->lastPresVal = -1;
@ -161,7 +161,7 @@ namespace sta {
this->device_->beginTransmission(); this->device_->beginTransmission();
this->device_->transfer(MS5607::Operations::RESET); this->device_->transfer(MS5607::Operations::RESET);
this->device_->endTransmission(); this->device_->endTransmission();
delayUs(MS5607::RESET_DELAY); delayMs(MS5607::RESET_DELAY*0.001);
} }
// Read all constants from the PROM // Read all constants from the PROM