buffer.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef BUFFER_H
  2. #define BUFFER_H
  3. #include <rtthread.h>
  4. #include "ring_buffer.h"
  5. #include <stdint.h>
  6. extern ring_buffer *rb_usart1,*rb_usart2,*rb_usart3,*rb_uart4,*rb_uart5;
  7. extern uint8_t usart1_send_data[64];
  8. extern uint8_t usart2_send_data[256];
  9. extern uint8_t usart3_send_data[64];
  10. extern uint8_t uart4_send_data[256];
  11. extern uint8_t flag_uart1_send;
  12. extern uint8_t flag_uart2_send;
  13. extern uint8_t flag_uart3_send;
  14. extern uint8_t flag_uart4_send;
  15. extern ring_buffer *SendWeightQueue,*XbeeQueue,*XbeeAPIQueue,*RemoteQueue;
  16. extern ring_buffer *RecWeightQueue;
  17. extern uint8_t XbeeConst_CenterAddress[8]; //开始地址 0xFF
  18. extern uint8_t XbeeConst_CCAddress[8]; //开始地址 0xFF
  19. extern uint8_t XbeeConst_RemoteAddress;
  20. extern unsigned char ccsend;
  21. extern unsigned char XbeeConst_FRemoteTxBuf[];
  22. extern unsigned char XbeeConst_FTxBuf0[50]; //处理发送无线临时表
  23. extern unsigned char XbeeConst_FTxBuf0[50];
  24. extern unsigned char* XbeeConst_PTxBuf0;
  25. extern unsigned char* XbeeConst_PRemoteTxBuf0; //处理发送远程显示临时表
  26. extern unsigned char XbeeConst_FrameNumLast;
  27. extern rt_sem_t thread_EmptyBuffer_sem;
  28. extern rt_sem_t uart1_lock;
  29. extern rt_sem_t uart2_lock;
  30. extern rt_sem_t uart3_lock;
  31. extern rt_sem_t uart4_lock;
  32. extern rt_sem_t uart5_lock;
  33. extern void USART_Push(unsigned char address, unsigned char data);
  34. extern void RB_init(void);
  35. extern void threadUart_init(void);
  36. #endif