aboutsummaryrefslogtreecommitdiffstats
path: root/src/glutt-o-logique
diff options
context:
space:
mode:
Diffstat (limited to 'src/glutt-o-logique')
-rw-r--r--src/glutt-o-logique/Makefile6
-rw-r--r--src/glutt-o-logique/cw.c4
-rw-r--r--src/glutt-o-logique/fsm.c4
-rw-r--r--src/glutt-o-logique/usart.c5
4 files changed, 8 insertions, 11 deletions
diff --git a/src/glutt-o-logique/Makefile b/src/glutt-o-logique/Makefile
index 2fd5f91..4f0aa14 100644
--- a/src/glutt-o-logique/Makefile
+++ b/src/glutt-o-logique/Makefile
@@ -17,8 +17,12 @@ ASOURCES=$(shell find -L $(SRCDIR) -name '*.s')
CSOURCES+=$(shell find -L $(SRCDIR) -name '*.c')
HEADERS=$(shell find -L $(SRCDIR) -name '*.h')
+COMMON_DIR=../common
+COMMON_SOURCE_LIST=$(shell cat ../common/sourcelist.txt)
+CSOURCES+=$(COMMON_SOURCE_LIST:%.c=../common/%.c)
+
INC=$(shell find -L $(SRCDIR) -name '*.h' -exec dirname {} \; | uniq)
-INC+=../common/includes
+INC+=$(COMMON_DIR)/includes
INCLUDES=$(INC:%=-I%)
# Create object list
diff --git a/src/glutt-o-logique/cw.c b/src/glutt-o-logique/cw.c
index 36e5654..a54ca83 100644
--- a/src/glutt-o-logique/cw.c
+++ b/src/glutt-o-logique/cw.c
@@ -27,8 +27,6 @@
// Function to display message in GUI, unused on STM32 firmware
void cw_message_sent(const char* str) {
- usart_debug_puts("CW: ");
- usart_debug_puts(str);
- usart_debug_puts("\r\n");
+ usart_debug_puts_header("CW: ", str);
}
diff --git a/src/glutt-o-logique/fsm.c b/src/glutt-o-logique/fsm.c
index aed633b..edc6f6f 100644
--- a/src/glutt-o-logique/fsm.c
+++ b/src/glutt-o-logique/fsm.c
@@ -26,8 +26,6 @@
#include "GPIO/usart.h"
void fsm_state_switched(char * new_state) {
- usart_debug_puts("FSM: ");
- usart_debug_puts(new_state);
- usart_debug_puts("\r\n");
+ usart_debug_puts_header("FSM: ", new_state);
}
diff --git a/src/glutt-o-logique/usart.c b/src/glutt-o-logique/usart.c
index 4c5869d..4bef27a 100644
--- a/src/glutt-o-logique/usart.c
+++ b/src/glutt-o-logique/usart.c
@@ -36,10 +36,7 @@ const uint16_t GPIOD_PIN_USART3_RX = GPIO_Pin_9;
const uint16_t GPIOA_PIN_USART2_RX = GPIO_Pin_3;
const uint16_t GPIOA_PIN_USART2_TX = GPIO_Pin_2;
-static void usart_puts(USART_TypeDef*, const char*);
-
#include "../common/includes/GPIO/usart.h"
-#include "../common/src/GPIO/usart.c"
void usart_init() {
@@ -132,7 +129,7 @@ void usart_gps_specific_init() {
}
// Make sure Tasks are suspended when this is called!
-static void usart_puts(USART_TypeDef* USART, const char* str) {
+void usart_puts(USART_TypeDef* USART, const char* str) {
while(*str) {
// wait until data register is empty
USART_SendData(USART, *str);