blob: c096cf2cacdf1cd0a0344725c096cd7120a372d6 [file] [log] [blame]
The Android Open Source Projectd6054a32008-10-21 07:00:00 -07001/*
2 * Copyright 2008, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <hardware/sensors.h>
18#include <unistd.h>
19
20
21uint32_t sensors_control_init() {
22 return 0;
23}
24
25/* returns a fd where to read the events from. the caller takes
26 * ownership of this fd */
27int sensors_control_open() {
28 return -1;
29}
30
31/* returns a bitmask indicating which sensors are enabled */
32uint32_t sensors_control_activate(uint32_t sensors, uint32_t mask) {
33 return 0;
34}
35
36/* set the delay between sensor events in ms */
37int sensors_control_delay(int32_t ms) {
38 return -1;
39}
40
41/* initialize the sensor data read. doesn't take ownership of the fd */
42int sensors_data_open(int fd) {
43 return 0;
44}
45
46/* done with sensor data */
47int sensors_data_close() {
48 return -1;
49}
50
51/* returns a bitmask indicating which sensors have changed */
52int sensors_data_poll(sensors_data_t* data, uint32_t sensors_of_interest) {
53 usleep(60000000);
54 return 0;
55}
56
57/* returns available sensors */
58uint32_t sensors_data_get_sensors() {
59 return 0;
60}