Common.h 845 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef __COMMON_H_
  2. #define __COMMON_H_
  3. typedef struct SUTDL
  4. {
  5. union {
  6. struct { unsigned char b1,b2,b3,b4; }ucData;
  7. unsigned long ulData;
  8. }Data;
  9. }SUTDL;
  10. typedef struct SUTDS
  11. {
  12. union {
  13. struct { unsigned char b1,b2; }ucData;
  14. unsigned short usData;
  15. }Data;
  16. }SUTDS;
  17. int ModemStrCmp(char *msg,char *str);
  18. unsigned char AsciiHexStringToHexBytes(char *src, unsigned char *des);
  19. int GetParaFromStr(char *Str,char *Para,char *Value);
  20. void AscStrToHexStr(char *AscStr, char *HexStr);
  21. void StrAsciiToHex(char *src, unsigned char *des);
  22. void MakeStrEndByNewLine(char *str);
  23. void ReplaceStrWithN(char *str);
  24. short FindTargetIndex(char *source, char sourceEndIndicator, char *target, unsigned char targetLen,unsigned char witchOne);
  25. void AscStrTurnHexStr(char *AscStr, char *HexStr);
  26. short getSegMent(char *msg,unsigned char whichOne);
  27. #endif