Serial.h 603 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Serial.h
  3. *
  4. * Copyright (C)
  5. * Honda Research Institute Europe GmbH
  6. * Carl-Legien-Str. 30
  7. * 63073 Offenbach/Main
  8. * Germany
  9. *
  10. * UNPUBLISHED PROPRIETARY MATERIAL.
  11. * ALL RIGHTS RESERVED.
  12. *
  13. */
  14. #pragma once
  15. #include <stdbool.h>
  16. #include <stdint.h>
  17. #include <windows.h>
  18. typedef struct Serial
  19. {
  20. bool valid;
  21. char* port;
  22. HANDLE hComm;
  23. bool serialStatus;
  24. } Serial;
  25. Serial* Serial_new();
  26. void Serial_init(Serial* self, char* port);
  27. void Serial_clear(Serial* self);
  28. void Serial_delete(Serial* self);
  29. void Serial_sendMessage(Serial* self, unsigned char* message, int size);