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.
31 lines
718 B
31 lines
718 B
/*
|
|
* 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 1024
|
|
#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;
|
|
struct rt_semaphore *sem; // 指向动态分配的信号量
|
|
};
|
|
|
|
// 消息队列(供外部使用)
|
|
extern rt_mq_t proc_mq;
|
|
|
|
int data_comm_init(void);
|
|
|
|
#endif /* APPLICATIONS_DATA_COMM_H_ */
|
|
|