diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-02-16 21:49:31 -0500 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2008-02-16 21:49:31 -0500 |
commit | 381bcd3aa9c4c844cb415342a0ab21622c596488 (patch) | |
tree | 75e79ed984e931dc37c254639d99d63d59c4aba6 /v4l2-apps/util/v4l2-dbg.cpp | |
parent | 7e39be7b7313d51ad3be46803a5918f1b2914b82 (diff) | |
parent | 18ac0ef62eca3a89e0bf1f3c23bb7004e760d15b (diff) | |
download | mediapointer-dvb-s2-381bcd3aa9c4c844cb415342a0ab21622c596488.tar.gz mediapointer-dvb-s2-381bcd3aa9c4c844cb415342a0ab21622c596488.tar.bz2 |
merge: ~stoth/pci-nano
From: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'v4l2-apps/util/v4l2-dbg.cpp')
-rw-r--r-- | v4l2-apps/util/v4l2-dbg.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/v4l2-apps/util/v4l2-dbg.cpp b/v4l2-apps/util/v4l2-dbg.cpp index ce6a9ac78..e55cbb2a8 100644 --- a/v4l2-apps/util/v4l2-dbg.cpp +++ b/v4l2-apps/util/v4l2-dbg.cpp @@ -71,6 +71,7 @@ enum Option { OptGetDriverInfo = 'D', OptScanChipIdents = 'C', OptGetChipIdent = 'c', + OptSetStride = 'w', OptHelp = 'h', OptLogStatus = 128, @@ -94,6 +95,7 @@ static struct option long_options[] = { {"verbose", no_argument, 0, OptVerbose}, {"log-status", no_argument, 0, OptLogStatus}, {"list-driverids", no_argument, 0, OptListDriverIDs}, + {"wide", required_argument, 0, OptSetStride}, {0, 0, 0, 0} }; @@ -113,6 +115,8 @@ static void usage(void) printf(" Scan the available host and i2c chips [VIDIOC_G_CHIP_IDENT]\n"); printf(" -c, --get-chip-ident=type=<host/i2cdrv/i2caddr>,chip=<chip>\n"); printf(" Get the chip identifier [VIDIOC_G_CHIP_IDENT]\n"); + printf(" -w, --wide=<reg length>\n"); + printf(" Sets step between two registers\n"); printf(" --log-status log the board status in the kernel log [VIDIOC_LOG_STATUS]\n"); printf(" --list-driverids list the known I2C driver IDs for use with the i2cdrv type\n"); printf("\n"); @@ -262,7 +266,7 @@ static int parse_subopt(char **subs, char * const *subopts, char **value) int main(int argc, char **argv) { char *value, *subs; - int i; + int i, forcedstride = 0; int fd = -1; @@ -341,6 +345,8 @@ int main(int argc, char **argv) break; } } + case OptSetStride: + forcedstride = strtoull(optarg, 0L, 0); break; case OptListRegisters: subs = optarg; @@ -470,8 +476,12 @@ int main(int argc, char **argv) if (options[OptListRegisters]) { int stride = 1; - - if (get_reg.match_type == V4L2_CHIP_MATCH_HOST) stride = 4; + if (forcedstride) { + stride = forcedstride; + } else { + if (get_reg.match_type == V4L2_CHIP_MATCH_HOST) + stride = 4; + } printf("ioctl: VIDIOC_DBG_G_REGISTER\n"); if (reg_max != 0) { |