From 7b8ee3495e8ea7c381a7bbb5154587a7493bad7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominic=20Sacr=C3=A9?= Date: Tue, 12 May 2015 10:19:22 +0200 Subject: libusbg: Update show-gadgets example to support MIDI gadgets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Dominic Sacré Reviewed-by: Pawel Szewczyk Reviewed-by: Krzysztof Opasiak --- examples/show-gadgets.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/examples/show-gadgets.c b/examples/show-gadgets.c index 7ff71d5..b06a8ff 100644 --- a/examples/show-gadgets.c +++ b/examples/show-gadgets.c @@ -150,6 +150,19 @@ void show_function(usbg_function *f) break; } + case USBG_F_ATTRS_MIDI: + { + usbg_f_midi_attrs *attrs = &f_attrs.attrs.midi; + + fprintf(stdout, " index\t\t%d\n", attrs->index); + fprintf(stdout, " id\t\t\t%s\n", attrs->id); + fprintf(stdout, " in_ports\t\t%d\n", attrs->in_ports); + fprintf(stdout, " out_ports\t\t%d\n", attrs->out_ports); + fprintf(stdout, " buflen\t\t%d\n", attrs->buflen); + fprintf(stdout, " qlen\t\t%d\n", attrs->qlen); + break; + } + default: fprintf(stdout, " UNKNOWN\n"); } -- cgit v1.2.3