URL
https://opencores.org/ocsvn/amber/amber/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 78 |
Rev 81 |
Line 41... |
Line 41... |
// //
|
// //
|
----------------------------------------------------------------*/
|
----------------------------------------------------------------*/
|
#include "amber_registers.h"
|
#include "amber_registers.h"
|
|
|
|
|
|
#define DEBUG 1
|
|
|
|
#ifdef DEBUG
|
|
#define trace(fmt, args...) print_serial("%s:%s:%d: "fmt"\n\r", __FILE__, __FUNCTION__, __LINE__, args)
|
|
#else
|
|
#define trace(fmt, args...)
|
|
#endif
|
|
|
|
|
|
|
void init_serial()
|
void init_serial()
|
{
|
{
|
/* Enable UART 0 */
|
/* Enable UART 0 */
|
*(unsigned int *) ADR_AMBER_UART0_LCRH = 0x10;
|
*(unsigned int *) ADR_AMBER_UART0_LCRH = 0x10;
|
}
|
}
|
|
|
|
|
|
|
/* Add a line to the line buffer */
|
/* Add a line to the line buffer */
|
void print_serial(const char *fmt, ...)
|
void print_serial(const char *fmt, ...)
|
{
|
{
|
int len;
|
int len;
|
register unsigned long *varg = (unsigned long *)(&fmt);
|
register unsigned long *varg = (unsigned long *)(&fmt);
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.