From: Mauro Carvalho Chehab Date: Sun, 10 Jul 2011 14:32:14 +0000 (-0300) Subject: parse_em28xx_drxk.pl: Improve output for i2c master xfer X-Git-Tag: v4l-utils-0.8.5~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c4a5251b9e1b9245d3e2454097d0e0ca86f725a;p=platform%2Fupstream%2Fv4l-utils.git parse_em28xx_drxk.pl: Improve output for i2c master xfer append 0x to hexadecimal numbers, making easier to paste it into the driver. Signed-off-by: Mauro Carvalho Chehab --- diff --git a/contrib/em28xx/parse_em28xx_drxk.pl b/contrib/em28xx/parse_em28xx_drxk.pl index aba82c0..9c04527 100755 --- a/contrib/em28xx/parse_em28xx_drxk.pl +++ b/contrib/em28xx/parse_em28xx_drxk.pl @@ -2246,10 +2246,12 @@ parse_error: printf "ERR: DRX-K write(state, 0x%s, %s, 0x%08x) without data. Probably an read ops + read error\n", $bits, $addr, $old_reg, $old_flags; } printf "$timestamp " if ($timestamp); - printf "i2c_master_send(0x%s>>1, { %s }, %d);\n", $addr, $app_data, $n; + my $data = add_hex_mark(substr($app_data, $j)); + printf "i2c_master_send(0x%s>>1, %s, %d);\n", $addr, $data, $n; } else { printf "$timestamp " if ($timestamp); - printf "i2c_master_recv(0x%s>>1, { %s }, %d);\n", $addr, $app_data, $n; + my $data = add_hex_mark(substr($app_data, $j)); + printf "i2c_master_recv(0x%s>>1, %s, %d);\n", $addr, $data, $n; } } @@ -2356,7 +2358,7 @@ while (<>) { parse_drxk_addr($timestamp, $1, $2, $3, 1); } else { printf "$timestamp " if ($timestamp && $show_other_xfer); - printf "i2c_master_send(0x$1>>1, { $3 }, 0x$2);\n" if ($show_other_xfer); + printf "i2c_master_send(0x$1>>1, %s, 0x$2);\n", add_hex_mark($3) if ($show_other_xfer); } next; } @@ -2365,7 +2367,7 @@ while (<>) { parse_drxk_addr($timestamp, $1, $2, $3, 0); } else { printf "$timestamp " if ($timestamp && $show_other_xfer); - printf "i2c_master_recv(0x$1>>1, &buf, 0x$2); /* $3 */\n" if ($show_other_xfer); + printf "i2c_master_recv(0x$1>>1, &buf, 0x$2); /* %s */\n", add_hex_mark($3) if ($show_other_xfer); } next; }