Skip to content

Commit 5f342a9

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 b936c29 commit 5f342a9

File tree

1 file changed

+0
-56
lines changed

1 file changed

+0
-56
lines changed

esp-hal/src/rmt.rs

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,8 +1585,6 @@ pub trait ChannelInternal: RawChannelAccess {
15851585

15861586
fn set_memsize(&self, value: MemSize);
15871587

1588-
fn is_error(&self) -> bool;
1589-
15901588
#[inline]
15911589
fn channel_ram_start(&self) -> *mut u32 {
15921590
unsafe {
@@ -1620,10 +1618,6 @@ pub trait TxChannelInternal: ChannelInternal {
16201618
// Event::Error, Event::End, Event::Threshold
16211619
fn get_tx_status(&self) -> Option<Event>;
16221620

1623-
fn is_tx_done(&self) -> bool;
1624-
1625-
fn is_tx_threshold_set(&self) -> bool;
1626-
16271621
fn reset_tx_threshold_set(&self);
16281622

16291623
fn set_tx_threshold(&self, threshold: u8);
@@ -1691,8 +1685,6 @@ pub trait RxChannelInternal: ChannelInternal {
16911685
// Event::Error, Event::End, Event::Threshold
16921686
fn get_rx_status(&self) -> Option<Event>;
16931687

1694-
fn is_rx_done(&self) -> bool;
1695-
16961688
fn start_receive(&self) {
16971689
self.clear_rx_interrupts();
16981690
self.set_rx_wrap_mode(false);
@@ -1873,18 +1865,6 @@ mod chip_specific {
18731865
.modify(|_, w| unsafe { w.mem_size().bits(blocks) });
18741866
}
18751867
}
1876-
1877-
fn is_error(&self) -> bool {
1878-
let rmt = crate::peripherals::RMT::regs();
1879-
let int_raw = rmt.int_raw().read();
1880-
let ch_idx = ch_idx(self);
1881-
1882-
if A::Dir::is_tx() {
1883-
int_raw.ch_tx_err(ch_idx).bit()
1884-
} else {
1885-
int_raw.ch_rx_err(ch_idx).bit()
1886-
}
1887-
}
18881868
}
18891869

18901870
impl<A> TxChannelInternal for A
@@ -1983,16 +1963,6 @@ mod chip_specific {
19831963
}
19841964
}
19851965

1986-
fn is_tx_done(&self) -> bool {
1987-
let rmt = crate::peripherals::RMT::regs();
1988-
rmt.int_raw().read().ch_tx_end(self.channel()).bit()
1989-
}
1990-
1991-
fn is_tx_threshold_set(&self) -> bool {
1992-
let rmt = crate::peripherals::RMT::regs();
1993-
rmt.int_raw().read().ch_tx_thr_event(self.channel()).bit()
1994-
}
1995-
19961966
fn reset_tx_threshold_set(&self) {
19971967
let rmt = crate::peripherals::RMT::regs();
19981968
rmt.int_clr()
@@ -2112,12 +2082,6 @@ mod chip_specific {
21122082
}
21132083
}
21142084

2115-
fn is_rx_done(&self) -> bool {
2116-
let rmt = crate::peripherals::RMT::regs();
2117-
let ch_idx = ch_idx(self);
2118-
rmt.int_raw().read().ch_rx_end(ch_idx).bit()
2119-
}
2120-
21212085
fn stop_rx(&self) {
21222086
let rmt = crate::peripherals::RMT::regs();
21232087
let ch_idx = ch_idx(self) as usize;
@@ -2241,11 +2205,6 @@ mod chip_specific {
22412205
rmt.chconf0(self.channel() as usize)
22422206
.modify(|_, w| unsafe { w.mem_size().bits(value.blocks()) });
22432207
}
2244-
2245-
fn is_error(&self) -> bool {
2246-
let rmt = crate::peripherals::RMT::regs();
2247-
rmt.int_raw().read().ch_err(self.channel()).bit()
2248-
}
22492208
}
22502209

22512210
impl<A> TxChannelInternal for A
@@ -2348,16 +2307,6 @@ mod chip_specific {
23482307
}
23492308
}
23502309

2351-
fn is_tx_done(&self) -> bool {
2352-
let rmt = crate::peripherals::RMT::regs();
2353-
rmt.int_raw().read().ch_tx_end(self.channel()).bit()
2354-
}
2355-
2356-
fn is_tx_threshold_set(&self) -> bool {
2357-
let rmt = crate::peripherals::RMT::regs();
2358-
rmt.int_raw().read().ch_tx_thr_event(self.channel()).bit()
2359-
}
2360-
23612310
fn reset_tx_threshold_set(&self) {
23622311
let rmt = crate::peripherals::RMT::regs();
23632312
rmt.int_clr()
@@ -2469,11 +2418,6 @@ mod chip_specific {
24692418
}
24702419
}
24712420

2472-
fn is_rx_done(&self) -> bool {
2473-
let rmt = crate::peripherals::RMT::regs();
2474-
rmt.int_raw().read().ch_rx_end(self.channel()).bit()
2475-
}
2476-
24772421
fn stop_rx(&self) {
24782422
let rmt = crate::peripherals::RMT::regs();
24792423
rmt.chconf1(self.channel() as usize)

0 commit comments

Comments
 (0)