OSDN Git Service

Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/sensors/master' into mr1
[android-x86/hardware-intel-libsensors.git] / description.h
1 /*
2  * Copyright (C) 2014-2015 Intel Corporation.
3  */
4
5 #ifndef __DESCRIPTION_H__
6 #define __DESCRIPTION_H__
7
8 #include "common.h"
9
10 #define QUIRK_ALREADY_DECODED   0x01  /* Sensor quirks have been read         */
11 #define QUIRK_INITIAL_RATE      0x02  /* Force initial sensor sampling rate   */
12 #define QUIRK_FIELD_ORDERING    0x04  /* Do field remapping for this sensor   */
13 #define QUIRK_TERSE_DRIVER      0x08  /* Force duplicate events generation    */
14 #define QUIRK_NOISY             0x10  /* High noise level on readings         */
15 #define QUIRK_FORCE_CONTINUOUS  0x20  /* Force usage of continuous trigger    */
16 #define QUIRK_BIASED            0x40  /* Biased sensor, requires compensation */
17 #define QUIRK_SPOTTY            0x80  /* Driver may lose events */
18
19 #ifdef __LP64__
20         typedef uint64_t        flag_t;
21         typedef int64_t         max_delay_t;
22 #else
23         typedef uint32_t        flag_t;
24         typedef int32_t         max_delay_t;
25 #endif
26
27 char*           sensor_get_name         (int s);
28 char*           sensor_get_vendor       (int s);
29 int             sensor_get_version      (int s);
30 float           sensor_get_max_range    (int s);
31 float           sensor_get_resolution   (int s);
32 float           sensor_get_power        (int s);
33 flag_t          sensor_get_flags        (int s);
34 int32_t         sensor_get_min_delay    (int s);
35 max_delay_t     sensor_get_max_delay    (int s);
36 float           sensor_get_illumincalib (int s);
37 uint32_t        sensor_get_quirks       (int s);
38 int             sensor_get_prop         (int s, const char* sel, int* val);
39 int             sensor_get_fl_prop      (int s, const char* sel, float* val);
40 int             sensor_get_order        (int s,unsigned char map[MAX_CHANNELS]);
41 int             sensor_get_cal_steps    (int s);
42 char*           sensor_get_string_type  (int s);
43 int             sensor_get_st_prop      (int s, const char* sel, char val[MAX_NAME_SIZE]);
44
45 #endif