/******************************************************************************* * File Name : GPS.h * Description : * Created on : 2019Äê3ÔÂ11ÈÕ * Author : www.hido-studio.com *******************************************************************************/ #ifndef _GPS_H_ #define _GPS_H_ /******************************************************************************* * Include Files * *******************************************************************************/ #include "HIDO_TypeDef.h" //#include "GPIO.h" /******************************************************************************* * Macro * *******************************************************************************/ /******************************************************************************* * Type Definition * *******************************************************************************/ typedef enum { GPS_STATE_INVALID = 0, GPS_STATE_VALID, } E_GPSState; typedef enum { GPS_LAT_SIGN_NORTH = 0, GPS_LAT_SIGN_SOUTH, } E_GPSLatSign; typedef enum { GPS_LON_SIGN_EAST = 0, GPS_LON_SIGN_WEST, } E_GPSLonSign; typedef enum { GPS_PIN_REST, GPS_PIN_EN, GPS_PIN_LAST, } E_GPSPin; typedef struct { HIDO_UINT16 m_u16Speed; HIDO_UINT16 m_u16Dir; //direction HIDO_DOUBLE m_dLat; //latitude HIDO_DOUBLE m_dLon; //longitude E_GPSState m_eState; HIDO_UINT16 m_u16Year; HIDO_UINT8 m_u8Mon; //month HIDO_UINT8 m_u8Day; HIDO_UINT8 m_u8Hour; HIDO_UINT8 m_u8Min; //minute HIDO_UINT8 m_u8Sec; //second }ST_GPS; typedef enum { GPS_TYPE_GGA, GPS_TYPE_MAX, } E_GPSType; typedef void (*FN_GPSEventCallback)(E_GPSType _eType, HIDO_CHAR *_pcData, HIDO_UINT32 _u32Len); /******************************************************************************* * Global Function * *******************************************************************************/ /******************************************************************************* * Function Name : GPS_GetState * Description : »ñÈ¡GPS¶¨Î»×´Ì¬ * Input : None * Output : None * Return : ¶¨Î»×´Ì¬ 0 1 2 3 * Author : www.hido-studio.com * Modified Date: : 2021Äê1ÔÂ8ÈÕ *******************************************************************************/ HIDO_UINT8 GPS_GetState(HIDO_VOID); /******************************************************************************* * Function Name : GPS_PinRegister * Description : GPSÄ£¿é¹Ü½Å×¢²á * Input : _ePin ¹Ü½Å¶¨Òå * : _pstGPIOx GPIOx * : _u16GPIOPin GPIO_PIN_x * Output : None * Return : None * Author : www.hido-studio.com * Modified Date: : 2021Äê1ÔÂ8ÈÕ *******************************************************************************/ //HIDO_VOID GPS_PinRegister(E_GPSPin _ePin, GPIO_TypeDef *_pstGPIOx, HIDO_UINT16 _u16GPIOPin); /******************************************************************************* * Function Name : GPS_Poll * Description : GPSÂÖѯ´¦Àí * Input : None * Output : None * Return : None * Author : www.hido-studio.com * Modified Date: : 2021Äê1ÔÂ8ÈÕ *******************************************************************************/ HIDO_VOID GPS_Poll(void); /******************************************************************************* * Function Name : GPS_SetEventCallback * Description : GPSÉèÖÃGPSʼþ»Øµ÷ * Input : None * Output : None * Return : None * Author : hido.ltd *******************************************************************************/ HIDO_VOID GPS_SetEventCallback(FN_GPSEventCallback _fnEventCallback); /******************************************************************************* * Function Name : GPS_IsIdle * Description : GPSÊÇ·ñæ * Input : None * Output : None * Return : None * Author : hido.ltd *******************************************************************************/ HIDO_BOOL GPS_IsIdle(void); /******************************************************************************* * Function Name : GPS_Init * Description : GPSÄ£¿é³õʼ»¯ * Input : None * Output : None * Return : None * Author : www.hido-studio.com * Modified Date: : 2021Äê1ÔÂ8ÈÕ *******************************************************************************/ HIDO_VOID GPS_Init(void); HIDO_VOID GPS_PowerOff(void); #endif /* _GPS_H_ */