From a30d37899f4b5d6621090e8c0faffb63a91fb6bb Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 22 Aug 2007 17:07:11 +0000 Subject: [PATCH] Drop SENSORS_MODE_NO_RW and SENSORS_MODE_RW. The mode is a bitfield, we typically set, or test for, a specific bit. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4696 7894878c-1315-0410-8ee3-d5d059ff63e0 --- lib/data.h | 5 ++--- lib/libsensors.3 | 5 ++--- lib/sensors.h | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/data.h b/lib/data.h index 1af232ac..e1708c93 100644 --- a/lib/data.h +++ b/lib/data.h @@ -130,9 +130,8 @@ typedef struct sensors_bus { compute_mapping is like logical_mapping, only it refers to another feature whose compute line will be inherited (a group could be fan and fan_max, but not fan_div) - mode is SENSORS_MODE_NO_RW, SENSORS_MODE_R, SENSORS_MODE_W or - SENSORS_MODE_RW, for unaccessible, readable, writable, and both readable - and writable. + mode is a bitfield, its value is a combination of SENSORS_MODE_R (readable) + and SENSORS_MODE_W (writable). scaling is the number of decimal points to scale by. Divide the read value by 10**scaling to get the real value. */ typedef struct sensors_chip_feature { diff --git a/lib/libsensors.3 b/lib/libsensors.3 index e15bfbd3..4840bfa4 100644 --- a/lib/libsensors.3 +++ b/lib/libsensors.3 @@ -121,9 +121,8 @@ This structure is used when you want to get all features of a specific chip. .br } sensors_feature_data;\fP .br -The mode field can be one of: -.br -SENSORS_MODE_NO_RW, SENSORS_MODE_R, SENSORS_MODE_W or SENSORS_MODE_RW. +The mode field is a bitfield, its value is a combination of +SENSORS_MODE_R (readable) and SENSORS_MODE_W (writable). \fBconst sensors_feature_data *sensors_get_all_features (const sensors_chip_name *name, int *nr);\fP diff --git a/lib/sensors.h b/lib/sensors.h index d1832b46..d707aaac 100644 --- a/lib/sensors.h +++ b/lib/sensors.h @@ -116,10 +116,8 @@ int sensors_do_chip_sets(const sensors_chip_name *name); const sensors_chip_name *sensors_get_detected_chips(int *nr); /* These defines are used in the mode field of sensors_feature_data */ -#define SENSORS_MODE_NO_RW 0 #define SENSORS_MODE_R 1 #define SENSORS_MODE_W 2 -#define SENSORS_MODE_RW 3 /* This define is used in the mapping field of sensors_feature_data if no mapping is available */