Files
CHJ/user/Utility/user_stdio.c

32 lines
831 B
C
Raw Normal View History

2026-03-20 21:16:58 +08:00
#include "../main/SystemInclude.h"
//#include "icclbutl.h"
//#include "user_stdio.h"
u16 TXDMode;
//void put_one_char(char c, void *dummy)
//{
// if(TXDMode == ENABLE_TXD_USE_DMA) RxdData[TX_Length++] = c;
// else putc (c);
// (void)dummy; /* Warning on this line OK (Optimized Away) */
//}
int putchar(int ch)
{
if(TXDMode == ENABLE_TXD_USE_DMA) RxdData[TX_Length++] = ch;
else putc (ch);
return (ch);
}
//int printf(const char *format, ...)
//{
// va_list ap;
// int nr_of_chars;
//
// va_start(ap, format); // Variable argument begin
// nr_of_chars = _formatted_write(format, put_one_char, (void *) 0, ap);
// va_end(ap); // Variable argument end
//
// return nr_of_chars; // According to ANSI
//}