Skip to content

Commit 0650e05

Browse files
committed
RMT: Remove unused low-level methods
Their use has entirely be replaced by get_tx_status and get_rx_status
1 parent 415db11 commit 0650e05

File tree

1 file changed

+0
-64
lines changed

1 file changed

+0
-64
lines changed

esp-hal/src/rmt.rs

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,8 +1606,6 @@ pub trait ChannelInternal: RawChannelAccess {
16061606

16071607
fn set_memsize(&self, value: MemSize);
16081608

1609-
fn is_error(&self) -> bool;
1610-
16111609
#[inline]
16121610
fn channel_ram_start(&self) -> *mut u32 {
16131611
unsafe {
@@ -1641,10 +1639,6 @@ pub trait TxChannelInternal: ChannelInternal {
16411639
// Event::Error, Event::End, Event::Threshold
16421640
fn get_tx_status(&self) -> Option<Event>;
16431641

1644-
fn is_tx_done(&self) -> bool;
1645-
1646-
fn is_tx_threshold_set(&self) -> bool;
1647-
16481642
fn reset_tx_threshold_set(&self);
16491643

16501644
fn set_tx_threshold(&self, threshold: u8);
@@ -1713,8 +1707,6 @@ pub trait RxChannelInternal: ChannelInternal {
17131707
// Event::Error, Event::End, Event::Threshold
17141708
fn get_rx_status(&self) -> Option<Event>;
17151709

1716-
fn is_rx_done(&self) -> bool;
1717-
17181710
fn start_receive(&self) {
17191711
self.clear_rx_interrupts();
17201712
self.set_rx_wrap_mode(false);
@@ -1898,19 +1890,6 @@ mod chip_specific {
18981890
.modify(|_, w| unsafe { w.mem_size().bits(blocks) });
18991891
}
19001892
}
1901-
1902-
#[inline]
1903-
fn is_error(&self) -> bool {
1904-
let rmt = crate::peripherals::RMT::regs();
1905-
let int_raw = rmt.int_raw().read();
1906-
let ch_idx = ch_idx(self);
1907-
1908-
if A::Dir::is_tx() {
1909-
int_raw.ch_tx_err(ch_idx).bit()
1910-
} else {
1911-
int_raw.ch_rx_err(ch_idx).bit()
1912-
}
1913-
}
19141893
}
19151894

19161895
impl<A> TxChannelInternal for A
@@ -2014,18 +1993,6 @@ mod chip_specific {
20141993
}
20151994
}
20161995

2017-
#[inline]
2018-
fn is_tx_done(&self) -> bool {
2019-
let rmt = crate::peripherals::RMT::regs();
2020-
rmt.int_raw().read().ch_tx_end(self.channel()).bit()
2021-
}
2022-
2023-
#[inline]
2024-
fn is_tx_threshold_set(&self) -> bool {
2025-
let rmt = crate::peripherals::RMT::regs();
2026-
rmt.int_raw().read().ch_tx_thr_event(self.channel()).bit()
2027-
}
2028-
20291996
#[inline]
20301997
fn reset_tx_threshold_set(&self) {
20311998
let rmt = crate::peripherals::RMT::regs();
@@ -2153,13 +2120,6 @@ mod chip_specific {
21532120
}
21542121
}
21552122

2156-
#[inline]
2157-
fn is_rx_done(&self) -> bool {
2158-
let rmt = crate::peripherals::RMT::regs();
2159-
let ch_idx = ch_idx(self);
2160-
rmt.int_raw().read().ch_rx_end(ch_idx).bit()
2161-
}
2162-
21632123
#[inline]
21642124
fn stop_rx(&self) {
21652125
let rmt = crate::peripherals::RMT::regs();
@@ -2288,12 +2248,6 @@ mod chip_specific {
22882248
rmt.chconf0(self.channel() as usize)
22892249
.modify(|_, w| unsafe { w.mem_size().bits(value.blocks()) });
22902250
}
2291-
2292-
#[inline]
2293-
fn is_error(&self) -> bool {
2294-
let rmt = crate::peripherals::RMT::regs();
2295-
rmt.int_raw().read().ch_err(self.channel()).bit()
2296-
}
22972251
}
22982252

22992253
impl<A> TxChannelInternal for A
@@ -2402,18 +2356,6 @@ mod chip_specific {
24022356
}
24032357
}
24042358

2405-
#[inline]
2406-
fn is_tx_done(&self) -> bool {
2407-
let rmt = crate::peripherals::RMT::regs();
2408-
rmt.int_raw().read().ch_tx_end(self.channel()).bit()
2409-
}
2410-
2411-
#[inline]
2412-
fn is_tx_threshold_set(&self) -> bool {
2413-
let rmt = crate::peripherals::RMT::regs();
2414-
rmt.int_raw().read().ch_tx_thr_event(self.channel()).bit()
2415-
}
2416-
24172359
#[inline]
24182360
fn reset_tx_threshold_set(&self) {
24192361
let rmt = crate::peripherals::RMT::regs();
@@ -2534,12 +2476,6 @@ mod chip_specific {
25342476
}
25352477
}
25362478

2537-
#[inline]
2538-
fn is_rx_done(&self) -> bool {
2539-
let rmt = crate::peripherals::RMT::regs();
2540-
rmt.int_raw().read().ch_rx_end(self.channel()).bit()
2541-
}
2542-
25432479
#[inline]
25442480
fn stop_rx(&self) {
25452481
let rmt = crate::peripherals::RMT::regs();

0 commit comments

Comments
 (0)