OSDN Git Service

Merge remote-tracking branch 'origin/abt/topic/gmin/l-dev/mr1/sensors/master' into...
[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 #define QUIRK_NO_EVENT_MODE     0x100 /* Disable event mode                   */
19 #define QUIRK_NO_TRIG_MODE      0x200 /* Disable trigger mode                 */
20 #define QUIRK_NO_POLL_MODE      0x400 /* Disable poll mode                    */
21 #define QUIRK_MOUNTING_MATRIX   0x800  /* Mounting information present */
22 #define QUIRK_HRTIMER           0x1000  /* We may use a hrtimer if there is no other trigger */
23
24 #ifdef __LP64__
25         typedef uint64_t        flag_t;
26         typedef int64_t         max_delay_t;
27 #else
28         typedef uint32_t        flag_t;
29         typedef int32_t         max_delay_t;
30 #endif
31
32 char*           sensor_get_name         (int s);
33 char*           sensor_get_vendor       (int s);
34 int             sensor_get_version      (int s);
35 float           sensor_get_max_range    (int s);
36 float           sensor_get_resolution   (int s);
37 float           sensor_get_power        (int s);
38 flag_t          sensor_get_flags        (int s);
39 int32_t         sensor_get_min_delay    (int s);
40 max_delay_t     sensor_get_max_delay    (int s);
41 float           sensor_get_illumincalib (int s);
42 uint32_t        sensor_get_quirks       (int s);
43 int             sensor_get_prop         (int s, const char* sel, int* val);
44 int             sensor_get_fl_prop      (int s, const char* sel, float* val);
45 int             sensor_get_order        (int s,unsigned char map[MAX_CHANNELS]);
46 int             sensor_get_mounting_matrix(int s,float mounting_matrix[9]);
47 int             sensor_get_cal_steps    (int s);
48 char*           sensor_get_string_type  (int s);
49 int             sensor_get_st_prop      (int s, const char* sel, char val[MAX_NAME_SIZE]);
50
51 #endif