Comunication.h 810 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef __COMUNICATION_H
  2. #define __COMUNICATION_H
  3. #include "stdint.h"
  4. #define WRITETABHEU 0x00
  5. #define READTABHEU 0x10
  6. #define WRITETABVAL 0x20
  7. #define READTABVAL 0x30
  8. #define READVENT 0x40
  9. #define WRITVENT 0x50
  10. #define WRITEVALESS 0x60
  11. #define STOP 0x70
  12. #define ESSAI 0x80
  13. #define SYNCRTC 0x90
  14. #define STATUS 0xA0
  15. #define MASKMES 0XF0
  16. #define MASKID 0x07
  17. #define MASKTYPE 0x08
  18. #define MASKON 0x01
  19. void parse(uint8_t* mes);
  20. void Com_WriteTabHeure(uint8_t* mes);
  21. void Com_ReadTabVal(uint8_t* mes);
  22. void Com_WriteTabVal(uint8_t* mes);
  23. void Com_ReadTabHeure(uint8_t* mes);
  24. void Com_ReadVent(uint8_t* mes);
  25. void Com_WriteVent(uint8_t* mes);
  26. void Com_WriteValEsai(uint8_t* mes);
  27. void Com_STOP(uint8_t* mes);
  28. void Com_ESSAI(uint8_t* mes);
  29. void Com_SyncRTC(uint8_t* mes);
  30. void Com_Status();
  31. #endif