12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #include "ohboard.h"
- #include "log.h"
- #include <stdarg.h>
- static char info[512];
- void ologShow(char level, char fa, char * fmt, ...){
- #if 0
- usbOutPut("\r\n", 2);
- #else
- va_list va;
- char buf[10];
- int n;
- va_start(va, fmt);
- n=vsnprintf(info, sizeof(info), fmt, va);
- va_end(va);
- //输出
- memset(buf,0,sizeof(buf));
- switch(level){
- case LINFO:strcpy(buf, "[AP_INFO]");break;
- case LWARN:strcpy(buf, "[AP_WARN]");break;
- case LERR:strcpy(buf, "[AP_ERR]");break;
- default:break;
- }
- usbOutPut(buf,strlen(buf));
- usbOutPut(info, n);
- if(fa) usbOutPut("\r\n", 2);
- #endif
- }
|