Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC PATCH] iio: repeat channel support and dummy client example #39

Closed
10 changes: 9 additions & 1 deletion tests/iio_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,15 @@ int main(int argc, char **argv)
if (format->is_fully_defined)
sign += 'A' - 'a';

printf(", index: %lu, format: %ce:%c%u/%u>>%u)\n",
if (format->repeat)
printf(", index: %lu, format: %ce:%c%u/%uX%u>>%u)\n",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this should this be format->repeat > 1 so we get consistent output if there is no repeat.

Copy link
Contributor Author

@lucasrangit lucasrangit Sep 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I will also make the snprintf usage consistent with how channel.c::get_scan_element() is done or whatever the best style is.

iio_channel_get_index(ch),
format->is_be ? 'b' : 'l',
sign, format->bits,
format->length, format->repeat,
format->shift);
else
printf(", index: %lu, format: %ce:%c%u/%u>>%u)\n",
iio_channel_get_index(ch),
format->is_be ? 'b' : 'l',
sign, format->bits,
Expand Down