Skip to content

Commit 24478a4

Browse files
committed
feat: add i2s done for esp32 and esp32s2
1 parent ba6748f commit 24478a4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

esp-hal/src/i2s/master.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,6 +1706,10 @@ mod private {
17061706
self.regs().conf().modify(|_, w| w.rx_start().clear_bit());
17071707
}
17081708

1709+
fn tx_done(&self) -> bool {
1710+
self.regs().state().read().tx_idle().bit_is_set()
1711+
}
1712+
17091713
fn wait_for_tx_done(&self) {
17101714
while self.regs().state().read().tx_idle().bit_is_clear() {
17111715
// wait
@@ -1754,6 +1758,10 @@ mod private {
17541758
self.regs().conf().modify(|_, w| w.rx_start().set_bit());
17551759
}
17561760

1761+
fn rx_done(&self) -> bool {
1762+
self.regs().int_raw().read().in_suc_eof().bit_is_set()
1763+
}
1764+
17571765
fn wait_for_rx_done(&self) {
17581766
while self.regs().int_raw().read().in_suc_eof().bit_is_clear() {
17591767
// wait

0 commit comments

Comments
 (0)