aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-08-02 16:47:22 +0000
committerGitHub <[email protected]>2025-08-02 16:47:22 +0000
commita3aa1e86296810ecf107d19d708589cc6e11366c (patch)
tree500e033e327b9f1395aa2579b7e27080dca29fad
parent3f457c0e77b9b0a7f1c3cb0ab1ed3623ba1f4325 (diff)
parent1652d9269e58fd56590da539fc5c35a15bdaf497 (diff)
Merge pull request #4495 from elliotsayes/rp-status-irq
Add IRQ StatusSource for _rp235x
-rw-r--r--embassy-rp/src/pio/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/embassy-rp/src/pio/mod.rs b/embassy-rp/src/pio/mod.rs
index ec698d99c..0d8a94776 100644
--- a/embassy-rp/src/pio/mod.rs
+++ b/embassy-rp/src/pio/mod.rs
@@ -98,6 +98,9 @@ pub enum StatusSource {
98 TxFifoLevel = 0, 98 TxFifoLevel = 0,
99 /// All-ones if RX FIFO level < N, otherwise all-zeroes. 99 /// All-ones if RX FIFO level < N, otherwise all-zeroes.
100 RxFifoLevel = 1, 100 RxFifoLevel = 1,
101 /// All-ones if the indexed IRQ flag is raised, otherwise all-zeroes
102 #[cfg(feature = "_rp235x")]
103 Irq = 2,
101} 104}
102 105
103const RXNEMPTY_MASK: u32 = 1 << 0; 106const RXNEMPTY_MASK: u32 = 1 << 0;
@@ -736,6 +739,7 @@ impl<'d, PIO: Instance + 'd, const SM: usize> StateMachine<'d, PIO, SM> {
736 w.set_status_sel(match config.status_sel { 739 w.set_status_sel(match config.status_sel {
737 StatusSource::TxFifoLevel => pac::pio::vals::ExecctrlStatusSel::TXLEVEL, 740 StatusSource::TxFifoLevel => pac::pio::vals::ExecctrlStatusSel::TXLEVEL,
738 StatusSource::RxFifoLevel => pac::pio::vals::ExecctrlStatusSel::RXLEVEL, 741 StatusSource::RxFifoLevel => pac::pio::vals::ExecctrlStatusSel::RXLEVEL,
742 StatusSource::Irq => pac::pio::vals::ExecctrlStatusSel::IRQ,
739 }); 743 });
740 #[cfg(feature = "rp2040")] 744 #[cfg(feature = "rp2040")]
741 w.set_status_sel(match config.status_sel { 745 w.set_status_sel(match config.status_sel {