aboutsummaryrefslogtreecommitdiff
path: root/stm32f091/sensor.h
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-10-05 20:23:58 +0200
committerlonkaars <loek@pipeframe.xyz>2022-10-05 20:23:58 +0200
commit6e63028aec15f93bf82a0452b45a6b4dfec81f05 (patch)
tree3416de57d96b7bcbcf6504fd209bd38f14cf04eb /stm32f091/sensor.h
parent1000c8fd861b046a72bb3957dcc04cd6b28ceede (diff)
merge bjorn's code
Diffstat (limited to 'stm32f091/sensor.h')
-rw-r--r--stm32f091/sensor.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/stm32f091/sensor.h b/stm32f091/sensor.h
new file mode 100644
index 0000000..802656b
--- /dev/null
+++ b/stm32f091/sensor.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <stdint.h>
+
+/** Get current temperature measurement */
+uint8_t ws_sensor_temperature();
+/** Get current humidity measurement */
+uint8_t ws_sensor_humidity();
+/** Get current atmospheric pressure measurement */
+uint8_t ws_sensor_atmospheric_pressure();
+
+/**
+ * Put measurements from every sensor into a `ws_s_backlog_record`, and commit
+ * that struct to the database
+ */
+void ws_sensor_read();
+
+/** FreeRTOS task that runs `ws_sensor_read` every minute */
+void ws_sensor_read_task();
+