int testhandle = -1;
void cui_frm_debug( char* fmt, ...)
{
#if !defined(WIN32)
#if defined(MT6236)
va_list ap;
U32 Written;
int len;
static char MyPrintfBuff[8092];
va_start(ap, fmt);
len = _vsnprintf(MyPrintfBuff, 8092, fmt, ap);
va_end(ap);
if(testhandle <0)
{
testhandle = FS_Open(L"E:\\test.txt",0x00020000L);
FS_Write(testhandle,MyPrintfBuff,strlen(MyPrintfBuff),&Written);
}
else
{
FS_Write(testhandle,MyPrintfBuff,strlen(MyPrintfBuff),&Written);
}
kal_prompt_trace(MOD_BT, fmt);
return;
#else
va_list ap;
int len;
static char MyPrintfBuff[8092];
va_start(ap, fmt);
len = _vsnprintf(MyPrintfBuff, 8092, fmt, ap);
va_end(ap);
PutUARTBytes(0, MyPrintfBuff, len);
PutUARTBytes(0, "\r\n\r\n", 4);
#endif
#else
printf(fmt);
#endif
}