Hot-pluggable parallel port debugging
This commit is contained in:
committed by
Jeremy Soller
parent
47aed0733e
commit
834aaf97e4
@ -10,21 +10,28 @@
|
||||
#include <ec/i2c.h>
|
||||
#endif
|
||||
|
||||
#ifdef PARPORT_DEBUG
|
||||
#include <ec/parallel.h>
|
||||
#endif
|
||||
#ifdef PARALLEL_DEBUG
|
||||
#include <board/parallel.h>
|
||||
#endif // PARALLEL_DEBUG
|
||||
|
||||
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
|
||||
|
||||
#ifdef PARALLEL_DEBUG
|
||||
if (parallel_debug) {
|
||||
parallel_write(&byte, 1);
|
||||
}
|
||||
#endif // PARALLEL_DEBUG
|
||||
|
||||
return (int)byte;
|
||||
}
|
||||
|
Reference in New Issue
Block a user