root/lm-sensors/tags/V2-10-2/lib/access.h

Revision 207, 2.7 kB (checked in by frodo, 10 years ago)

Adrian's copyright patch applied

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*
2     access.h - Part of libsensors, a Linux library for reading sensor data.
3     Copyright (c) 1998, 1999  Frodo Looijaard <frodol@dds.nl>
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with this program; if not, write to the Free Software
17     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20 #ifndef LIB_SENSORS_ACCESS_H
21 #define LIB_SENSORS_ACCESS_H
22
23 #include "sensors.h"
24 #include "data.h"
25
26 /* Returns, one by one, a pointer to all sensor_chip structs of the
27    config file which match with the given chip name. Last should be
28    the value returned by the last call, or NULL if this is the first
29    call. Returns NULL if no more matches are found. Do not modify
30    the struct the return value points to!
31    Note that this visits the list of chips from last to first. Usually,
32    you want the match that was latest in the config file. */
33 extern sensors_chip *sensors_for_all_config_chips(sensors_chip_name chip_name,
34                                                   const sensors_chip *last);
35
36 /* Look up a resource in the intern chip list, and return a pointer to it.
37    Do not modify the struct the return value points to! Returns NULL if
38    not found. */
39 extern const sensors_chip_feature *sensors_lookup_feature_nr(const char *prefix,
40                                                              int feature);
41
42 /* Look up a resource in the intern chip list, and return a pointer to it.
43    Do not modify the struct the return value points to! Returns NULL if
44    not found.*/
45 extern const sensors_chip_feature *sensors_lookup_feature_name
46                                   (const char *prefix, const char *feature);
47
48 /* Substitute configuration bus numbers with real-world /proc bus numbers
49    in the chips lists */
50 extern int sensors_substitute_busses(void);
51
52
53 /* Parse an i2c bus name into its components. Returns 0 on succes, a value from
54    error.h on failure. */
55 extern int sensors_parse_i2cbus_name(const char *name, int *res);
56
57 /* Evaluate an expression */
58 extern int sensors_eval_expr(sensors_chip_name chipname,
59                              const sensors_expr *expr,
60                              double val, double *result);
61
62
63 #endif /* def LIB_SENSORS_ACCESS_H */
Note: See TracBrowser for help on using the browser.