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.
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*
|
|
|
|
|
* Change Logs:
|
|
|
|
|
* Date Author Notes
|
|
|
|
|
* 2025-10-20 Administrator the first version
|
|
|
|
|
*/
|
|
|
|
|
#ifndef APPLICATIONS_DATA_COMM_H_
|
|
|
|
|
#define APPLICATIONS_DATA_COMM_H_
|
|
|
|
|
|
|
|
|
|
// 最大输入/输出长度
|
|
|
|
|
#define MAX_INPUT_LEN 512
|
|
|
|
|
#define MAX_OUTPUT_LEN 1024*3
|
|
|
|
|
|
|
|
|
|
// 请求结构体
|
|
|
|
|
struct proc_request {
|
|
|
|
|
char input[MAX_INPUT_LEN];
|
|
|
|
|
int input_len;
|
|
|
|
|
char output[MAX_OUTPUT_LEN];
|
|
|
|
|
int output_len;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 双消息队列声明
|
|
|
|
|
extern struct rt_messagequeue *request_mq; // UART → Proc
|
|
|
|
|
extern struct rt_messagequeue *response_mq; // Proc → UART
|
|
|
|
|
|
|
|
|
|
int data_comm_init(void);
|
|
|
|
|
|
|
|
|
|
#endif /* APPLICATIONS_DATA_COMM_H_ */
|