feat(code): format code

This commit is contained in:
doryan 2024-11-09 16:48:28 +04:00
parent ddd6ee6ad2
commit 4ca8c4e8cf

View File

@ -2,12 +2,12 @@ use core::cmp::max;
use avr_device::{
atmega32u4::{PLL, USB_DEVICE},
interrupt::{free, Mutex},
interrupt::{free, CriticalSection, Mutex},
};
use usb_device::{
bus::UsbBus,
bus::{PollResult, UsbBus},
endpoint::{EndpointAddress, EndpointType},
Result, UsbDirection, UsbError,
Result as UsbResult, UsbDirection, UsbError,
};
#[allow(unused)]
@ -80,6 +80,7 @@ impl<const L: usize> UsbDevice<L> {
dpram_already_used: 0,
}
}
pub fn select_endpoint(
&mut self,
cs: CriticalSection<'_>,
@ -100,6 +101,7 @@ impl<const L: usize> UsbDevice<L> {
Ok(())
}
pub fn configure_endpoint(
&mut self,
cs: CriticalSection<'_>,
@ -263,19 +265,15 @@ impl<const L: usize> UsbBus for UsbDevice<L> {
})
}
fn is_stalled(&self, ep_addr: usb_device::endpoint::EndpointAddress) -> bool {
fn is_stalled(&self, ep_addr: EndpointAddress) -> bool {
todo!();
}
fn poll(&self) -> usb_device::bus::PollResult {
fn poll(&self) -> PollResult {
todo!();
}
fn read(
&self,
ep_addr: usb_device::endpoint::EndpointAddress,
buf: &mut [u8],
) -> usb_device::Result<usize> {
fn read(&self, ep_addr: EndpointAddress, buf: &mut [u8]) -> usb_device::Result<usize> {
todo!();
}
@ -325,7 +323,7 @@ impl<const L: usize> UsbBus for UsbDevice<L> {
});
}
fn set_stalled(&self, ep_addr: usb_device::endpoint::EndpointAddress, stalled: bool) {
fn set_stalled(&self, ep_addr: EndpointAddress, stalled: bool) {
todo!();
}
@ -333,11 +331,7 @@ impl<const L: usize> UsbBus for UsbDevice<L> {
todo!();
}
fn write(
&self,
ep_addr: usb_device::endpoint::EndpointAddress,
buf: &[u8],
) -> usb_device::Result<usize> {
fn write(&self, ep_addr: EndpointAddress, buf: &[u8]) -> UsbResult<usize> {
todo!();
}
}