hdf.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef __HDF_H
  2. #define __HDF_H
  3. #include "stdint.h"
  4. #include "cang.h"
  5. #include "stdint.h"
  6. #include "string.h"
  7. #include "stdio.h"
  8. #include "usart.h"
  9. #include "config.h"
  10. #include "rkg.h"
  11. #include "cang.h"
  12. #include "kzq.h"
  13. #include "level.h"
  14. #include "tem.h"
  15. #include "angle.h"
  16. #include "xyf.h"
  17. #include "main.h"
  18. #define HDF_BUF_DEP 16
  19. typedef struct{
  20. uint16_t HDF_OFData[HDF_BUF_DEP]; //开关数据
  21. uint16_t HDF_Data[HDF_BUF_DEP]; //浮球数据
  22. uint16_t HDF_OFState; //底阀开关
  23. uint16_t HDF_OFState1; //底阀开关
  24. uint16_t HDF_OFStateCnt; //底阀开关计数
  25. uint16_t HDF_State; //底阀浮球状态
  26. uint16_t HDF_StateCnt; //底阀浮球计数
  27. uint16_t HDF_ErrorCnt; //错误计数
  28. uint16_t HDF_Error; //错误状态
  29. uint16_t HDF_StateKeepNum; //判断次数
  30. uint16_t RTData_Num; //数据收发次数
  31. }HDF_Inf;
  32. extern uint8_t USART2_RX_BUF002[Uart2_BUF_SIZE];
  33. extern uint8_t USART1_RX_BUF002[Uart2_BUF_SIZE];
  34. extern uint8_t USART3_RX_BUF002[Uart2_BUF_SIZE];
  35. extern int data_lengthU2,data_lengthU1,data_lengthU3;
  36. extern int flagU1Rx,flagU2Rx,flagU3Rx;
  37. extern uint8_t USART3_RX_BUF002_print[Uart3_BUF_SIZE];
  38. extern HDF_Inf hdf_inf[SENSOR_DEEP];
  39. extern uint8_t Get_DFState(uint8_t Cang_Num);
  40. extern void DF_State(uint8_t Cang_Num);
  41. extern void Get_ZN_hdf_data(void) ;
  42. extern void TOUCHUAN_UART_NUM(uint8_t* pTx) ;
  43. #endif