generated from Template/H563ZI-HAL-CMake-Template
新加入gps数据解析,使用GDMA1---CHANNEL3
This commit is contained in:
38
fun/gps.h
Normal file
38
fun/gps.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef __GPS_H
|
||||
#define __GPS_H
|
||||
|
||||
#include "headfile.h"
|
||||
|
||||
#define USART_REC_LEN 200
|
||||
#define EN_USART2_RX 1 //ʹ<>ܽ<EFBFBD><DCBD><EFBFBD> --- 1 <20><>֮ 0
|
||||
|
||||
#define GPS_DMA_RX_BUF_LEN 200 //<2F>ɸ<EFBFBD><C9B8><EFBFBD>NMEA<45><41><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
#define TEST 1 //<2F><><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>,ȥ<><C8A5><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ԽӴ<D4BD><D3B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>
|
||||
#define parse 1 // <20><><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>gps<70>ṹ<EFBFBD><E1B9B9>
|
||||
#define GPS_Buffer_Length 80
|
||||
#define UTCTime_Length 11
|
||||
#define latitude_Length 11
|
||||
#define N_S_Length 2
|
||||
#define longitude_Length 12
|
||||
#define E_W_Length 2
|
||||
|
||||
typedef struct GPSData
|
||||
{
|
||||
char GPS_Buffer[GPS_Buffer_Length];
|
||||
char isGetData; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ȡ<EFBFBD><C8A1>GPS<50><53><EFBFBD><EFBFBD>
|
||||
char isParseData; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
char UTCTime[UTCTime_Length]; //UTCʱ<43><CAB1>
|
||||
char latitude[latitude_Length]; //γ<><CEB3>
|
||||
char N_S[N_S_Length]; //N/S
|
||||
char longitude[longitude_Length]; //<2F><><EFBFBD><EFBFBD>
|
||||
char E_W[E_W_Length]; //E/W
|
||||
char isUsefull; //<2F><>λ<EFBFBD><CEBB>Ϣ<EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>Ч
|
||||
} _GPSData;
|
||||
|
||||
extern _GPSData GPS;
|
||||
extern uint8_t GPS_DMA_RX_BUF[GPS_DMA_RX_BUF_LEN];
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user