Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #ifndef __INCLUDE_MICOM__
  3. #define __INCLUDE_MICOM__
  4.  
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8.  
  9. #define MSG_BUFFER_SIZE 256
  10.  
  11. struct MPacket {
  12.     BYTE mgr;
  13.     BYTE grp;
  14.     BYTE cmd;
  15.     BYTE len;
  16.     BYTE* data;
  17.     BYTE checkSum;
  18.  
  19.     BYTE* rData;
  20.     int rLen;
  21. };
  22.  
  23. typedef int (* CBReadMicom)(MPacket* packet);
  24. typedef int (* CBWriteMicom)(MPacket* packet);
  25.  
  26. HANDLE WINAPI GetMicomHandle();
  27. int WINAPI SetCallBackRead(CBReadMicom cbReadMicom);
  28. int WINAPI SetCallBackWrite(CBWriteMicom cbWriteMicom);
  29.  
  30. DWORD WINAPI SendCommandEx(BYTE mgr, BYTE cmd, BYTE len, BYTE* buffer);
  31. DWORD WINAPI SendReadCmd(BYTE mgr, DWORD addr, BYTE len);
  32. DWORD WINAPI SendWriteCmd(BYTE mgr, DWORD addr, BYTE len, BYTE* buffer);
  33.  
  34. #ifdef __cplusplus
  35. }
  36. #endif
  37.  
  38. #endif//__INCLUDE_MICOM__
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement