Change-Id: I707a1555952355ccdd5e851062c4749dc94544eb Reviewed-on: https://go-review.googlesource.com/11312 Reviewed-by: Nigel Tao <nigeltao@golang.org>
21 lines
708 B
C
21 lines
708 B
C
// Copyright 2015 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
#ifndef SENSORS_ANDROID_H
|
|
#define SENSORS_ANDROID_H
|
|
|
|
typedef struct android_SensorManager {
|
|
ASensorEventQueue* queue;
|
|
ALooper* looper;
|
|
int looperId;
|
|
} android_SensorManager;
|
|
|
|
void android_createManager(int looperId, android_SensorManager* dst);
|
|
void android_destroyManager(android_SensorManager* m);
|
|
int android_enableSensor(ASensorEventQueue*, int, int32_t);
|
|
void android_disableSensor(ASensorEventQueue*, int);
|
|
int android_readQueue(int looperId, ASensorEventQueue* q, int n, int32_t* types, int64_t* timestamps, float* vectors);
|
|
|
|
#endif
|