From 757fac6cd7102239f41f23998039431e0ca3c5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=9F=B3=E5=A4=B4X2?= Date: Sat, 25 Feb 2017 14:31:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=87=BD=E6=95=B0=E6=8C=87?= =?UTF-8?q?=E9=92=88=E6=A0=BC=E5=BC=8F=E5=8C=96%p?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Button_GrayLevel.cpp | 2 +- BootConfig.cpp | 4 ++-- Drivers/AT45DB.cpp | 2 +- Drivers/SHT30.cpp | 2 +- Net/DNS.cpp | 4 ++-- Platform/CortexM/Runtime.cpp | 2 +- Platform/CortexM/Sys.cpp | 4 ++-- Test/AT45DBTest.cpp | 2 +- TokenNet/DevicesManagement.cpp | 4 ++-- TokenNet/TokenController.cpp | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/App/Button_GrayLevel.cpp b/App/Button_GrayLevel.cpp index bcba3f3a..591d53a4 100644 --- a/App/Button_GrayLevel.cpp +++ b/App/Button_GrayLevel.cpp @@ -186,7 +186,7 @@ void Close2Task(void * param) else { bt->delaytime = 0; - debug_printf("延时关闭已完成 删除任务 0x%08X\r\n", bt->_task2); + debug_printf("延时关闭已完成 删除任务 %p\r\n", bt->_task2); Sys.RemoveTask(bt->_task2); bt->_task2 = 0; bt->SetValue(false); diff --git a/BootConfig.cpp b/BootConfig.cpp index fcae3812..23190af0 100644 --- a/BootConfig.cpp +++ b/BootConfig.cpp @@ -51,8 +51,8 @@ BootConfig * BootConfig::Create() void BootConfig::Show() const { debug_printf("BootConfig HasApp %d NeedUpData %d SearchPinCfg %d\r\n", Stat.HasApp, Stat.NeedUpDate, Stat.SearchPinCfg); - debug_printf("WorkAddr 0x%08X Length 0x%08X Depositary 0x%08X Checksum 0x%08X\r\n", App.WorkAddr, App.Length, App.Directory, App.Checksum); - debug_printf("UpdateAddr 0x%08X Length 0x%08X Depositary 0x%08X Checksum 0x%08X\r\n", Update.WorkAddr, Update.Length, Update.Directory, Update.Checksum); + debug_printf("WorkAddr %p Length %p Depositary %p Checksum %p\r\n", App.WorkAddr, App.Length, App.Directory, App.Checksum); + debug_printf("UpdateAddr %p Length %p Depositary %p Checksum %p\r\n", Update.WorkAddr, Update.Length, Update.Directory, Update.Checksum); debug_printf("PinConfig\r\n"); if (AllPin.IsEff) diff --git a/Drivers/AT45DB.cpp b/Drivers/AT45DB.cpp index e9a0b6bc..34b95120 100644 --- a/Drivers/AT45DB.cpp +++ b/Drivers/AT45DB.cpp @@ -32,7 +32,7 @@ AT45DB::AT45DB(Spi* spi) else { PageSize = 256; - debug_printf("AT45DB Not Support 0x%08X\r\n", ID); + debug_printf("AT45DB Not Support %p\r\n", ID); } } diff --git a/Drivers/SHT30.cpp b/Drivers/SHT30.cpp index 0058c542..48bb9db6 100644 --- a/Drivers/SHT30.cpp +++ b/Drivers/SHT30.cpp @@ -270,7 +270,7 @@ bool SHT30::CheckStatus() if(st != 0) { uint sn = ReadSerialNumber(); - debug_printf("SNum=0x%08X Status=0x%04X \r\n", sn, st); + debug_printf("SNum=%p Status=0x%04X \r\n", sn, st); debug_printf("Status=0x%04X \r\n", st); //if(rs.bit.ResetDetected) debug_printf(" RstDet"); // ResetDetected //if(rs.bit.HeaterStatus) debug_printf(" HatSta"); // HeaterStatus diff --git a/Net/DNS.cpp b/Net/DNS.cpp index 6a9f672a..d22f33ac 100644 --- a/Net/DNS.cpp +++ b/Net/DNS.cpp @@ -422,7 +422,7 @@ void DNS::Process(Buffer& bs, const IPEndPoint& server) // 只要来自服务器的 if(server.Address != _Socket->Remote.Address) return; - //net_printf("DNS::Process [%d] = 0x%08X [%d] = 0x%08X \r\n", bs.Length(), bs.GetBuffer(), _Buffer->Length(), _Buffer->GetBuffer()); + //net_printf("DNS::Process [%d] = %p [%d] = %p \r\n", bs.Length(), bs.GetBuffer(), _Buffer->Length(), _Buffer->GetBuffer()); //bs.Show(true); if(_Buffer) *_Buffer = bs; @@ -433,7 +433,7 @@ void DNS::Process(Buffer& bs, const IPEndPoint& server) server.Show(true); #endif } - //net_printf("DNS::Process [%d] = 0x%08X \r\n", _Buffer->Length(), _Buffer->GetBuffer()); + //net_printf("DNS::Process [%d] = %p \r\n", _Buffer->Length(), _Buffer->GetBuffer()); //_Buffer->Show(true); } diff --git a/Platform/CortexM/Runtime.cpp b/Platform/CortexM/Runtime.cpp index 4baa05dc..df743493 100644 --- a/Platform/CortexM/Runtime.cpp +++ b/Platform/CortexM/Runtime.cpp @@ -29,7 +29,7 @@ extern "C" { static Heap g_Heap(heap, stack - heap); _Heap = &g_Heap; - mem_printf("Heap::Init(0x%08X, %d)\r\n", heap, stack - heap); + mem_printf("Heap::Init(%p, %d)\r\n", heap, stack - heap); } #if MEM_DEBUG diff --git a/Platform/CortexM/Sys.cpp b/Platform/CortexM/Sys.cpp index d892cac4..26ca68d1 100644 --- a/Platform/CortexM/Sys.cpp +++ b/Platform/CortexM/Sys.cpp @@ -270,7 +270,7 @@ void TSys::OnShowInfo() const //debug_printf("\r\n"); debug_printf("DevID:0x%04X RevID:0x%04X \r\n", DevID, RevID); - debug_printf("CPUID:0x%08X", CPUID); + debug_printf("CPUID:%p", CPUID); if(cpu->Implementer == 0x41) debug_printf(" ARM:"); if(cpu->Constant == 0x0C) debug_printf(" ARMv6-M"); @@ -296,7 +296,7 @@ void TSys::OnShowInfo() const size = end - start; debug_printf("Stack:(0x%08x, 0x%08x) = 0x%x (%dk)\r\n", start, end, size, size >> 10); - if(IsGD) debug_printf("ChipType:0x%08X %s\r\n", *(uint*)0x40022100, (cstring)0x40022100); + if(IsGD) debug_printf("ChipType:%p %s\r\n", *(uint*)0x40022100, (cstring)0x40022100); #endif } diff --git a/Test/AT45DBTest.cpp b/Test/AT45DBTest.cpp index 8323c2c6..c5c1879d 100644 --- a/Test/AT45DBTest.cpp +++ b/Test/AT45DBTest.cpp @@ -8,7 +8,7 @@ void TestAT45DB() Spi spi(Spi2, 9000000, true); _spi = &spi; AT45DB sf(&spi); - debug_printf("AT45DB ID=0x%08X PageSize=%d\r\n", sf.ID, sf.PageSize); + debug_printf("AT45DB ID=%p PageSize=%d\r\n", sf.ID, sf.PageSize); int size = ArrayLength(Tx_Buffer); debug_printf("DataSize=%d\r\n", size); diff --git a/TokenNet/DevicesManagement.cpp b/TokenNet/DevicesManagement.cpp index b22c925b..da47369e 100644 --- a/TokenNet/DevicesManagement.cpp +++ b/TokenNet/DevicesManagement.cpp @@ -170,7 +170,7 @@ int DevicesManagement::LoadDev() debug_printf("\r\n"); } - debug_printf("Load %d Dev from 0x%08X\r\n", i, cfg.Address); + debug_printf("Load %d Dev from %p\r\n", i, cfg.Address); byte len = DevArr.Count(); debug_printf("Devices has %d Devs,LocalId :0x%02X\r\n", len,LocalId); @@ -215,7 +215,7 @@ void DevicesManagement::ClearDev() Flash flash; auto cfg = GetStore(flash); - debug_printf("DevicesManagement::ClearDevices Clear List 0x%08X \r\n", cfg.Address); + debug_printf("DevicesManagement::ClearDevices Clear List %p \r\n", cfg.Address); DevArr.DeleteAll().Clear(); diff --git a/TokenNet/TokenController.cpp b/TokenNet/TokenController.cpp index cf8063e1..041d7bb7 100644 --- a/TokenNet/TokenController.cpp +++ b/TokenNet/TokenController.cpp @@ -577,7 +577,7 @@ String& TokenStat::ToStr(String& str) const { TS("TokenStat::ToStr"); - /*debug_printf("this=0x%08X _Last=0x%08X _Total=0x%08X ", this, _Last, _Total); + /*debug_printf("this=%p _Last=%p _Total=%p ", this, _Last, _Total); Percent().Show(true);*/ if (SendRequest > 0) {