1
0

L76K.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (c) 2020  Jinan Bosai Network Technology Co., Ltd.
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. #ifndef __L76_H__
  16. #define __L76_H__
  17. #include <stdint.h>
  18. /***************************************************************
  19. * 名 称: GasStatus_ENUM
  20. * 说 明:枚举状态结构体
  21. ***************************************************************/
  22. typedef enum
  23. {
  24. OFF = 0,
  25. ON
  26. } SwitchStatus;
  27. /***************************************************\
  28. *GPS NMEA-0183协议重要参数结构体定义
  29. *卫星信息
  30. \***************************************************/
  31. typedef struct
  32. {
  33. uint32_t latitude_bd; //纬度 分扩大100000倍,实际要除以100000
  34. uint8_t nshemi_bd; //北纬/南纬,N:北纬;S:南纬
  35. uint32_t longitude_bd; //经度 分扩大100000倍,实际要除以100000
  36. uint8_t ewhemi_bd; //东经/西经,E:东经;W:西经
  37. }gps_msg;
  38. /* L76传感器数据类型定义 ------------------------------------------------------------*/
  39. typedef struct
  40. {
  41. float Longitude; //经度
  42. float Latitude; //纬度
  43. } L76Data;
  44. void BoardInit(void);
  45. void L76ReadData(L76Data *ReadData);
  46. void BeepStatusSet(SwitchStatus status);
  47. void LedWarnStatusSet(SwitchStatus status);
  48. #endif /* __L76_H__ */