bossay_release_out/app/A24_GPS/include/L76K.h

58 lines
1.7 KiB
C
Raw Normal View History

2025-09-24 11:16:14 +08:00
/*
* Copyright (c) 2020  Jinan Bosai Network Technology Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __L76_H__
#define __L76_H__
#include <stdint.h>
/***************************************************************
* : GasStatus_ENUM
*
***************************************************************/
typedef enum
{
OFF = 0,
ON
} SwitchStatus;
/***************************************************\
*GPS NMEA-0183
*
\***************************************************/
typedef struct
{
uint32_t latitude_bd; //纬度 分扩大100000倍实际要除以100000
uint8_t nshemi_bd; //北纬/南纬,N:北纬;S:南纬
uint32_t longitude_bd; //经度 分扩大100000倍,实际要除以100000
uint8_t ewhemi_bd; //东经/西经,E:东经;W:西经
}gps_msg;
/* L76传感器数据类型定义 ------------------------------------------------------------*/
typedef struct
{
float Longitude; //经度
float Latitude; //纬度
} L76Data;
void BoardInit(void);
void L76ReadData(L76Data *ReadData);
void BeepStatusSet(SwitchStatus status);
void LedWarnStatusSet(SwitchStatus status);
#endif /* __L76_H__ */