From d5029b577fd64723f5e9faf0fbe5d546d26cd190 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 28 Jun 2014 09:45:06 -0300 Subject: [PATCH] parse_dib0700.pl: parse REQUEST_GET_VERSION Identify the firmware version on the parsed logs. Signed-off-by: Mauro Carvalho Chehab --- contrib/dib0700/parse_dib0700.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/contrib/dib0700/parse_dib0700.pl b/contrib/dib0700/parse_dib0700.pl index 8b7a64b..c383cfc 100755 --- a/contrib/dib0700/parse_dib0700.pl +++ b/contrib/dib0700/parse_dib0700.pl @@ -169,6 +169,17 @@ while (<>) { next; } + if ($req eq "REQUEST_GET_VERSION") { + my $hwversion = $bytes[0] << 24 | $bytes[1] << 16 | $bytes[2] << 8 | $bytes[3]; + my $romversion = $bytes[4] << 24 | $bytes[5] << 16 | $bytes[6] << 8 | $bytes[7]; + my $fw_version = $bytes[8] << 24 | $bytes[9] << 16 | $bytes[10] << 8 | $bytes[11]; + my $fwtype = $bytes[12] << 24 | $bytes[13] << 16 | $bytes[14] << 8 | $bytes[15]; + + printf("dib0700_get_version(adap->dev, NULL, NULL, NULL, NULL); /* hw: 0x%x rom: 0x%0x fw version: 0x%x, fw type: 0x%x */\n", + $hwversion, $romversion, $fw_version, $fwtype); + next; + } + if ($req eq "REQUEST_SET_GPIO") { my $gpio = $bytes[1]; my $v = $bytes[2]; -- 2.7.4