commCPU_SUPV/code/user/inc/gps_nmea.h
2025-04-30 16:24:29 +08:00

51 lines
1.0 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef GPS_NMEA_123_INCLUDED
#define GPS_NMEA_123_INCLUDED
#include "glbtypes.h"
#include "general_serial.h"
#ifdef __cplusplus
extern "C" {
#endif
/************************************************************************/
//报文最大长度
#define GPS_NMEA_FRAME_MAX 512
typedef struct
{
int com_index; //串口序号
int com_baud; //波特率
int com_parity; //校验方式 N,O,E
ST_UCHAR gpsFlag; //0表示未初始化1表示关闭语句2表示打开GPRMC 3正常
ST_DOUBLE gpsFlagTime; //上次初始化的时间
ST_INT monitorChl;
ST_DOUBLE lastHwClock;
ST_DOUBLE recvTime; //收到最后一帧数据的时间
ST_INT dataLen; //下面缓冲中,已经填充的数据长度
ST_UCHAR dataBuf[GPS_NMEA_FRAME_MAX];
ST_INT transmitTime; //串口传输时间us
SERIAL_ATTRIB serial_link; //只有一个
} GPS_NMEA_ATTRIB;
ST_RET gps_nmea_init( ST_VOID );
ST_RET gps_nmea_release( ST_VOID );
ST_RET gps_nmea_handle( ST_VOID );
/************************************************************************/
#ifdef __cplusplus
}
#endif
#endif