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
51 lines
788 B
#pragma once
|
|
|
|
#include "stm32f4xx_hal.h"
|
|
#include "uart.h"
|
|
#include "ticket.h"
|
|
#include "zlog.h"
|
|
#include "tjc_processer.h"
|
|
#include "page_processer.h"
|
|
#include "ztask.h"
|
|
|
|
|
|
|
|
typedef struct {
|
|
uint8_t data[TJC_MAX_PACKRT_SIZE];
|
|
uint16_t datalen;
|
|
} tjc_packet_t;
|
|
|
|
typedef enum{
|
|
error,
|
|
sucess,
|
|
ending,
|
|
} process_state_t;
|
|
|
|
typedef void (*FunctionCB)(tjc_event_t*,uint8_t);
|
|
|
|
|
|
typedef struct{
|
|
|
|
FunctionCB m_cb[50];
|
|
int32_t m_ncb;
|
|
uint8_t isbelongpage[50];
|
|
|
|
}frontend_t;
|
|
|
|
void Front_startSchedule(void);
|
|
void Front_initialize(void);
|
|
|
|
|
|
void regOnUsrEventCb(FunctionCB cb, uint8_t page);
|
|
void callUsrEventCb(tjc_event_t* event);
|
|
|
|
|
|
|
|
|
|
void eventProcessTask_init(void);
|
|
void eventProcessTask_start(taskfuction cb);
|
|
void eventProcessTask(void);
|
|
|
|
|
|
|
|
void task_init();
|