2014-08-12 16:11:26 +00:00
|
|
|
// Copyright (c) 2012- PPSSPP Project.
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official git repository and contact information can be found at
|
|
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-01-25 20:34:50 +00:00
|
|
|
#include "Core/HLE/FunctionWrappers.h"
|
|
|
|
|
2014-08-12 16:11:26 +00:00
|
|
|
void Register_sceUsbGps();
|
2017-08-20 18:03:06 +00:00
|
|
|
|
|
|
|
void __UsbGpsInit();
|
|
|
|
void __UsbGpsDoState(PointerWrap &p);
|
2020-01-09 13:57:09 +00:00
|
|
|
void __UsbGpsShutdown();
|
2017-08-20 18:03:06 +00:00
|
|
|
|
2019-01-30 18:45:04 +00:00
|
|
|
#pragma pack(push, 1)
|
2017-08-20 18:03:06 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
short year;
|
|
|
|
short month;
|
|
|
|
short date;
|
|
|
|
short hour;
|
|
|
|
short minute;
|
|
|
|
short second;
|
|
|
|
float garbage1;
|
|
|
|
float hdop;
|
|
|
|
float garbage2;
|
|
|
|
float latitude;
|
|
|
|
float longitude;
|
|
|
|
float altitude;
|
|
|
|
float garbage3;
|
|
|
|
float speed;
|
|
|
|
float bearing;
|
|
|
|
} GpsData;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
unsigned char id;
|
|
|
|
unsigned char elevation;
|
|
|
|
short azimuth;
|
|
|
|
unsigned char snr;
|
|
|
|
unsigned char good;
|
|
|
|
short garbage;
|
|
|
|
} SatInfo;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
short satellites_in_view;
|
|
|
|
short garbage;
|
|
|
|
SatInfo satInfo[24];
|
|
|
|
} SatData;
|
|
|
|
|
|
|
|
#pragma pack(pop)
|
|
|
|
|
|
|
|
namespace GPS {
|
|
|
|
void init();
|
|
|
|
void setGpsTime(time_t *time);
|
2020-01-26 10:30:46 +00:00
|
|
|
void setGpsData(long long time, float hdop, float latitude, float longitude, float altitude, float speed, float bearing);
|
2020-01-25 20:34:50 +00:00
|
|
|
void setSatInfo(short index, unsigned char id, unsigned char elevation, short azimuth, unsigned char snr, unsigned char good);
|
2017-08-20 18:03:06 +00:00
|
|
|
GpsData *getGpsData();
|
|
|
|
SatData *getSatData();
|
|
|
|
}
|