--- libaitpelco/inc/aitpelco.h 2010/03/12 14:57:17 1.1.1.1.2.2 +++ libaitpelco/inc/aitpelco.h 2010/03/12 15:30:46 1.1.1.1.2.3 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitpelco.h,v 1.1.1.1.2.2 2010/03/12 14:57:17 misho Exp $ +* $Id: aitpelco.h,v 1.1.1.1.2.3 2010/03/12 15:30:46 misho Exp $ * *************************************************************************/ #ifndef __AITPELCO_H @@ -155,6 +155,14 @@ inline u_char pelcoAddCmdData(void * __restrict p, u_c * return: 'd' - PelcoD, 'p' - PelcoP, 0 - unknown or bad packet */ inline u_char pelcoGetCmdData(void * __restrict p, u_char * __restrict cmd, u_char * __restrict data); + +/* + * pelcoChkSum() Check ot Correct check sum in packet + * @p = Input Packet structure + * @correct = Calculate new check sum if incorrect !=0, if ==0 only check + * return: 0xFF - bad packet, invalid check sum, 0 check sum is correct. + */ +inline u_char pelcoChkSum(void * __restrict p, u_char correct); /*