|
@@ -198,12 +198,7 @@ led_pin_config_t gLedCfg[LED_INX_MAX]={{LED_PORT_0,LED_GPIO_PIN_1,LED_PAD_INDEX1
|
|
|
{LED_PORT_0,LED_GPIO_PIN_4,LED_PAD_INDEX4, PAD_MuxAlt0},\
|
|
|
{LED_PORT_1,LED_GPIO_PIN_5,LED_PAD_INDEX5, PAD_MuxAlt0}};
|
|
|
|
|
|
-#ifdef BL_FILE_LOG
|
|
|
-#include <stdarg.h>
|
|
|
-static UINT8 blLogFileNux=0;
|
|
|
-
|
|
|
-//UTCת»»Îª±±¾©Ê±¼ä º¯Êý¿ÉÖ±½Óµ÷ÓÃ
|
|
|
-static void UTCToBeijing(unsigned char * bjttbuf,unsigned int UTCyear,unsigned char UTCmonth,unsigned char UTCday,unsigned int UTChour,unsigned char UTCminute,unsigned char UTCsecond)
|
|
|
+void UTCToBeijing(UTC8TimeType* UTC8Time,unsigned int UTCyear,unsigned char UTCmonth,unsigned char UTCday,unsigned int UTChour,unsigned char UTCminute,unsigned char UTCsecond)
|
|
|
{
|
|
|
int year=0,month=0,day=0,hour=0;
|
|
|
int lastday = 0;// ÔµÄ×îºóÒ»ÌìÈÕÆÚ
|
|
@@ -258,10 +253,20 @@ static void UTCToBeijing(unsigned char * bjttbuf,unsigned int UTCyear,unsigned c
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- sprintf((char *)bjttbuf,"%04d-%02d-%02d %02d:%02d:%02d ",
|
|
|
- year,month,day,hour,UTCminute,UTCsecond); //UTCÈÕÆÚʱ·ÖÃëת»»³É±±¾©Ê±¼ä
|
|
|
+ UTC8Time->year = year;
|
|
|
+ UTC8Time->month = month;
|
|
|
+ UTC8Time->day = day;
|
|
|
+ UTC8Time->hour = hour;
|
|
|
+ UTC8Time->minute = UTCminute;
|
|
|
+ UTC8Time->second = UTCsecond;
|
|
|
}
|
|
|
|
|
|
+#ifdef BL_FILE_LOG
|
|
|
+#include <stdarg.h>
|
|
|
+static UINT8 blLogFileNux=0;
|
|
|
+
|
|
|
+//UTCת»»Îª±±¾©Ê±¼ä º¯Êý¿ÉÖ±½Óµ÷ÓÃ
|
|
|
+
|
|
|
static void bluejoy_write_logfile(UINT8 * buf)
|
|
|
{
|
|
|
int32_t err;
|
|
@@ -371,7 +376,9 @@ void bluejoy_printf(BlLogLevel level, const UINT8 *format, ...)
|
|
|
minite=(timeUtc.UTCtimer2&0xff0000)>>16;
|
|
|
sec=(timeUtc.UTCtimer2&0xff00)>>8;
|
|
|
memset(buf,0,128+1);
|
|
|
- UTCToBeijing(buf,year,month,day,hour,minite,sec);
|
|
|
+ UTC8TimeType UTC8TimeStruct;
|
|
|
+ UTCToBeijing(UTC8TimeStruct,year,month,day,hour,minite,sec);
|
|
|
+ sprintf((char *)buf,"%04d-%02d-%02d %02d:%02d:%02d ",UTC8TimeStruct.year,UTC8TimeStruct.month,UTC8TimeStruct.day,UTC8TimeStruct.hour,UTC8TimeStruct.minute,UTC8TimeStruct.second);
|
|
|
va_start(args, format);
|
|
|
vsnprintf(buf+strlen(buf), 128-strlen(buf), format, args);
|
|
|
va_end(args);
|