From 005755edcdc332315ba077598d4746ac195b069e Mon Sep 17 00:00:00 2001 From: QuakeGod <QuakeGod@sina.com> Date: 星期一, 14 十月 2024 11:45:56 +0800 Subject: [PATCH] increase KPLC KBus from 2 client to 16 clients --- ComLib/Inc/functions.h | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/ComLib/Inc/functions.h b/ComLib/Inc/functions.h index 53ee653..aaf82bc 100644 --- a/ComLib/Inc/functions.h +++ b/ComLib/Inc/functions.h @@ -23,6 +23,21 @@ //extern volatile unsigned int TotalRunTime; //extern volatile unsigned int PwrCount; //寮�鏈烘鏁� +extern unsigned char SPI1RecvBuf[64]; +extern unsigned char SPI1SendBuf[64]; + +extern volatile unsigned char bSPI1Recving; +extern volatile unsigned char bSPI1RecvDone; + +extern volatile unsigned char nSPI1RecvPos; +extern volatile unsigned char nSPI1RecvLenInBuf; + +extern volatile unsigned char nSPI1ToSendLen; +extern volatile unsigned char nSPI1SentLen; + +extern volatile unsigned char bSPI1Sending; +extern volatile unsigned char bSPI1SendDone; + typedef unsigned char uint8_t; typedef unsigned char uchar; typedef unsigned short uint16_t; @@ -47,12 +62,15 @@ void TriggerPendSV(void); void PendSvCallBack(void); void SPI1_IRQ_CallBack(void); - +void DelayUs(int nUs); +void Delay100nS(int n100nS); void Uart1SendDone(void); void Uart1RecvDone(void); void Uart2SendDone(void); void Uart2RecvDone(void); int PutStr(char * str1, int len1); +int PutStr1(char * str1, int len1); +int PutStr2(char * str1, int len1); int SendPacket(int nChn, void * pBuf,int len1); //int SendPacket1(void * pBuf,int len1); //int SendPacket2(pKBPacket p1,int len1); @@ -78,4 +96,6 @@ void displayInput(unsigned int cc); void PutOutputSPI1(unsigned int Y); +uint16_t SPI_Flash_ReadID(void); + #endif /* __MYFUNCTIONS_H__ */ -- Gitblit v1.9.1