Skip to content

Commit

Permalink
Code cleaning, getting rid of useless generic argument
Browse files Browse the repository at this point in the history
Typo fix
  • Loading branch information
playfulFence committed Jul 24, 2023
1 parent c372fa8 commit 99c48bb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions esp-hal-common/src/usb_serial_jtag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ pub trait Instance {
}

fn txfifo_empty(&self) -> bool {
!self
self
.register_block()
.jfifo_st
.read()
.out_fifo_empty()
.bit_is_set()
.bit_is_clear()
}
}

Expand Down Expand Up @@ -280,12 +280,12 @@ mod asynch {
// Single static instance of the waker
static WAKER: AtomicWaker = AtomicWaker::new();

pub(crate) struct UsbSerialJtagFuture<'d, T> {
instance: &'d T,
pub(crate) struct UsbSerialJtagFuture<'d> {
instance: &'d crate::peripherals::USB_DEVICE,
}

impl<'d, T: Instance> UsbSerialJtagFuture<'d, T> {
pub fn new(instance: &'d T) -> Self {
impl<'d> UsbSerialJtagFuture<'d> {
pub fn new(instance: &'d crate::peripherals::USB_DEVICE) -> Self {
// Set the interrupt enable bit for the USB_SERIAL_JTAG_SERIAL_IN_EMPTY_INT
// interrupt
instance
Expand All @@ -306,7 +306,7 @@ mod asynch {
}
}

impl<'d, T: Instance> core::future::Future for UsbSerialJtagFuture<'d, T> {
impl<'d> core::future::Future for UsbSerialJtagFuture<'d> {
type Output = ();

fn poll(
Expand Down Expand Up @@ -365,7 +365,7 @@ mod asynch {
WAKER.wake();
}

#[cfg(esp32s3)] // TODO doesn't work now, issue is created
#[cfg(esp32s3)]
#[interrupt]
fn USB_DEVICE() {
let usb_serial_jtag = unsafe { &*crate::peripherals::USB_DEVICE::ptr() };
Expand Down

0 comments on commit 99c48bb

Please sign in to comment.