aboutsummaryrefslogtreecommitdiff
path: root/stm32f091/main.c
diff options
context:
space:
mode:
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();
}