mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-27 12:30:43 +00:00
Add support for lm83.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1843 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
d392b2aa87
commit
44250b56bd
3 files changed
+58
No files matched your search
@@ -4073,6 +4073,61 @@ void print_adm1026(const sensors_chip_name *name)
|
||||
|
||||
}
|
||||
|
||||
void print_lm83(const sensors_chip_name *name)
|
||||
{
|
||||
char *label;
|
||||
double cur,high;
|
||||
int valid;
|
||||
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_LM83_LOCAL_TEMP,&label,&valid) &&
|
||||
!sensors_get_feature(*name,SENSORS_LM83_LOCAL_TEMP,&cur) &&
|
||||
!sensors_get_feature(*name,SENSORS_LM83_LOCAL_HIGH,&high)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
print_temp_info( cur, high, 0, MAXONLY, 0, 0);
|
||||
printf( "\n" );
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get local temperature data!\n");
|
||||
free_the_label(&label);
|
||||
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_LM83_REMOTE1_TEMP,&label,&valid) &&
|
||||
!sensors_get_feature(*name,SENSORS_LM83_REMOTE1_TEMP,&cur) &&
|
||||
!sensors_get_feature(*name,SENSORS_LM83_REMOTE1_HIGH,&high)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
print_temp_info( cur, high, 0, MAXONLY, 0, 0);
|
||||
printf( "\n" );
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get remote temperature 1 data!\n");
|
||||
free_the_label(&label);
|
||||
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_LM83_REMOTE2_TEMP,&label,&valid) &&
|
||||
!sensors_get_feature(*name,SENSORS_LM83_REMOTE2_TEMP,&cur) &&
|
||||
!sensors_get_feature(*name,SENSORS_LM83_REMOTE2_HIGH,&high)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
print_temp_info( cur, high, 0, MAXONLY, 0, 0);
|
||||
printf( "\n" );
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get remote temperature 2 data!\n");
|
||||
free_the_label(&label);
|
||||
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_LM83_REMOTE3_TEMP,&label,&valid) &&
|
||||
!sensors_get_feature(*name,SENSORS_LM83_REMOTE3_TEMP,&cur) &&
|
||||
!sensors_get_feature(*name,SENSORS_LM83_REMOTE3_HIGH,&high)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
print_temp_info( cur, high, 0, MAXONLY, 0, 0);
|
||||
printf( "\n" );
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get remote temperature 3 data!\n");
|
||||
free_the_label(&label);
|
||||
}
|
||||
|
||||
void print_unknown_chip(const sensors_chip_name *name)
|
||||
{
|
||||
int a,b,valid;
|
||||
|
||||
@@ -52,5 +52,6 @@ extern void print_smsc47m1(const sensors_chip_name *name);
|
||||
extern void print_lm92(const sensors_chip_name *name);
|
||||
extern void print_vt8231(const sensors_chip_name *name);
|
||||
extern void print_bmc(const sensors_chip_name *name);
|
||||
extern void print_lm83(const sensors_chip_name *name);
|
||||
|
||||
#endif /* def PROG_SENSORS_CHIPS_H */
|
||||
@@ -368,6 +368,8 @@ void do_a_print(sensors_chip_name name)
|
||||
print_bmc(&name);
|
||||
else if (!strcmp(name.prefix,"adm1026"))
|
||||
print_adm1026(&name);
|
||||
else if (!strcmp(name.prefix,"lm83"))
|
||||
print_lm83(&name);
|
||||
else
|
||||
print_unknown_chip(&name);
|
||||
printf("\n");
|
||||
|
||||
Reference in new issue
Block a user