mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-07 16:01:34 +00:00
Introduce a separate type for main features. Make subfeatures map to
the real main feature rather than the first subfeature. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4838 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
65f1d1f1cd
commit
da7b4e48da
6 files changed
+136
-130
No files matched your search
+15
-5
@@ -124,6 +124,16 @@ const sensors_chip_name *sensors_get_detected_chips(const sensors_chip_name
|
||||
mapping is available */
|
||||
#define SENSORS_NO_MAPPING -1
|
||||
|
||||
/* These must match the subfeature constants below (shifted by 8 bits) */
|
||||
typedef enum sensors_feature_type {
|
||||
SENSORS_FEATURE_IN = 0x00,
|
||||
SENSORS_FEATURE_FAN = 0x01,
|
||||
SENSORS_FEATURE_TEMP = 0x02,
|
||||
SENSORS_FEATURE_VID = 0x10,
|
||||
SENSORS_FEATURE_BEEP_ENABLE = 0x11,
|
||||
SENSORS_FEATURE_UNKNOWN = INT_MAX,
|
||||
} sensors_feature_type;
|
||||
|
||||
/* This enum contains some "magic" used by sensors_read_dynamic_chip() from
|
||||
lib/sysfs.c. All the sensor types (in, fan, temp, vid) are a multiple of
|
||||
0x100 apart, and sensor subfeatures which should not have a compute
|
||||
@@ -169,8 +179,9 @@ typedef enum sensors_subfeature_type {
|
||||
/* Data about a single chip feature (or category leader) */
|
||||
struct sensors_feature {
|
||||
char *name;
|
||||
int number;
|
||||
sensors_feature_type type;
|
||||
int first_subfeature;
|
||||
sensors_subfeature_type type;
|
||||
};
|
||||
|
||||
/* Data about a single chip subfeature:
|
||||
@@ -201,10 +212,9 @@ typedef struct sensors_subfeature {
|
||||
const sensors_feature *
|
||||
sensors_get_features(const sensors_chip_name *name, int *nr);
|
||||
|
||||
/* This returns all subfeatures of a given main feature (including that
|
||||
main feature itself, in first position.) nr is an internally used
|
||||
variable. Set it to zero to start at the begin of the list. If no more
|
||||
features are found NULL is returned.
|
||||
/* This returns all subfeatures of a given main feature. nr is an internally
|
||||
used variable. Set it to zero to start at the begin of the list. If no
|
||||
more features are found NULL is returned.
|
||||
Do not try to change the returned structure; you will corrupt internal
|
||||
data structures. */
|
||||
const sensors_subfeature *
|
||||
|
||||
Reference in new issue
Block a user