mon.h 914 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-06-29 19813 the first version
  9. */
  10. #ifndef APPLICATIONS_MON_MON_H_
  11. #define APPLICATIONS_MON_MON_H_
  12. #include "main.h"
  13. #define MAX_MON_CACHE_BUF_SIZE 60
  14. #define MAX_TXT_ROW 12
  15. void sendbuf_to_hmi(char * buf ,uint8_t lenght);
  16. uint8_t monitor_data_process(uint8_t datas_size, uint8_t *data_buf);
  17. uint8_t CRC_Check(uint8_t datas_size, uint8_t *data_buf);
  18. typedef struct QNode{
  19. uint8_t data_lenght;
  20. uint8_t data[MAX_MON_CACHE_BUF_SIZE];
  21. struct QNode * last;
  22. struct QNode * next;
  23. }QNode;
  24. QNode *initQueue();
  25. uint8_t Queue_in(QNode *qnode, char *buf ,uint8_t data_l);
  26. uint8_t Queue_out(QNode *qnode, char *buf);
  27. uint8_t get_queue_len(QNode *qnode);
  28. void delete_queue(QNode *qnode);
  29. #endif /* APPLICATIONS_MON_MON_H_ */