summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmir Hammad <amir.hammad@hotmail.com>2016-06-24 01:23:26 +0200
committerAmir Hammad <amir.hammad@hotmail.com>2016-06-25 10:09:55 +0200
commit27fe98f2d60d28153dfc10452b40664fc1e2ac66 (patch)
tree6ba0b87d218ce1bc570feefa24c0d18302e06a7a
parente59f23ad5c60dc08f281ccc7a794f4482e55ad00 (diff)
downloadsecure-hid-27fe98f2d60d28153dfc10452b40664fc1e2ac66.tar.gz
secure-hid-27fe98f2d60d28153dfc10452b40664fc1e2ac66.tar.bz2
secure-hid-27fe98f2d60d28153dfc10452b40664fc1e2ac66.zip
Embed information about compilation with the debug functions into make output
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
-rw-r--r--Makefile2
-rw-r--r--src/usart_helpers.c29
2 files changed, 2 insertions, 29 deletions
diff --git a/Makefile b/Makefile
index 9f42be3..d1eeedf 100644
--- a/Makefile
+++ b/Makefile
@@ -101,6 +101,8 @@ OBJS = $(filter-out $(BINARY).o, $(OBJSDEMO))
ifndef USART_DEBUG
OBJS := $(filter-out build/usart_helpers.o, $(OBJS))
OBJSDEMO := $(filter-out build/usart_helpers.o, $(OBJSDEMO))
+else
+$(info compiling with DEBUG functions)
endif
diff --git a/src/usart_helpers.c b/src/usart_helpers.c
index 4469b44..5a9aa03 100644
--- a/src/usart_helpers.c
+++ b/src/usart_helpers.c
@@ -31,33 +31,6 @@
#include <libopencm3/stm32/gpio.h>
-#ifndef USART_DEBUG
-
-void usart_init(uint32_t usart, uint32_t baudrate)
-{
- (void)usart;
- (void)baudrate;
-}
-void usart_printf(const char *str, ...)
-{
- (void)str;
-}
-void usart_vprintf(const char *str, va_list va)
-{
- (void)va;
- (void)str;
-}
-void usart_fifo_send(void){}
-
-void usart_call_cmd(struct usart_commands * commands)
-{
- (void)commands;
-}
-void usart_interrupt(void){}
-
-#else
-#warning compiling with debug functions
-
#define USART_FIFO_OUT_SIZE (4096)
uint8_t usart_fifo_out_data[USART_FIFO_OUT_SIZE];
uint32_t usart_fifo_out_len = 0;
@@ -283,5 +256,3 @@ void usart_call_cmd(struct usart_commands * commands)
command_argindex = 0;
LOG_PRINTF("INVALID COMMAND\n>>");
}
-
-#endif