all repos — mgba @ 0de46a78679adf820eba08c3f72e64202540b692

mGBA Game Boy Advance Emulator

src/gba/gba-sensors.h (view raw)

 1/* Copyright (c) 2013-2014 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef GBA_SENSORS_H
 7#define GBA_SENSORS_H
 8
 9#include "util/common.h"
10
11struct GBARotationSource {
12	void (*sample)(struct GBARotationSource*);
13
14	int32_t (*readTiltX)(struct GBARotationSource*);
15	int32_t (*readTiltY)(struct GBARotationSource*);
16
17	int32_t (*readGyroZ)(struct GBARotationSource*);
18};
19
20struct GBALuminanceSource {
21	void (*sample)(struct GBALuminanceSource*);
22
23	uint8_t (*readLuminance)(struct GBALuminanceSource*);
24};
25
26struct GBARTCSource {
27	void (*sample)(struct GBARTCSource*);
28
29	time_t (*unixTime)(struct GBARTCSource*);
30};
31
32#endif