mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 06:15:15 +00:00
New FSC Hermes chip driver, contributed by Reinhard Nissl
<rnissl@gmx.de>. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2029 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -3511,6 +3511,119 @@ void print_fscscy(const sensors_chip_name *name)
|
||||
free_the_label(&label);
|
||||
}
|
||||
|
||||
void print_fscher(const sensors_chip_name *name)
|
||||
{
|
||||
char *label = NULL;
|
||||
double voltage, temp,state,fan,min_rpm;
|
||||
int valid;
|
||||
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_TEMP1,&label,&valid)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_TEMP1,&temp)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_TEMP1_STATE,&state)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
if((int) state & 0x01)
|
||||
printf("\t%+6.2f C \n",temp);
|
||||
else
|
||||
printf("\tfailed\n");
|
||||
}
|
||||
}
|
||||
free_the_label(&label);
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_TEMP2,&label,&valid)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_TEMP2,&temp)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_TEMP2_STATE,&state)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
if((int) state & 0x01)
|
||||
printf("\t%+6.2f C \n",temp);
|
||||
else
|
||||
printf("\tfailed\n");
|
||||
}
|
||||
}
|
||||
free_the_label(&label);
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_TEMP3,&label,&valid)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_TEMP3,&temp)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_TEMP3_STATE,&state)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
if((int) state & 0x01)
|
||||
printf("\t%+6.2f C \n",temp);
|
||||
else
|
||||
printf("\tfailed\n");
|
||||
}
|
||||
}
|
||||
free_the_label(&label);
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_FAN1,&label,&valid)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_FAN1,&fan)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_FAN1_MIN,&min_rpm)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_FAN1_STATE,&state)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
if((int) state & 0x02)
|
||||
printf("\tfaulty\n");
|
||||
else if (fan < min_rpm)
|
||||
printf("\t%6.0f RPM (not present or faulty)\n",fan);
|
||||
else
|
||||
printf("\t%6.0f RPM \n",fan);
|
||||
}
|
||||
}
|
||||
free_the_label(&label);
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_FAN2,&label,&valid)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_FAN2,&fan)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_FAN2_MIN,&min_rpm)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_FAN2_STATE,&state)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
if((int) state & 0x02)
|
||||
printf("\tfaulty\n");
|
||||
else if (fan < min_rpm)
|
||||
printf("\t%6.0f RPM (not present or faulty)\n",fan);
|
||||
else
|
||||
printf("\t%6.0f RPM \n",fan);
|
||||
}
|
||||
}
|
||||
free_the_label(&label);
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_FAN3,&label,&valid)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_FAN3,&fan)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_FAN3_MIN,&min_rpm)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_FAN3_STATE,&state)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
if((int) state & 0x02)
|
||||
printf("\tfaulty\n");
|
||||
else if (fan < min_rpm)
|
||||
printf("\t%6.0f RPM (not present or faulty)\n",fan);
|
||||
else
|
||||
printf("\t%6.0f RPM \n",fan);
|
||||
}
|
||||
}
|
||||
free_the_label(&label);
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_VOLTAGE1,&label,&valid)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_VOLTAGE1,&voltage)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
printf("\t%+6.2f V\n",voltage);
|
||||
}
|
||||
}
|
||||
free_the_label(&label);
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_VOLTAGE2,&label,&valid)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_VOLTAGE2,&voltage)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
printf("\t%+6.2f V\n",voltage);
|
||||
}
|
||||
}
|
||||
free_the_label(&label);
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_VOLTAGE3,&label,&valid)
|
||||
&& !sensors_get_feature(*name,SENSORS_FSCHER_VOLTAGE3,&voltage)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
printf("\t%+6.2f V\n",voltage);
|
||||
}
|
||||
}
|
||||
free_the_label(&label);
|
||||
}
|
||||
|
||||
void print_pcf8591(const sensors_chip_name *name)
|
||||
{
|
||||
char *label;
|
||||
|
Reference in New Issue
Block a user