9 use Data::Dump qw(dump);
14 $ascii .= chr(hex($_)) foreach ( split(/\s+/,$hex) );
23 my $time = $1 if /(\d+:\d+:\d+)/;
26 if ( /IRP_MJ_WRITE.*:\s*(.*)/ ) {
27 print ">> $time $1", hex2ascii($1), "\n";
28 } elsif ( /(IRP_MJ_READ|IOCTL_SERIAL_WAIT_ON_MASK)/ ) {
30 print "#[$in_read] $_\n";
32 # can have SUCCESS in same line!
33 if ( $in_read && /SUCCESS\s+Length\s+\d+:\s*([0-9a-fA-F\s]+)/ ) {
35 print "#<$in_read $_\n";
36 my $len = hex($1) if ( $read =~ m/^([0-9a-f]{2})/i );
37 print "#< $read [$len]\n";
38 print "<< $time $read", hex2ascii($read), "\n";