URL
https://opencores.org/ocsvn/xulalx25soc/xulalx25soc/trunk
[/] [xulalx25soc/] [trunk/] [sw/] [ttybus.cpp] - Diff between revs 109 and 113
Show entire file |
Details |
Blame |
View Log
Rev 109 |
Rev 113 |
Line 67... |
Line 67... |
|
|
const unsigned TTYBUS::MAXRDLEN = 1024;
|
const unsigned TTYBUS::MAXRDLEN = 1024;
|
const unsigned TTYBUS::MAXWRLEN = 32;
|
const unsigned TTYBUS::MAXWRLEN = 32;
|
|
|
// #define DBGPRINTF printf
|
// #define DBGPRINTF printf
|
#define DBGPRINTF filedump
|
// #define DBGPRINTF filedump
|
#ifndef DBGPRINTF
|
#ifndef DBGPRINTF
|
#define DBGPRINTF null
|
#define DBGPRINTF null
|
#endif
|
#endif
|
|
|
void null(...) {}
|
void null(...) {}
|
|
|
#include <stdarg.h> // replaces the (defunct) varargs.h include file
|
#include <stdarg.h> // replaces the (defunct) varargs.h include file
|
void filedump(const char *fmt, ...) {
|
void filedump(const char *fmt, ...) {
|
static FILE *dbgfp = NULL;
|
static FILE *dbgfp = NULL;
|
va_list args;
|
va_list args;
|
|
|
|
assert(0);
|
|
|
if (!dbgfp)
|
if (!dbgfp)
|
dbgfp = fopen("debug.txt", "w");
|
dbgfp = fopen("debug.txt", "w");
|
va_start(args, fmt);
|
va_start(args, fmt);
|
vfprintf(dbgfp, fmt, args);
|
vfprintf(dbgfp, fmt, args);
|
va_end(args);
|
va_end(args);
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.