USB type alias
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user