€•sMŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”(hhŒparent”hubaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ"/translations/zh_CN/usb/raw-gadget”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”(hhhh2ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/zh_TW/usb/raw-gadget”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”(hhhhFubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/it_IT/usb/raw-gadget”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”(hhhhZubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/ja_JP/usb/raw-gadget”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”(hhhhnubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/ko_KR/usb/raw-gadget”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”(hhhh‚ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/sp_SP/usb/raw-gadget”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒUSB Raw Gadget”h]”hŒUSB Raw Gadget”…””}”(hhªhh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒh]”(hŒLaunch the instance with ”…””}”(hŒLaunch the instance with ”hj@hžhhŸNh Nubj½)”}”(hŒ``USB_RAW_IOCTL_RUN``”h]”hŒUSB_RAW_IOCTL_RUN”…””}”(hhhjHhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hj@ubhŒ.”…””}”(hj™hj@hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K7hj<ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjåhžhhŸh¶h Nubj)”}”(hŒIn a loop issue ``USB_RAW_IOCTL_EVENT_FETCH`` to receive events from Raw Gadget and react to those depending on what kind of USB gadget must be implemented. ”h]”h¸)”}”(hŒœIn a loop issue ``USB_RAW_IOCTL_EVENT_FETCH`` to receive events from Raw Gadget and react to those depending on what kind of USB gadget must be implemented.”h]”(hŒIn a loop issue ”…””}”(hŒIn a loop issue ”hjjhžhhŸNh Nubj½)”}”(hŒ``USB_RAW_IOCTL_EVENT_FETCH``”h]”hŒUSB_RAW_IOCTL_EVENT_FETCH”…””}”(hhhjshžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hjjubhŒo to receive events from Raw Gadget and react to those depending on what kind of USB gadget must be implemented.”…””}”(hŒo to receive events from Raw Gadget and react to those depending on what kind of USB gadget must be implemented.”hjjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K8hjfubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjåhžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”j•j–j—hj˜j™uh1jhj¢hžhhŸh¶h K5ubh¸)”}”(hXNote that some UDC drivers have fixed addresses assigned to endpoints, and therefore arbitrary endpoint addresses cannot be used in the descriptors. Nevertheless, Raw Gadget provides a UDC-agnostic way to write USB gadgets. Once ``USB_RAW_EVENT_CONNECT`` is received via ``USB_RAW_IOCTL_EVENT_FETCH``, ``USB_RAW_IOCTL_EPS_INFO`` can be used to find out information about the endpoints that the UDC driver has. Based on that, userspace must choose UDC endpoints for the gadget and assign addresses in the endpoint descriptors correspondingly.”h]”(hŒåNote that some UDC drivers have fixed addresses assigned to endpoints, and therefore arbitrary endpoint addresses cannot be used in the descriptors. Nevertheless, Raw Gadget provides a UDC-agnostic way to write USB gadgets. Once ”…””}”(hŒåNote that some UDC drivers have fixed addresses assigned to endpoints, and therefore arbitrary endpoint addresses cannot be used in the descriptors. Nevertheless, Raw Gadget provides a UDC-agnostic way to write USB gadgets. Once ”hj˜hžhhŸNh Nubj½)”}”(hŒ``USB_RAW_EVENT_CONNECT``”h]”hŒUSB_RAW_EVENT_CONNECT”…””}”(hhhj¡hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hj˜ubhŒ is received via ”…””}”(hŒ is received via ”hj˜hžhhŸNh Nubj½)”}”(hŒ``USB_RAW_IOCTL_EVENT_FETCH``”h]”hŒUSB_RAW_IOCTL_EVENT_FETCH”…””}”(hhhj´hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hj˜ubhŒ, ”…””}”(hŒ, ”hj˜hžhhŸNh Nubj½)”}”(hŒ``USB_RAW_IOCTL_EPS_INFO``”h]”hŒUSB_RAW_IOCTL_EPS_INFO”…””}”(hhhjÇhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¼hj˜ubhŒÕ can be used to find out information about the endpoints that the UDC driver has. Based on that, userspace must choose UDC endpoints for the gadget and assign addresses in the endpoint descriptors correspondingly.”…””}”(hŒÕ can be used to find out information about the endpoints that the UDC driver has. Based on that, userspace must choose UDC endpoints for the gadget and assign addresses in the endpoint descriptors correspondingly.”hj˜hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K