Enable i2c debugger on address 0x76

This commit is contained in:
Jeremy Soller 2019-11-18 09:26:38 -07:00
parent 6f6336c2dd
commit 47359230fa
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
2 changed files with 4 additions and 4 deletions

View File

@ -2,3 +2,6 @@ EC=it8587e
# Set debug level to debug
CFLAGS+=-DLEVEL=4
# Enable I2C debug on 0x76
CFLAGS+=-DI2C_DEBUGGER=0x76

View File

@ -2,12 +2,9 @@
#include <common/i2c.h>
#define I2C_DEBUGGER 0
// #define I2C_DEBUGGER 0x76
int putchar(int c) {
unsigned char byte = (unsigned char)c;
#if I2C_DEBUGGER
#ifdef I2C_DEBUGGER
i2c_send(I2C_DEBUGGER, &byte, 1);
#endif
return (int)byte;