OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sw/] [lib/] [include/] [printf.h] - Blame information for rev 655

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 349 julius
#ifndef _PRINTF_H_
2
#define _PRINTF_H_
3
 
4 485 julius
int sprintf(char* str, const char *fmt, ...);
5
 
6 349 julius
#define PRINTFBUFFER_SIZE 512
7
extern char PRINTFBUFFER[PRINTFBUFFER_SIZE]; // Declare a global printf buffer
8
//int vfnprintf ( char *stream, size_t n, const char *format, va_list arg);
9
 
10
 
11
int printf_to_uart(const char *fmt, ...);
12
int printf_to_sim(const char *fmt, ...);
13
 
14
int putchar_to_uart(int c);
15
int putchar_to_sim(int c);
16
 
17
int puts_to_uart(const char *str);
18
int puts_to_sim(const char *str);
19
 
20
// for now...
21
 
22
#ifdef _UART_H_
23
#define printf printf_to_uart
24
#define putchar putchar_to_uart
25
#define puts puts_to_uart
26
#else
27
#define printf printf_to_sim
28
#define putchar putchar_to_sim
29
#define puts puts_to_sim
30
#endif
31
 
32
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.