STRUCT USB_EP_CAPS(9)
π 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:
struct usb_request(9)struct usb_ep(9)free_usb_request(9)struct usb_gadget(9)usb_ep_align(9)usb_ep_align_maybe(9)gadget_is_altset_supported(9)gadget_is_stall_supported(9)gadget_is_zlp_supported(9)gadget_avoids_skb_reserve(9)gadget_is_dualspeed(9)gadget_is_superspeed(9)gadget_is_superspeed_plus(9)gadget_is_otg(9)struct usb_gadget_driver(9)usb_gadget_register_driver_owner(9)usb_gadget_unregister_driver(9)struct usb_string(9)struct usb_gadget_strings(9)usb_free_descriptors(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms