From 47359230fa3018af1350008739a92d5a34f9a3ea Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 18 Nov 2019 09:26:38 -0700 Subject: [PATCH] Enable i2c debugger on address 0x76 --- src/board/system76/galp3-c/board.mk | 3 +++ src/board/system76/galp3-c/stdio.c | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/board/system76/galp3-c/board.mk b/src/board/system76/galp3-c/board.mk index e0521b2..49ea1ff 100644 --- a/src/board/system76/galp3-c/board.mk +++ b/src/board/system76/galp3-c/board.mk @@ -2,3 +2,6 @@ EC=it8587e # Set debug level to debug CFLAGS+=-DLEVEL=4 + +# Enable I2C debug on 0x76 +CFLAGS+=-DI2C_DEBUGGER=0x76 diff --git a/src/board/system76/galp3-c/stdio.c b/src/board/system76/galp3-c/stdio.c index 7ff7cf2..b394676 100644 --- a/src/board/system76/galp3-c/stdio.c +++ b/src/board/system76/galp3-c/stdio.c @@ -2,12 +2,9 @@ #include -#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;