Enable i2c debugger on address 0x76
This commit is contained in:
		@@ -2,3 +2,6 @@ EC=it8587e
 | 
			
		||||
 | 
			
		||||
# Set debug level to debug
 | 
			
		||||
CFLAGS+=-DLEVEL=4
 | 
			
		||||
 | 
			
		||||
# Enable I2C debug on 0x76
 | 
			
		||||
CFLAGS+=-DI2C_DEBUGGER=0x76
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user