URL
https://opencores.org/ocsvn/xulalx25soc/xulalx25soc/trunk
[/] [xulalx25soc/] [trunk/] [sw/] [ttybus.cpp] - Diff between revs 13 and 25
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 13 |
Rev 25 |
Line 73... |
Line 73... |
// #define DBGPRINTF filedump
|
// #define DBGPRINTF filedump
|
|
|
void null(...) {}
|
void null(...) {}
|
#include <stdarg.h>
|
#include <stdarg.h>
|
// #include <varargs.h>
|
// #include <varargs.h>
|
|
#if (DBGPRINTF != null)
|
static void filedump(const char *fmt, ...) {
|
static void filedump(const char *fmt, ...) {
|
static FILE *dbgfp = NULL;
|
static FILE *dbgfp = NULL;
|
va_list args;
|
va_list args;
|
|
|
if (!dbgfp)
|
if (!dbgfp)
|
Line 84... |
Line 85... |
va_start(args, fmt);
|
va_start(args, fmt);
|
vfprintf(dbgfp, fmt, args);
|
vfprintf(dbgfp, fmt, args);
|
va_end(args);
|
va_end(args);
|
fflush(dbgfp);
|
fflush(dbgfp);
|
}
|
}
|
|
#endif
|
|
|
char TTYBUS::charenc(const int sixbitval) {
|
char TTYBUS::charenc(const int sixbitval) {
|
if (sixbitval < 10)
|
if (sixbitval < 10)
|
return '0' + sixbitval;
|
return '0' + sixbitval;
|
else if (sixbitval < 10+26)
|
else if (sixbitval < 10+26)
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.