added I2C device check

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@5345 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
klauswitt
2014-03-28 00:35:41 +00:00
parent 9683a2cc50
commit ca27ec2ca8

View File

@@ -83,6 +83,7 @@ sub RPII2C_Define($$) { #
return undef;
}
$hash->{DeviceName} = "/dev/i2c-".$dev;
return $name . ': Error! I2C device not found: ' . $hash->{DeviceName} . '. Please check kernelmodules must loaded: i2c_bcm2708, i2c_dev' unless -e $hash->{DeviceName};
$hash->{STATE} = "initialized";
return undef;
}