Skip to content

Commit

Permalink
Rename macro for enabling uart
Browse files Browse the repository at this point in the history
  • Loading branch information
R. Kaleta committed Feb 28, 2020
1 parent 904305d commit 2e70121
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions include/show_uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include "types.h"
#include "uart.h"

#define UART_ENABLED 0

void show_uart_vote(character_t sign, number_t value);
void show_uart_all();
void show_uart_error();
Expand Down
8 changes: 3 additions & 5 deletions src/show_uart.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "show_uart.h"
#include "memory.h"

#define SEND_VIA_UART 0

void show_one_vote_(character_t sign, number_t value)
{
uart_write(sign);
Expand All @@ -11,7 +9,7 @@ void show_one_vote_(character_t sign, number_t value)

void show_uart_vote(character_t sign, number_t value)
{
if(SEND_VIA_UART)
if(UART_ENABLED)
{
show_one_vote_(sign, value);
uart_write('\r');
Expand All @@ -21,7 +19,7 @@ void show_uart_vote(character_t sign, number_t value)

void show_uart_all()
{
if(SEND_VIA_UART)
if(UART_ENABLED)
{
const memory * m = mem_get();

Expand All @@ -37,7 +35,7 @@ void show_uart_all()

void show_uart_error()
{
if(SEND_VIA_UART)
if(UART_ENABLED)
{
uart_write(SignError[0]);
uart_write(SignError[1]);
Expand Down

0 comments on commit 2e70121

Please sign in to comment.