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

Function usb_attach_function

Bootloader/usb.c:651–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

649}
650
651void usb_attach_function(const struct usbd_function *function, struct usbd_function_ctx_header *ctx)
652{
653 /* XXX right now this requires a sequential initialization */
654 struct usbd_function_ctx_header *prev = &usb.functions;
655
656 while (prev->next != NULL)
657 prev = prev->next;
658 ctx->next = NULL;
659 ctx->function = function;
660 ctx->interface_offset = prev->interface_offset + prev->function->interface_count;
661 ctx->ep_rx_offset = prev->ep_rx_offset + prev->function->ep_rx_count;
662 ctx->ep_tx_offset = prev->ep_tx_offset + prev->function->ep_tx_count;
663 prev->next = ctx;
664}
665
666#elif defined(_sam_)
667

Callers 1

dfu_initFunction · 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…