From db13b6f812ba94c562f1ed61f1457844868c47a8 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 25 Jul 2014 22:47:47 -0300 Subject: [PATCH] parse_au0828.pl: fix I2C read payload Signed-off-by: Mauro Carvalho Chehab --- contrib/au0828/parse_au0828.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/au0828/parse_au0828.pl b/contrib/au0828/parse_au0828.pl index 37a127b..2129e71 100755 --- a/contrib/au0828/parse_au0828.pl +++ b/contrib/au0828/parse_au0828.pl @@ -136,10 +136,11 @@ while (<>) { if (($reqtype == 0xc0) && ($reg == 0x0209)) { # I2C read data - push @i2c_rbuf, $val; + my @bytes = split(/ /, $payload); + push @i2c_rbuf, hex($_) foreach(@bytes); if (!$i2c_hold) { - printf "$timestamp au0828 I2C read addr = 0x%02x (speed = %s) ", $i2c_addr, $i2c_speed; + printf "$timestamp au0828 I2C read addr = 0x%02x (speed = %s, len=%d) ", $i2c_addr, $i2c_speed, scalar(@i2c_rbuf); printf "0x%02x ", $_ foreach (@i2c_rbuf); print "\n"; -- 2.7.4