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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user