mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/driver-ms56xx.git
synced 2025-06-11 02:26:00 +00:00
Init commit
This commit is contained in:
commit
21e4d4a4e2
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "sta-core"]
|
||||||
|
path = sta-core
|
||||||
|
url = https://gitlab.com/sta-git/alpaka/sta-core
|
20
.vscode/c_cpp_properties.json
vendored
Normal file
20
.vscode/c_cpp_properties.json
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Mac",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**",
|
||||||
|
"${workspaceFolder}/sta-core/include"
|
||||||
|
],
|
||||||
|
"defines": [],
|
||||||
|
"macFrameworkPath": [
|
||||||
|
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"
|
||||||
|
],
|
||||||
|
"compilerPath": "/usr/bin/clang",
|
||||||
|
"cStandard": "c11",
|
||||||
|
"cppStandard": "c++11",
|
||||||
|
"intelliSenseMode": "macos-clang-arm64"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
5
README.md
Normal file
5
README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Driver for the MS5607 pressure sensor
|
||||||
|
|
||||||
|
## TODO
|
||||||
|
1. Understand the Datasheet (RIP)
|
||||||
|
2. Write the fucking driver
|
34
include/sta/MS5607.hpp
Normal file
34
include/sta/MS5607.hpp
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#ifndef STA_SENSORS_MS5607_HPP
|
||||||
|
#define STA_SENSORS_MS5607_HPP
|
||||||
|
|
||||||
|
#include<sta/spi/device.hpp>
|
||||||
|
|
||||||
|
namespace sta {
|
||||||
|
class MS5607 {
|
||||||
|
public:
|
||||||
|
enum OsrLevel {
|
||||||
|
_256 = 0,
|
||||||
|
_512 = 1,
|
||||||
|
_1024 = 2,
|
||||||
|
_2048 = 3,
|
||||||
|
_4096 = 4
|
||||||
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
|
SpiDevice* device_;
|
||||||
|
|
||||||
|
uint16_t sens, off, tcs, tco, t_ref, tempsens;
|
||||||
|
|
||||||
|
enum Operations {
|
||||||
|
RESET = 0x1E,
|
||||||
|
READ_PROM = 0xA0,
|
||||||
|
D1_CONVERSION = 0x40,
|
||||||
|
D2_CONVERSION = 0x50,
|
||||||
|
ADC_RESULT = 0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // ifndef STA_SENSORS_MS5607_HPP
|
0
src/MS5607.cpp
Normal file
0
src/MS5607.cpp
Normal file
1
sta-core
Submodule
1
sta-core
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 4204c028a234d138a52f23c1851022e724a0fb13
|
Loading…
x
Reference in New Issue
Block a user