| 649 | } |
| 650 | |
| 651 | void 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…