From 95322c84888cbe2e92024d4d65698f59b016cb52 Mon Sep 17 00:00:00 2001
From: QuakeGod <quakegod@sina.com>
Date: 星期日, 25 二月 2024 12:29:35 +0800
Subject: [PATCH] move some define from Kbus.h to KBusDefine.h

---
 ComLib/Src/KLink.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ComLib/Src/KLink.c b/ComLib/Src/KLink.c
index 635c24d..374885e 100644
--- a/ComLib/Src/KLink.c
+++ b/ComLib/Src/KLink.c
@@ -9,7 +9,9 @@
 #include "string.h"
 #include "PLCFunctions.h"
 #include "stm32f0xx_hal.h"
+#ifdef KWLESS
 #include "KWireless.h"
+#endif
 //extern stWLRunStat KwRunStat;
 
 unsigned char KLPacketBuf1[256];
@@ -215,7 +217,9 @@
 				else if (nDataType == KLDataTypeTest)	{		pData=KMem.SDT+nWordAddr;	}
 				else if (nDataType == KLDataTypeWDT)	{		pData=KMem.WDT+nWordAddr;	}
 				else if (nDataType == KLDataTypeKBD)	{		pData=(unsigned short *)&KBusChnStats  +nWordAddr;	}
+#ifdef KWLESS
 				else if (nDataType == KLDataTypeKWLD)	{		pData=(unsigned short *)&KwRunStat  +nWordAddr;	}
+#endif
 				else if (nDataType == KLDataSysCfg) { pData = (unsigned short *)&storedKMSysCfg.theKMSysCfg + nWordAddr;}
 				else if (nDataType == KLDataTypeFlash) { pData = (unsigned short *)FLASH_BASE + nWordAddr;}
 				else				{					pData=KLBufferOut+nWordAddr;				}
@@ -246,7 +250,9 @@
 				else if (nDataType == KLDataTypeTest)	{		pData=KMem.SDT+nWordAddr;	DataLen=0;}
 				else if (nDataType == KLDataTypeWDT)	{		pData=KMem.WDT+nWordAddr;	DataLen=0;}
 				else if (nDataType == KLDataTypeKBD)	{		pData=(unsigned short *)KBusChnStats +nWordAddr;	DataLen=0;}
+#ifdef KWLESS				
 				else if (nDataType == KLDataTypeKWLD)	{		pData=(unsigned short *)&KwRunStat  +nWordAddr;	}
+#endif
 				else if (nDataType == KLDataSysCfg)		{ pData = (unsigned short *)&(storedKMSysCfg) + nWordAddr;}
 				else if (nDataType == KLDataTypeFlash) { pData = (unsigned short *)FLASH_BASE + nWordAddr;}
 				else				{					pData=KLBufferOut+nWordAddr;	DataLen=0;			}

--
Gitblit v1.9.1