display.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef __display_H
  2. #define __display_H
  3. #define EVENT_clearall (1 << 1)
  4. #define EVENT_clear1 (1 << 2)
  5. #define EVENT_clear2 (1 << 3)
  6. #define EVENT_clear3 (1 << 4)
  7. #define EVENT_clear4 (1 << 5)
  8. #define EVENT_clear5 (1 << 6)
  9. #define EVENT_clear6 (1 << 7)
  10. #define EVENT_KPT_TMRWatch (1 << 8)
  11. #define EVENT_PlanName (1 << 9)
  12. #define EVENT_Current (1 << 10)
  13. #define EVENT_Current_noweight (1 << 11)
  14. #define EVENT_Now (1 << 12)
  15. #define EVENT_Total (1 << 13)
  16. #define EVENT_Next (1 << 14)
  17. #define EVENT_Stop (1 << 15)
  18. extern rt_sem_t display_lock;
  19. extern rt_sem_t displayRemote_lock;
  20. extern rt_sem_t sendLora_lock;
  21. extern struct rt_event display_event;
  22. extern unsigned char RemoteSendDisplay;
  23. extern unsigned char WeightConst_displayTotal;
  24. extern unsigned char WeightConst_remoteDisplay;
  25. extern void display_usart_Init(UART_HandleTypeDef* uartHandle);
  26. extern uint8_t MenuItem; //当前菜单
  27. extern unsigned char WeightConst_Weight_display[8]; //显示重量
  28. extern unsigned char WeightConst_Weight_display_old[8]; //显示重量
  29. extern void threadMenuDisplay_init(void);
  30. extern void threadDisplay_init(void);
  31. extern void threadRemoteDisplay_init(void);
  32. extern void threadDisplay_delay_init(void);
  33. extern void ChancheShow(void);
  34. extern void send_uart4_send_data(void);
  35. extern unsigned char get_msg( unsigned char Xstart,// 0 - 191
  36. unsigned char Ystart, //0 - 47
  37. unsigned char ZiTiSize,//1 or 2 or 3
  38. unsigned char reset_enable,//0 or 1
  39. unsigned char speed,//速度 0 or 1 or 2 or 3
  40. unsigned char ZiFuCount,//字符个数
  41. unsigned char JieMianCount,//3
  42. unsigned char JieMianID,//0 or 1 or 2
  43. unsigned char Xend,
  44. unsigned char f,
  45. unsigned char * ASCII_buf);
  46. extern unsigned char get_modbusmsg(unsigned char addr,// 0 - 191
  47. unsigned char func, //0 - 47
  48. unsigned short dataaddr,//1 or 2 or 3
  49. unsigned short state);
  50. #endif