Do not send serial debug if not selected

This commit is contained in:
Jeremy Soller 2019-11-22 14:42:33 -07:00
parent 38321e068b
commit c94bd08986
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1

View File

@ -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