OSDN Git Service

IRDA-3484: Optionally read window size from filter specification
[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 void    set_timestamp   (struct timespec *out, int64_t target_ns);
20
21 int64_t get_timestamp_boot      (void);
22 int64_t get_timestamp_realtime  (void);
23 int64_t get_timestamp_monotonic (void);
24
25 #endif
26
27
28