Switch for Windows to use Win32::Serialport instead of Device::Serialport

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@181 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
tdressler
2008-05-11 17:45:38 +00:00
parent 21c74f2a0e
commit e5c5707a3b

View File

@@ -4,7 +4,7 @@ package main;
use strict;
use warnings;
use Time::HiRes qw(gettimeofday);
use Device::SerialPort;
sub FHZ_Write($$$);
sub FHZ_Read($);
@@ -224,7 +224,13 @@ FHZ_Define($$)
}
Log 3, "FHZ opening FHZ device $dev";
if ($^O=~/Win/) {
eval ("use Win32::SerialPort;");
my $po = new Win32::SerialPort ($dev);
}else{
eval ("use Device::SerialPort;");
my $po = new Device::SerialPort ($dev);
}
return "Can't open $dev: $!\n" if(!$po);
Log 3, "FHZ opened FHZ device $dev";