@@ -44,7 +44,7 @@ pub mod dispatch_impl {
4444
4545 pub use crate :: server:: impls:: tokio_shared:: tokio_spawn as spawn_fn;
4646
47- use usb_gadget:: function:: custom:: Custom ;
47+ use usb_gadget:: function:: custom:: { Association , Custom , OsExtCompat } ;
4848 use usb_gadget:: { Gadget , RegGadget } ;
4949
5050 use crate :: server:: impls:: usb_gadget:: { UsbGadgetWireRx , UsbGadgetWireTx } ;
@@ -80,9 +80,15 @@ pub mod dispatch_impl {
8080 let ( ep_tx, ep_tx_dir) = EndpointDirection :: device_to_host ( ) ;
8181 let ( ep_rx, ep_rx_dir) = EndpointDirection :: host_to_device ( ) ;
8282
83+ let class = Class :: vendor_specific ( 0x00 , 0x00 ) ;
84+ let iname = "postcard-rpc" ;
8385 let ( mut custom, handle) = Custom :: builder ( )
8486 . with_interface (
85- Interface :: new ( Class :: vendor_specific ( 0 , 0 ) , "postcard-rpc" )
87+ Interface :: new ( class, iname)
88+ . with_os_ext_compat ( OsExtCompat :: winusb ( ) )
89+ // NOTE: IADs are currently broken on upstream usb-gadget - but we want this
90+ // https://github.com/surban/usb-gadget/issues/25
91+ . with_association ( & Association :: new ( class, iname) )
8692 . with_endpoint ( Endpoint :: bulk ( ep_tx_dir) )
8793 . with_endpoint ( Endpoint :: bulk ( ep_rx_dir) ) ,
8894 )
0 commit comments