Remove loop
This commit is contained in:
parent
9968ada7a0
commit
ac2c05ec69
1 changed files with 5 additions and 8 deletions
13
src/lib.rs
13
src/lib.rs
|
@ -4,7 +4,6 @@ mod serial_config;
|
|||
|
||||
use numtoa::NumToA;
|
||||
|
||||
use core::convert::Infallible;
|
||||
use core::future::Future;
|
||||
|
||||
use embassy_rp::bind_interrupts;
|
||||
|
@ -37,7 +36,7 @@ impl Serial<'static> {
|
|||
pub fn new(
|
||||
usb: USB,
|
||||
serial_config: SerialConfig<'static>,
|
||||
) -> (Serial<'static>, impl Future<Output = Infallible>) {
|
||||
) -> (Serial<'static>, impl Future<Output = ()>) {
|
||||
// Create the driver, from the HAL.
|
||||
let driver = Driver::new(usb, Irqs);
|
||||
|
||||
|
@ -84,12 +83,10 @@ impl Serial<'static> {
|
|||
(Self { class }, Self::run_usb())
|
||||
}
|
||||
|
||||
fn run_usb() -> impl Future<Output = Infallible> {
|
||||
unsafe {
|
||||
async {
|
||||
loop {
|
||||
USB.as_mut().unwrap().run().await;
|
||||
}
|
||||
fn run_usb() -> impl Future<Output = ()> {
|
||||
async {
|
||||
unsafe {
|
||||
USB.as_mut().unwrap().run().await;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue