rpi-open-firmware/lib/xprintf.h
2016-05-16 03:01:46 +01:00

37 lines
1.1 KiB
C
Executable File

/*------------------------------------------------------------------------*/
/* Universal string handler for user console interface (C)ChaN, 2011 */
/*------------------------------------------------------------------------*/
#ifdef __arm__
#include <stdarg.h>
#else
#include "stdarg.h"
#endif
#ifndef _STRFUNC
#define _STRFUNC
#define _USE_XFUNC_OUT 1 /* 1: Use output functions */
#define _CR_CRLF 1 /* 1: Convert \n ==> \r\n in the output char */
void xputc (char c);
void xputs (const char* str);
void xfputs (void (*func)(unsigned char), const char* str);
void xprintf (const char* fmt, ...) __attribute__ ((format (printf, 1, 2)));
void xsprintf (char* buff, const char* fmt, ...);
void xfprintf (void (*func)(unsigned char), const char* fmt, ...);
void put_dump (const void* buff, unsigned long addr, int len, int width);
void xvprintf (
const char* fmt, /* Pointer to the format string */
va_list arp /* Pointer to arguments */
);
#define DW_CHAR sizeof(char)
#define DW_SHORT sizeof(short)
#define DW_LONG sizeof(long)
#endif