USB type alias

This commit is contained in:
Zachary Levy
2026-04-02 14:14:59 -07:00
parent 18f7e19726
commit fef05b937d
+4 -4
View File
@@ -8,16 +8,16 @@ use embassy_usb::driver::{Driver as UsbDriverTrait, EndpointIn, EndpointOut};
use embassy_usb::UsbDevice; use embassy_usb::UsbDevice;
type UsbDriver = StmUsbDriver<'static, USB_OTG_FS>; type UsbDriver = StmUsbDriver<'static, USB_OTG_FS>;
type InterIn = <UsbDriver as UsbDriverTrait<'static>>::EndpointIn; pub type TypedInterIn = <UsbDriver as UsbDriverTrait<'static>>::EndpointIn;
type InterOut = <UsbDriver as UsbDriverTrait<'static>>::EndpointOut; pub type TypedInterOut = <UsbDriver as UsbDriverTrait<'static>>::EndpointOut;
pub type TypedUSB = UsbDevice<'static, UsbDriver>; pub type TypedUSB = UsbDevice<'static, UsbDriver>;
pub struct UsbIO { pub struct UsbIO {
/// Send to master /// Send to master
pub interrupt_in: InterIn, pub interrupt_in: TypedInterIn,
/// Recieve from master /// Recieve from master
pub interrupt_out: InterOut, pub interrupt_out: TypedInterOut,
} }
impl<T: EndpointIn> comms::Sender for T { impl<T: EndpointIn> comms::Sender for T {