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.

51 lines
788 B

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
  1. #pragma once
  2. #include "stm32f4xx_hal.h"
  3. #include "uart.h"
  4. #include "ticket.h"
  5. #include "zlog.h"
  6. #include "tjc_processer.h"
  7. #include "page_processer.h"
  8. #include "ztask.h"
  9. typedef struct {
  10. uint8_t data[TJC_MAX_PACKRT_SIZE];
  11. uint16_t datalen;
  12. } tjc_packet_t;
  13. typedef enum{
  14. error,
  15. sucess,
  16. ending,
  17. } process_state_t;
  18. typedef void (*FunctionCB)(tjc_event_t*,uint8_t);
  19. typedef struct{
  20. FunctionCB m_cb[50];
  21. int32_t m_ncb;
  22. uint8_t isbelongpage[50];
  23. }frontend_t;
  24. void Front_startSchedule(void);
  25. void Front_initialize(void);
  26. void regOnUsrEventCb(FunctionCB cb, uint8_t page);
  27. void callUsrEventCb(tjc_event_t* event);
  28. void eventProcessTask_init(void);
  29. void eventProcessTask_start(taskfuction cb);
  30. void eventProcessTask(void);
  31. void task_init();