dm_scaner.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*******************************************************************************************
  2. * @file dm_scaner.h
  3. *
  4. * @brief ��ά��ɨ��������
  5. *
  6. * (c) Copyright 2020, Shandong Huali electromechanical Co., Ltd..
  7. * This is protected by international copyright laws. Knowledge of the
  8. * source code may not be used to write a similar product. This file may
  9. * only be used in accordance with a license and should not be redistributed
  10. * in any way. We appreciate your understanding and fairness.
  11. *
  12. *
  13. * @author Deman
  14. * @date Created: 2020.08.06-T13:43:10+0800
  15. *
  16. *******************************************************************************************/
  17. #ifndef _DM_SCANER_H
  18. #define _DM_SCANER_H
  19. #include "stdint.h"
  20. #include "stdbool.h"
  21. #define UART_RECV_MAX (200)
  22. typedef enum
  23. {
  24. DMSCANER_INIT,
  25. DMSCANER_POWEROFF,
  26. DMSCANER_SCANOFF,
  27. DMSCANER_POWERON,
  28. DMSCANER_SCANON,
  29. DMSCANER_VALUE_UPDATE,
  30. DMSCANER_VALUE_READED,
  31. DMSCANER_VALUE_INVALID,
  32. DMSCANER_ERR
  33. }DmScanerSta_t;
  34. typedef struct
  35. {
  36. DmScanerSta_t Sta;
  37. int16_t xOffset; //X��ƫ��ֵ�ֱ���Ϊ 1mm������ 32bit �з�������
  38. int16_t yOffset; //Y��ƫ��ֵ�ֱ���Ϊ 1mm������ 32bit �з�������
  39. uint32_t xValue; //DM��Xֵ
  40. uint32_t yValue; //DM��Yֵ
  41. bool Ready; //��ǰ����֡��ά���Ƿ���Ч
  42. }DmScanerData_t;
  43. typedef struct
  44. {
  45. uint32_t TagNum;
  46. uint32_t xValue; //巷值
  47. uint32_t yValue; //坡值
  48. uint32_t cValue; //层值
  49. uint32_t Set_cValue; //设置层值
  50. } Scaner_TypeDef;
  51. extern Scaner_TypeDef scan;
  52. #endif /* _DM_SCANER_H */