OSDN Git Service

Merge remote-tracking branch 'origin/abt/topic/gmin/kitkat/sensors' into gmin/kitkat...
[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
18 int     decode_type_spec(const char type_buf[MAX_TYPE_SPEC_LEN],
19                          struct datum_info_t *type_info);
20
21 int64_t get_timestamp   (void);
22
23 #endif
24
25
26