| | |
| | | #include "string.h" |
| | | #include "PLCFunctions.h" |
| | | #include "stm32f0xx_hal.h" |
| | | #ifdef KWLESS |
| | | #include "KWireless.h" |
| | | #endif |
| | | //extern stWLRunStat KwRunStat; |
| | | |
| | | unsigned char KLPacketBuf1[256]; |
| | | unsigned char KLPacketBuf2[256]; |
| | |
| | | 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; } |
| | | // else if (nDataType == KLDataTypeKWLD) { pData=(unsigned short *)&KwRunStat +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; } |
| | |
| | | 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;} |
| | | // else if (nDataType == KLDataTypeKWLD) { pData=(unsigned short *)&KwRunStat +nWordAddr; } |
| | | #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; } |