System76 common board directory (#53)
* Move configuration for battery into board.mk * lemp9: remove tcpm code * Move touchpad to its own module * Add kbled_reset to all platforms, move items to run on CPU reset to a function * Add defines for battery and charger address * Add I2C_0 export to it5570e * Move common system76 board functions into src/board/system76/common
This commit is contained in:
30
src/board/system76/common/stdio.c
Normal file
30
src/board/system76/common/stdio.c
Normal file
@ -0,0 +1,30 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <board/smfi.h>
|
||||
|
||||
#ifdef SERIAL_DEBUGGER
|
||||
#include <mcs51/8051.h>
|
||||
#endif
|
||||
|
||||
#ifdef I2C_DEBUGGER
|
||||
#include <ec/i2c.h>
|
||||
#endif
|
||||
|
||||
#ifdef PARPORT_DEBUG
|
||||
#include <ec/parallel.h>
|
||||
#endif
|
||||
|
||||
int putchar(int c) {
|
||||
unsigned char byte = (unsigned char)c;
|
||||
smfi_debug(byte);
|
||||
#ifdef SERIAL_DEBUGGER
|
||||
SBUF = byte;
|
||||
#endif
|
||||
#ifdef I2C_DEBUGGER
|
||||
i2c_send(&I2C_SMBUS, I2C_DEBUGGER, &byte, 1);
|
||||
#endif
|
||||
#ifdef PARPORT_DEBUG
|
||||
parport_write(&byte, 1);
|
||||
#endif
|
||||
return (int)byte;
|
||||
}
|
Reference in New Issue
Block a user