VOID TraceInfo(CONST INT8* szFormat, ...)
{
INT8 l_strBuff[256U] = {0}; /* The buffer of the string to be printed */
va_list arglist; /* The arguement list of this function */
INT l_len = 0; /* The length of the messge for print*/
va_start(arglist,szFormat);
l_len = vsnprintf (l_strBuff, 255U, szFormat, arglist);
va_end(arglist);
if((l_len > 0) && (l_len <= 250))
{
Diag_Print(l_len, (PUINT8)l_strBuff);
#ifdef DEBUG
if(l_len == 250)
{
(VOID)printf("%s...\n", l_strBuff);
}
else
{
(VOID)printf("%s", l_strBuff);
}
#endif
}
else
{
#ifdef DEBUG
(VOID)printf("Error trace string!\n");
#endif
}
return;
}
{
INT8 l_strBuff[256U] = {0}; /* The buffer of the string to be printed */
va_list arglist; /* The arguement list of this function */
INT l_len = 0; /* The length of the messge for print*/
va_start(arglist,szFormat);
l_len = vsnprintf (l_strBuff, 255U, szFormat, arglist);
va_end(arglist);
if((l_len > 0) && (l_len <= 250))
{
Diag_Print(l_len, (PUINT8)l_strBuff);
#ifdef DEBUG
if(l_len == 250)
{
(VOID)printf("%s...\n", l_strBuff);
}
else
{
(VOID)printf("%s", l_strBuff);
}
#endif
}
else
{
#ifdef DEBUG
(VOID)printf("Error trace string!\n");
#endif
}
return;
}