12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- #ifndef __GPS_DATA_H_
- #define __GPS_DATA_H_
- #include "stdint.h"
- #include "pt.h"
- #include "message.h"
- #define GPS_PWREN_PIN GPIO_Pin_1
- #define GPS_PWREN_PORT GPIOB
- #define GPS_PWREN_HIGH GPS_PWREN_PORT->BSRR = GPS_PWREN_PIN
- #define GPS_PWREN_LOW GPS_PWREN_PORT->BRR = GPS_PWREN_PIN
-
- typedef struct SUT_GPS_INF
- {
- unsigned char isGpsWork:1;
- unsigned char isGpsValid:1;
- unsigned char isServerLogin:1;
- unsigned char isAutoSend:1;
- unsigned char isGpsAuthOk:1;
- unsigned char GpsInactiveCt;
-
- unsigned char HostCmd;
-
-
- unsigned int GPS_SecondCnt;
- unsigned short GPS_UploadTime;
- unsigned char GPS_TimeIndexBackup;
-
- unsigned char year;
- unsigned char month;
- unsigned char day;
- unsigned char hour;
- unsigned char minu;
- unsigned char sec;
-
- uint32_t longitue;
- uint32_t latitue;
-
- uint32_t speed;
- uint32_t aspect;
- uint32_t AvgSpeed;
- uint32_t speedbuf[5];
- uint32_t StatisticsMile ;
- unsigned char Status;
- unsigned char Location[16];
- unsigned char Speed[8];
- unsigned char Time[8];
-
- uint32_t testJD;
- uint32_t testWD;
-
- char NSFlag;
- char EWFlag;
- }SUT_GPS_INF;
- #define GPS_TABLE_NUM 8
- typedef struct SUT_MESS{
- unsigned char Update;
- unsigned char forcePullGroupOn;
- unsigned char startCntFlag;
- unsigned char skipCnt;
- unsigned char GBKMess1[SMS_SIGNAL_LEN+1];
- unsigned short len;
- unsigned char codeType;
- }SUT_MESS;
- extern SUT_MESS sutMess;
- extern SUT_GPS_INF sutGpsInfo;
- extern const unsigned short GPS_TimeTable[GPS_TABLE_NUM];
- void GPSRestart(void);
- void GPSStop(void);
- void process_gps_data(char *buf,uint32_t size);
- void GpsInternalChange();
- PT_THREAD (ptGpsTask(struct pt *pt));
- #endif
|