OSDN Git Service

GMIN-2992: Prefix uncalibrated gyro name with Uncalibrated
[android-x86/hardware-intel-libsensors.git] / utils.h
1 /*
2  * Copyright (C) 2014 Intel Corporation.
3  */
4
5 #ifndef __UTILS_H__
6 #define __UTILS_H__
7
8 #include "common.h"
9
10 int     sysfs_read_int   (const char path[PATH_MAX], int *value);
11 int     sysfs_write_int  (const char path[PATH_MAX], int value);
12
13 int     sysfs_read_str   (const char path[PATH_MAX], char *buf, int buf_len);
14 int     sysfs_write_str  (const char path[PATH_MAX], const char *buf);
15
16 int     sysfs_read_float (const char path[PATH_MAX], float *value);
17 int     sysfs_write_float(const char path[PATH_MAX], float value);
18
19 int     decode_type_spec(const char type_buf[MAX_TYPE_SPEC_LEN],
20                          struct datum_info_t *type_info);
21
22 int64_t get_timestamp   (void);
23
24 #endif
25
26
27