uhf_data.h 614 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include <stdint.h>
  3. #include <stdlib.h>
  4. #define MAX_DATA_SIZE 32
  5. typedef struct UHFData {
  6. uint8_t data[MAX_DATA_SIZE];
  7. size_t length;
  8. bool data_full;
  9. struct UHFData* next;
  10. } UHFData;
  11. typedef struct UHFResponseData {
  12. UHFData* data;
  13. size_t size;
  14. } UHFResponseData;
  15. UHFData* uhf_data_alloc();
  16. int uhf_data_append(UHFData* uhf_data, uint8_t data);
  17. void uhf_data_free(UHFData* uhf_data);
  18. UHFResponseData* uhf_response_data_alloc();
  19. UHFData* add_uhf_data_to_uhf_response_data(UHFResponseData* uhf_response_data);
  20. void uhf_response_data_free(UHFResponseData* uhf_response_data);