aboutsummaryrefslogtreecommitdiff
path: root/stm32f091/main.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-10-11 13:31:06 +0200
committerlonkaars <loek@pipeframe.xyz>2022-10-11 13:31:06 +0200
commit687767404ede06182a5d1f09ab3b7c66ba5f4d13 (patch)
tree7fd270d23424c103f8efe5f94ba9a43fedbf3997 /stm32f091/main.c
parent4625b939aad3537bd130617944e01f5da693b23d (diff)
WIP merge fix
Diffstat (limited to 'stm32f091/main.c')
-rw-r--r--stm32f091/main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/stm32f091/main.c b/stm32f091/main.c
index 68e8dd4..61608a8 100644
--- a/stm32f091/main.c
+++ b/stm32f091/main.c
@@ -1,12 +1,14 @@
#include <FreeRTOS.h>
#include <task.h>
#include <stm32f0xx_hal.h>
+#include <stm32f0xx_hal_msp.h>
#include "main.h"
#include "setup.h"
#include "sensor.h"
+#include "backlog.h"
-I2C_HandleTypeDef hi2c2;
+I2C_HandleTypeDef hi2c1;
UART_HandleTypeDef huart2;
int main() {
@@ -17,6 +19,11 @@ int main() {
MX_USART2_UART_Init();
MX_I2C2_Init();
+ HAL_I2C_MspInit(&hi2c1);
+
+ ws_backlog_alloc(24 * 60);
+ ws_sensor_read();
+
xTaskCreate(ws_sensor_read_task, "sensor", 128, NULL, 1, NULL);
vTaskStartScheduler();
}