uart_pt.h 586 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * @Description:
  3. * @Version: 2.0
  4. * @Author: Seven
  5. * @Date: 2023-06-06 14:17:45
  6. * @LastEditors: Seven
  7. * @LastEditTime: 2023-06-08 09:23:01
  8. */
  9. #ifndef __UART_PT_H
  10. #define __UART_PT_H
  11. #include "gd32f10x.h"
  12. #include "tools.h"
  13. #if 1
  14. #define PT_ON 1
  15. #define PT_OFF 0
  16. #define PT_TIME (10*60*1000)//产测超时时间,连续这么长时间未收到产测指令,关闭产测
  17. typedef struct _PT_TEST_{
  18. uint8_t bTestStart; // 产测开始
  19. timeout_t tt_pt_time;
  20. }PtTest;
  21. extern PtTest g_ptTest;
  22. void uart_cmd_task(uint32_t uartid, char *data, uint16_t len);
  23. void pt_cmd_task(void);
  24. #endif
  25. #endif