39 lines
849 B
C
39 lines
849 B
C
/*
|
|
* mutex.h
|
|
*
|
|
* Created on: 2024年5月18日
|
|
* Author: 34509
|
|
*/
|
|
|
|
#ifndef SOFTWARE_THREAD_COMMUNICATION_MUTEX_H_
|
|
#define SOFTWARE_THREAD_COMMUNICATION_MUTEX_H_
|
|
|
|
#include "rtthread.h"
|
|
#include "uart_dev.h"
|
|
|
|
/* UartSend队列的格式 */
|
|
#define UART_MQ_SEND_LENGTH 20
|
|
typedef struct _SL_UartSend_pack{
|
|
device_handle device; /* 串口 */
|
|
rt_uint8_t direction; /* 方向 */
|
|
rt_uint8_t len; /* 长度 */
|
|
rt_uint8_t recv_Data[UART_MQ_SEND_LENGTH]; /* 其他部分 */
|
|
}SL_UartSend_pack;
|
|
|
|
typedef enum{
|
|
up = 0, /* 往智能模块传传输数据 */
|
|
down = 1, /* 向下往传感器传输数据 */
|
|
}UartSend_pack_direction;
|
|
|
|
extern SL_UartSend_pack MqUartSend_pack;
|
|
extern rt_mq_t mqSend;
|
|
|
|
|
|
rt_uint8_t Send_mq_Init(void);
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* SOFTWARE_THREAD_COMMUNICATION_MUTEX_H_ */
|