diff options
-rw-r--r-- | src/common/includes/GPIO/temperature.h | 8 | ||||
-rw-r--r-- | src/common/sourcelist.txt | 1 | ||||
-rw-r--r-- | src/common/src/GPIO/leds.c | 1 | ||||
-rw-r--r-- | src/common/src/GPIO/temperature.c | 2 | ||||
-rw-r--r-- | src/glutt-o-logique/leds.c | 2 | ||||
-rw-r--r-- | src/glutt-o-logique/temperature.c | 6 | ||||
-rw-r--r-- | src/simulator/src/GPIO/leds.c | 2 | ||||
-rw-r--r-- | src/simulator/src/GPIO/temperature.c | 6 |
8 files changed, 15 insertions, 13 deletions
diff --git a/src/common/includes/GPIO/temperature.h b/src/common/includes/GPIO/temperature.h index a054fab..a67d16b 100644 --- a/src/common/includes/GPIO/temperature.h +++ b/src/common/includes/GPIO/temperature.h @@ -22,11 +22,11 @@ * SOFTWARE. */ +#pragma once #include <stdint.h> -#ifndef __TEMPERATURE_H -#define __TEMPERATURE_H - +extern float _temperature_last_value; +extern int _temperature_valid; // Setup communication and temperature void temperature_init(); @@ -37,5 +37,3 @@ int temperature_valid(); // Get current temperature float temperature_get(); -#endif // __TEMPERATURE_H - diff --git a/src/common/sourcelist.txt b/src/common/sourcelist.txt index 350c037..0abc086 100644 --- a/src/common/sourcelist.txt +++ b/src/common/sourcelist.txt @@ -1,4 +1,5 @@ src/GPIO/usart.c +src/GPIO/temperature.c src/GPS/gps.c src/GPS/minmea.c src/Core/common.c diff --git a/src/common/src/GPIO/leds.c b/src/common/src/GPIO/leds.c deleted file mode 100644 index df2adea..0000000 --- a/src/common/src/GPIO/leds.c +++ /dev/null @@ -1 +0,0 @@ -#include "../../../common/includes/GPIO/leds.h" diff --git a/src/common/src/GPIO/temperature.c b/src/common/src/GPIO/temperature.c index 21cb9f8..f9e43cb 100644 --- a/src/common/src/GPIO/temperature.c +++ b/src/common/src/GPIO/temperature.c @@ -33,7 +33,7 @@ float _temperature_last_value; int _temperature_valid; -static void temperature_task(void *pvParameters); +void temperature_task(void *pvParameters); void temperature_init() { diff --git a/src/glutt-o-logique/leds.c b/src/glutt-o-logique/leds.c index 15c175c..0169553 100644 --- a/src/glutt-o-logique/leds.c +++ b/src/glutt-o-logique/leds.c @@ -22,7 +22,7 @@ * SOFTWARE. */ -#include "../common/src/GPIO/leds.c" +#include "GPIO/leds.h" #include "stm32f4xx_conf.h" diff --git a/src/glutt-o-logique/temperature.c b/src/glutt-o-logique/temperature.c index db3f46a..b9f7d87 100644 --- a/src/glutt-o-logique/temperature.c +++ b/src/glutt-o-logique/temperature.c @@ -33,7 +33,9 @@ #include "Core/delay.h" -#include "../common/src/GPIO/temperature.c" +#include "FreeRTOS.h" +#include "task.h" +#include "GPIO/temperature.h" const TickType_t _temperature_delay = 60000 / portTICK_PERIOD_MS; // 60s @@ -95,7 +97,7 @@ int ds18b20_gettemp(float *temperature) { return status; } -static void temperature_task(void *pvParameters) { +void temperature_task(void *pvParameters) { while (1) { diff --git a/src/simulator/src/GPIO/leds.c b/src/simulator/src/GPIO/leds.c index 874cc19..0bc5300 100644 --- a/src/simulator/src/GPIO/leds.c +++ b/src/simulator/src/GPIO/leds.c @@ -1,4 +1,4 @@ -#include "../../../common/src/GPIO/leds.c" +#include "GPIO/leds.h" extern char led_blue; diff --git a/src/simulator/src/GPIO/temperature.c b/src/simulator/src/GPIO/temperature.c index 6befb2a..7c343be 100644 --- a/src/simulator/src/GPIO/temperature.c +++ b/src/simulator/src/GPIO/temperature.c @@ -1,9 +1,11 @@ -#include "../../../common/src/GPIO/temperature.c" +#include "GPIO/temperature.h" +#include "FreeRTOS.h" +#include "task.h" extern int gui_temperature_valid; extern float gui_temperature; -static void temperature_task(void *pvParameters) { +void temperature_task(void *pvParameters) { while (1) { |