📄 adsputch.c
字号:
/*
**===========================================================================
** putch.c
**---------------------------------------------------------------------------
** Copyright (c) 1998 Epson Research and Development, Inc.
** All Rights Reserved.
**===========================================================================
*/
#include <stdarg.h>
#include "ads-io.h"
#include "hal.h"
/*-------------------------------------------------------------------------*/
int vsiprintf( char *buffer, const char *format, va_list argptr );
/*-------------------------------------------------------------------------*/
static const char Revision[] = "ADSPUTCH.C=$Revision: 3 $";
/*-------------------------------------------------------------------------*/
#ifdef BUSTED_UART
#define MAX_PRINTF_OUTPUT 256
#include <stdarg.h>
int Printf(const char *pszFormat,...)
{
int len;
char szOutput[MAX_PRINTF_OUTPUT];
va_list ArgList;
va_start (ArgList, pszFormat);
vsprintf (szOutput, pszFormat, ArgList);
va_end (ArgList);
len = strlen(szOutput);
Write(1,szOutput,len);
return len;
}
#endif
#if 0
/* this file implements putchar() for
* the Motorola MPC821ADS
* we call routines from ads-io.c, contained in libads.a
*/
/* putch() writes byte to the console port */
void putch(int ch)
{
if (!SMC2InitDone)
SMC2Init();
if (ch == '\n')
SMC2PutChar ('\r');
SMC2PutChar (ch);
}
void putchar(int ch)
{
putch(ch);
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -