Remove channel and make run future cancelable

This commit is contained in:
alexmoon
2022-04-13 13:09:08 -04:00
parent 1d875fab2d
commit ff7c6b350e
6 changed files with 129 additions and 196 deletions

View File

@ -8,7 +8,6 @@ pub(crate) mod fmt;
use core::cell::Cell;
use core::mem::{self, MaybeUninit};
use core::sync::atomic::{AtomicBool, Ordering};
use embassy::blocking_mutex::raw::RawMutex;
use embassy::blocking_mutex::CriticalSectionMutex;
use embassy_usb::control::{self, ControlHandler, InResponse, OutResponse, Request};
use embassy_usb::driver::{Endpoint, EndpointError, EndpointIn, EndpointOut};
@ -163,8 +162,8 @@ impl<'d> ControlHandler for Control<'d> {
impl<'d, D: Driver<'d>> CdcAcmClass<'d, D> {
/// Creates a new CdcAcmClass with the provided UsbBus and max_packet_size in bytes. For
/// full-speed devices, max_packet_size has to be one of 8, 16, 32 or 64.
pub fn new<M: RawMutex>(
builder: &mut UsbDeviceBuilder<'d, D, M>,
pub fn new(
builder: &mut UsbDeviceBuilder<'d, D>,
state: &'d mut State<'d>,
max_packet_size: u16,
) -> Self {