Do not send serial debug if not selected
This commit is contained in:
parent
38321e068b
commit
c94bd08986
@ -1,5 +1,8 @@
|
||||
#include <stdio.h>
|
||||
#include <mcs51/8051.h>
|
||||
|
||||
#ifdef SERIAL_DEBUGGER
|
||||
#include <mcs51/8051.h>
|
||||
#endif
|
||||
|
||||
#ifdef I2C_DEBUGGER
|
||||
#include <common/i2c.h>
|
||||
@ -7,7 +10,9 @@
|
||||
|
||||
int putchar(int c) {
|
||||
unsigned char byte = (unsigned char)c;
|
||||
#ifdef SERIAL_DEBUGGER
|
||||
SBUF = byte;
|
||||
#endif
|
||||
#ifdef I2C_DEBUGGER
|
||||
i2c_send(I2C_DEBUGGER, &byte, 1);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user