You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
505 B

11 months ago
  1. #pragma once
  2. #include <stdint.h>
  3. typedef enum {
  4. kcmd,
  5. kreceipt,
  6. kerror_receipt,
  7. kreport,
  8. } packet_type_t;
  9. typedef enum {
  10. kpriority_emergency_report = 7,
  11. kpriority_cmd = 8,
  12. kpriority_receipt = 9,
  13. kpriority_report = 10,
  14. } priority_t;
  15. typedef struct {
  16. uint8_t frameNumAndFrameId;
  17. uint8_t to;
  18. uint8_t from;
  19. uint8_t pad;
  20. } zcanid_t;
  21. typedef struct {
  22. uint8_t ptype;
  23. uint8_t index;
  24. uint16_t function_id;
  25. uint8_t params[];
  26. } zcanbus_packet_t;