This commit is contained in:
2026-03-20 21:16:58 +08:00
parent 286ff98b8e
commit 90c3d919df
248 changed files with 94554 additions and 0 deletions

31
user/Utility/user_stdio.c Executable file
View File

@@ -0,0 +1,31 @@
#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
//}