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.
|
|
/*
* @Author: sunlight 2524828700@qq.com * @Date: 2024-09-13 11:35:08 * @LastEditors: sunlight 2524828700@qq.com * @LastEditTime: 2024-09-23 16:14:59 * @FilePath: \auxiliary_addition\Usr\service\Processer\tjc_screen_process.c * @Description: ����Ĭ������,������`customMade`, ����koroFileHeader�鿴���� ��������: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
#include "tjc_screen_process.h"
#include <string.h>
#include <stdbool.h>
#include <stdio.h>
#include "tjc_screen_event.h"
#include "tjc_screen_page.h"
#include "tjc_screen_receive.h"
#include "usart.h"
static packet_t packet;
/***********************************************************************************************************************
* ҳ�洦������ * ***********************************************************************************************************************/
void tjc_process_init(void) { printf("Init\n"); tjc_receive_init(&huart2); regCallBack(tjc_process_page); }
/*
* * @brief ���ݰ����� * */ void tjc_analysis_packet(uint8_t* packet, uint16_t len) { uint8_t packetType = packet[0]; if (!(packet[len - 3] == 0xff && packet[len - 2] == 0xff && packet[len - 1] == 0xff)) { printf("packet end error\n"); return; }
// �¼�����
event_process(packet); }
/*
* * @brief ������ * */ void tjc_processe(void) { tjc_date_pack(&packet);
if (packet.len != 0) { tjc_analysis_packet(packet.date, packet.len); packet.len = 0; } }
|