]>
iEval git - clump.git/blob - write-to-serial.pl
24c1d06ec554147f56c0efa9e4dd9a12ee3c8a9e
5 use Device
::SerialPort
;
8 read STDIN
, $program, 1000000;
10 my $port = Device
::SerialPort
->new($ARGV[0] // '/dev/ttyUSB1') or die "$!";
12 $port->parity('none');
15 $port->handshake('none');
17 $port->write_settings or die "$!";
19 my $bytes_written = $port->write($program);
20 my $bytes_to_write = length $program;
21 die "Only wrote $bytes_written instead of $bytes_to_write" unless $bytes_written == $bytes_to_write;
This page took 0.049742 seconds and 5 git commands to generate.