src/core/interface.h (view raw)
1/* Copyright (c) 2013-2015 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 CORE_INTERFACE_H
7#define CORE_INTERFACE_H
8
9#include "util/common.h"
10
11struct mKeyCallback {
12 uint16_t (*readKeys)(struct mKeyCallback*);
13};
14
15struct mStopCallback {
16 void (*stop)(struct mStopCallback*);
17};
18
19struct mRotationSource {
20 void (*sample)(struct mRotationSource*);
21
22 int32_t (*readTiltX)(struct mRotationSource*);
23 int32_t (*readTiltY)(struct mRotationSource*);
24
25 int32_t (*readGyroZ)(struct mRotationSource*);
26};
27
28struct mRTCSource {
29 void (*sample)(struct mRTCSource*);
30
31 time_t (*unixTime)(struct mRTCSource*);
32};
33
34#endif