summaryrefslogtreecommitdiff
path: root/v4l2-apps/util/xc3028-firmware/extract_head.h
diff options
context:
space:
mode:
Diffstat (limited to 'v4l2-apps/util/xc3028-firmware/extract_head.h')
-rw-r--r--v4l2-apps/util/xc3028-firmware/extract_head.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/v4l2-apps/util/xc3028-firmware/extract_head.h b/v4l2-apps/util/xc3028-firmware/extract_head.h
index 0bc0d19f9..373ac78ba 100644
--- a/v4l2-apps/util/xc3028-firmware/extract_head.h
+++ b/v4l2-apps/util/xc3028-firmware/extract_head.h
@@ -60,17 +60,18 @@ char *extract_header = "#!/usr/bin/perl\n"
" syswrite(OUTFILE, chr($l0).chr($l1).chr($l2).chr($l3));\n"
"}\n"
"\n"
- "sub write_le64($)\n"
+ "sub write_le64($$)\n"
"{\n"
- " my $val = shift;\n"
- " my $l7 = ($val >> 56) & 0xff;\n"
- " my $l6 = ($val >> 48) & 0xff;\n"
- " my $l5 = ($val >> 40) & 0xff;\n"
- " my $l4 = ($val >> 32) & 0xff;\n"
- " my $l3 = ($val >> 24) & 0xff;\n"
- " my $l2 = ($val >> 16) & 0xff;\n"
- " my $l1 = ($val >> 8) & 0xff;\n"
- " my $l0 = $val & 0xff;\n"
+ " my $msb_val = shift;\n"
+ " my $lsb_val = shift;\n"
+ " my $l7 = ($msb_val >> 24) & 0xff;\n"
+ " my $l6 = ($msb_val >> 16) & 0xff;\n"
+ " my $l5 = ($msb_val >> 8) & 0xff;\n"
+ " my $l4 = $msb_val & 0xff;\n\n"
+ " my $l3 = ($lsb_val >> 24) & 0xff;\n"
+ " my $l2 = ($lsb_val >> 16) & 0xff;\n"
+ " my $l1 = ($lsb_val >> 8) & 0xff;\n"
+ " my $l0 = $lsb_val & 0xff;\n"
"\n"
" syswrite(OUTFILE,\n"
" chr($l0).chr($l1).chr($l2).chr($l3).\n"