STRUCT USB_EP_CAPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct usb_ep_caps(9) β€” like, the whole vibe of an endpoint's abilities, bestie

okay so this is a page from the Kernel API Manual and it's genuinely so iconic β€” it's the lil' struct that tells you what a USB endpoint can and can't do. think of it as an endpoint's resume, but make it six bitfields. no cap. πŸŽ€


✨ NAME ✨

struct usb_ep_caps β€” the description of endpoint capabilities. that's it, that's the whole job, and she ate. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the struct in all her glory, copy it exactly pls, don't touch a single character:

struct usb_ep_caps {
    unsigned type_control:1;
    unsigned type_iso:1;
    unsigned type_bulk:1;
    unsigned type_int:1;
    unsigned dir_in:1;
    unsigned dir_out:1;
 };

look at those :1 bitfields. frugal. efficient. main character energy. ✨


🌸 Members 🌸

every single one, bestie, no skipping:

  • type_control β€” this endpoint supports the control type. but important: it's reserved for ep0, so don't be out here claiming it for anything else. πŸ™ˆ
  • type_iso β€” this endpoint supports isochronous transfers.
  • type_bulk β€” this endpoint supports bulk transfers.
  • type_int β€” this endpoint supports interrupt transfers.
  • dir_in β€” this endpoint supports the IN direction.
  • dir_out β€” this endpoint supports the OUT direction.

so basically five of these are "can she do the thing: yes/no" and two are "which way does the data flow". vibe check complete. 🫢


🌈 SEE ALSO 🌈

these live in the kernel file ./include/linux/usb/gadget.h and honestly the whole friend group is here, all of them, iykyk:


lowkey reminder: type_control is reserved for ep0. that's not me being dramatic, that's just the rule. πŸ’€

and that's the page!! shoutout to ./include/linux/usb for hosting this masterpiece, dated October 2026, filed under struct usb_ep_caps(9). periodt. πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from