//#include #include "STC15F2K60S2.H" typedef unsigned char uint8; typedef unsigned int uint16; typedef unsigned long uint32; extern uint8 sendCount; extern uint8 receCount; extern uint8 sendPosi; extern int outvalue[4]; extern int ZeroPara[4]; extern int RatePara[4]; extern int maxCurrentValue[4]; extern int LedOn[4]; extern bit needstore; extern bit needstorePC; extern uint8 idata sendBuf[64],receBuf[64]; extern uint8 idata checkoutError; // ==2 extern uint8 idata receTimeOut; extern uint32 dwTickCount; void beginSend(void); void checkComm0Modbus(void); void readCoil(void); void readRegisters(void); void forceSingleCoil(void); void presetSingleRegister(void); void presetMultipleRegisters(void); void forceMultipleCoils(void); uint16 getRegisterVal(uint16 addr,uint16 *tempData); uint16 setRegisterVal(uint8 addr,uint16 tempData[]); uint16 lightControl(uint16 addr,uint16 tempData); uint16 getCoilVal(uint16 addr,uint16 *tempData); uint16 setCoilVal(uint16 addr,uint16 tempData);