MCPcopy Create free account
hub / github.com/kiibohd/controller / usb_set_interface

Function usb_set_interface

Bootloader/usb.c:333–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331}
332
333static int usb_set_interface(int iface, int altsetting)
334{
335 int iface_count = 0;
336
337 for (struct usbd_function_ctx_header *fh = &usb.functions;
338 fh != NULL;
339 fh = fh->next, iface_count += fh->function->interface_count) {
340 if (iface - iface_count < fh->function->interface_count) {
341 if (fh->function->configure != NULL)
342 return (fh->function->configure(iface,
343 iface - iface_count,
344 altsetting,
345 fh));
346
347 /* Default to a single altsetting */
348 if (altsetting != 0)
349 return (-1);
350 else
351 return (0);
352 }
353 }
354
355 return (-1);
356}
357
358static int usb_tx_config_desc(int idx, int reqlen)
359{

Callers 1

usb_handle_controlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…