#ifndef BUFFER_H #define BUFFER_H #include #include "ring_buffer.h" #include extern ring_buffer *rb_usart1,*rb_usart2,*rb_usart3,*rb_uart4,*rb_uart5; extern uint8_t usart1_send_data[64]; extern uint8_t usart2_send_data[256]; extern uint8_t usart3_send_data[64]; extern uint8_t uart4_send_data[256]; extern uint8_t flag_uart1_send; extern uint8_t flag_uart2_send; extern uint8_t flag_uart3_send; extern uint8_t flag_uart4_send; extern ring_buffer *SendWeightQueue,*XbeeQueue,*XbeeAPIQueue,*RemoteQueue; extern ring_buffer *RecWeightQueue; extern unsigned char Rec_watchTag_point; //接收标签 extern unsigned char ReadTag_state; //读标签状态 0 没读或已读成功,1 开始读 ,2 正在读 extern unsigned char WriteTag_state; //写标签状态 0 没写或已写成功,1 开始写 ,2 正在写 extern void WriteTag(void); extern void ReadTag(unsigned char x); extern uint8_t XbeeConst_CenterAddress[8]; //开始地址 0xFF extern uint8_t XbeeConst_CCAddress[8]; //开始地址 0xFF extern uint8_t XbeeConst_RemoteAddress; extern unsigned char ccsend; extern unsigned char XbeeConst_FRemoteTxBuf[]; extern unsigned char XbeeConst_FTxBuf0[50]; //处理发送无线临时表 extern unsigned char XbeeConst_FTxBuf0[50]; extern unsigned char* XbeeConst_PTxBuf0; extern unsigned char* XbeeConst_PRemoteTxBuf0; //处理发送远程显示临时表 extern unsigned char XbeeConst_FrameNumLast; extern rt_sem_t thread_EmptyBuffer_sem; extern rt_sem_t uart1_lock; extern rt_sem_t uart2_lock; extern rt_sem_t uart3_lock; extern rt_sem_t uart4_lock; extern rt_sem_t uart5_lock; extern void USART_Push(unsigned char address, unsigned char data); extern void RB_init(void); extern void threadUart_init(void); extern unsigned char* BleApp2MakeFrame(unsigned short dist,unsigned char cmd,unsigned char type,unsigned char* buf);//返回一个处理完成后的数组的首地址 extern void threadUart5_init(void); #endif